summaryrefstree
path: root/kernel/include/linux/panel_notify.h
blob: 3986b25420420ff37d3148fa80bc3b6fe8776d31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * linux/drivers/video/fbdev/exynos/panel/panel_notify.h
 *
 * Header file for Samsung Common LCD Driver.
 *
 * Copyright (c) 2018 Samsung Electronics
 * Gwanghui Lee <gwanghui.lee@samsung.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef __PANEL_NOTIFY_H__
#define __PANEL_NOTIFY_H__

enum panel_notifier_event_t {
	PANEL_EVENT_LCD_CHANGED,
	PANEL_EVENT_BL_CHANGED,
	PANEL_EVENT_VRR_CHANGED,
	PANEL_EVENT_STATE_CHANGED,
	PANEL_EVENT_LFD_CHANGED,
	PANEL_EVENT_UB_CON_CHANGED,
};

enum panel_notifier_event_ub_con_state {
	PANEL_EVENT_UB_CON_CONNECTED = 0,
	PANEL_EVENT_UB_CON_DISCONNECTED = 1,
};

struct panel_ub_con_event_data {
   enum panel_notifier_event_ub_con_state state;
};

struct panel_bl_event_data {
	int brightness;
	int aor_ratio;
};

struct panel_dms_data {
	int fps;
	int lfd_min_freq;
	int lfd_max_freq;
};

#ifdef CONFIG_PANEL_NOTIFY
extern int panel_notifier_register(struct notifier_block *nb);
extern int panel_notifier_unregister(struct notifier_block *nb);
extern int panel_notifier_call_chain(unsigned long val, void *v);
#else
static inline int panel_notifier_register(struct notifier_block *nb)
{
	return 0;
};

static inline int panel_notifier_unregister(struct notifier_block *nb)
{
	return 0;
};

static inline int panel_notifier_call_chain(unsigned long val, void *v)
{
	return 0;
};
#endif /* CONFIG_PANEL_NOTIFY */
#endif /* __PANEL_NOTIFY_H__ */