Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux...
[firefly-linux-kernel-4.4.55.git] / include / linux / hdmi-notifier.h
1 #ifndef LINUX_HDMI_NOTIFIER_H
2 #define LINUX_HDMI_NOTIFIER_H
3
4 #include <linux/types.h>
5
6 enum {
7         HDMI_CONNECTED,
8         HDMI_DISCONNECTED,
9         HDMI_NEW_EDID,
10         HDMI_NEW_ELD,
11 };
12
13 struct hdmi_event_base {
14         struct device *source;
15 };
16
17 struct hdmi_event_new_edid {
18         struct hdmi_event_base base;
19         const void *edid;
20         size_t size;
21 };
22
23 struct hdmi_event_new_eld {
24         struct hdmi_event_base base;
25         unsigned char eld[128];
26 };
27
28 union hdmi_event {
29         struct hdmi_event_base base;
30         struct hdmi_event_new_edid edid;
31         struct hdmi_event_new_eld eld;
32 };
33
34 struct notifier_block;
35
36 int hdmi_register_notifier(struct notifier_block *nb);
37 int hdmi_unregister_notifier(struct notifier_block *nb);
38
39 void hdmi_event_connect(struct device *dev);
40 void hdmi_event_disconnect(struct device *dev);
41 void hdmi_event_new_edid(struct device *dev, const void *edid, size_t size);
42 void hdmi_event_new_eld(struct device *dev, const void *eld);
43
44 #endif