xref: /OK3568_Linux_fs/kernel/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 #ifndef DW_HDMI_CEC_H
2 #define DW_HDMI_CEC_H
3 
4 struct dw_hdmi;
5 
6 #define CEC_EN			BIT(0)
7 #define CEC_WAKE		BIT(1)
8 
9 struct dw_hdmi_cec_ops {
10 	void (*write)(struct dw_hdmi *hdmi, u8 val, int offset);
11 	u8 (*read)(struct dw_hdmi *hdmi, int offset);
12 	void (*enable)(struct dw_hdmi *hdmi);
13 	void (*disable)(struct dw_hdmi *hdmi);
14 	void (*mod)(struct dw_hdmi *hdmi, u8 data, u8 mask, unsigned int reg);
15 };
16 
17 struct dw_hdmi_cec_data {
18 	struct dw_hdmi *hdmi;
19 	const struct dw_hdmi_cec_ops *ops;
20 	int irq;
21 	int wake_irq;
22 };
23 
24 void dw_hdmi_hpd_wake_up(struct platform_device *pdev);
25 
26 #endif
27