xref: /linux/include/drm/bridge/dw_hdmi_qp.h (revision 7f4f3b14e8079ecde096bd734af10e30d40c27b7)
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 };
27 
28 struct dw_hdmi_qp *dw_hdmi_qp_bind(struct platform_device *pdev,
29 				   struct drm_encoder *encoder,
30 				   const struct dw_hdmi_qp_plat_data *plat_data);
31 void dw_hdmi_qp_resume(struct device *dev, struct dw_hdmi_qp *hdmi);
32 #endif /* __DW_HDMI_QP__ */
33