it66121 hdmi:add macro for hdmi source lcdc select
[firefly-linux-kernel-4.4.55.git] / drivers / video / rockchip / hdmi / chips / cat66121 / cat66121_hdmi.h
1 #ifndef __cat66121_HDMI_H__
2 #define __cat66121_HDMI_H__
3 #include "../../rk_hdmi.h"
4
5 #if defined(CONFIG_HDMI_SOURCE_LCDC1)
6 #define HDMI_SOURCE_DEFAULT HDMI_SOURCE_LCDC1
7 #else
8 #define HDMI_SOURCE_DEFAULT HDMI_SOURCE_LCDC0
9 #endif
10
11 //#define HDMI_SOURCE_DEFAULT HDMI_SOURCE_LCDC0
12 //#define HDMI_USE_IRQ
13
14 struct cat66121_hdmi_pdata {
15         int gpio;
16         struct i2c_client *client;
17         struct delayed_work delay_work;
18         #ifdef HDMI_USE_IRQ
19         struct work_struct      irq_work;
20         #else
21         struct workqueue_struct *workqueue;
22         #endif
23 };
24
25 extern struct cat66121_hdmi_pdata *cat66121_hdmi;
26
27 extern int cat66121_hdmi_sys_init(void);
28 extern void cat66121_hdmi_interrupt(void);
29 extern int cat66121_hdmi_sys_detect_hpd(void);
30 extern int cat66121_hdmi_sys_insert(void);
31 extern int cat66121_hdmi_sys_remove(void);
32 extern int cat66121_hdmi_sys_read_edid(int block, unsigned char *buff);
33 extern int cat66121_hdmi_sys_config_video(struct hdmi_video_para *vpara);
34 extern int cat66121_hdmi_sys_config_audio(struct hdmi_audio *audio);
35 extern void cat66121_hdmi_sys_enalbe_output(int enable);
36 extern int cat66121_hdmi_register_hdcp_callbacks(void (*hdcp_cb)(void),
37                                          void (*hdcp_irq_cb)(int status),
38                                          int (*hdcp_power_on_cb)(void),
39                                          void (*hdcp_power_off_cb)(void));
40 #endif