xref: /linux/include/drm/bridge/dw_hdmi_qp.h (revision 74ba587f402d5501af2c85e50cf1e4044263b6ca)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (c) 2021-2022 Rockchip Electronics Co., Ltd.
4  * Copyright (c) 2024 Collabora Ltd.
5  */
6 
7 #ifndef __DW_HDMI_QP__
8 #define __DW_HDMI_QP__
9 
10 struct device;
11 struct drm_encoder;
12 struct dw_hdmi_qp;
13 struct platform_device;
14 
15 struct dw_hdmi_qp_phy_ops {
16 	int (*init)(struct dw_hdmi_qp *hdmi, void *data);
17 	void (*disable)(struct dw_hdmi_qp *hdmi, void *data);
18 	enum drm_connector_status (*read_hpd)(struct dw_hdmi_qp *hdmi, void *data);
19 	void (*setup_hpd)(struct dw_hdmi_qp *hdmi, void *data);
20 };
21 
22 struct dw_hdmi_qp_plat_data {
23 	const struct dw_hdmi_qp_phy_ops *phy_ops;
24 	void *phy_data;
25 	int main_irq;
26 	int cec_irq;
27 	unsigned long ref_clk_rate;
28 };
29 
30 struct dw_hdmi_qp *dw_hdmi_qp_bind(struct platform_device *pdev,
31 				   struct drm_encoder *encoder,
32 				   const struct dw_hdmi_qp_plat_data *plat_data);
33 void dw_hdmi_qp_resume(struct device *dev, struct dw_hdmi_qp *hdmi);
34 #endif /* __DW_HDMI_QP__ */
35