1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. 4 */ 5 6 #ifndef _DP_CTRL_H_ 7 #define _DP_CTRL_H_ 8 9 #include "dp_aux.h" 10 #include "dp_panel.h" 11 #include "dp_link.h" 12 #include "dp_catalog.h" 13 14 struct msm_dp_ctrl { 15 bool wide_bus_en; 16 }; 17 18 struct phy; 19 20 int msm_dp_ctrl_on_link(struct msm_dp_ctrl *msm_dp_ctrl); 21 int msm_dp_ctrl_on_stream(struct msm_dp_ctrl *msm_dp_ctrl, bool force_link_train); 22 void msm_dp_ctrl_off_link_stream(struct msm_dp_ctrl *msm_dp_ctrl); 23 void msm_dp_ctrl_off_link(struct msm_dp_ctrl *msm_dp_ctrl); 24 void msm_dp_ctrl_off(struct msm_dp_ctrl *msm_dp_ctrl); 25 void msm_dp_ctrl_push_idle(struct msm_dp_ctrl *msm_dp_ctrl); 26 irqreturn_t msm_dp_ctrl_isr(struct msm_dp_ctrl *msm_dp_ctrl); 27 void msm_dp_ctrl_handle_sink_request(struct msm_dp_ctrl *msm_dp_ctrl); 28 struct msm_dp_ctrl *msm_dp_ctrl_get(struct device *dev, struct msm_dp_link *link, 29 struct msm_dp_panel *panel, struct drm_dp_aux *aux, 30 struct msm_dp_catalog *catalog, 31 struct phy *phy); 32 33 void msm_dp_ctrl_reset_irq_ctrl(struct msm_dp_ctrl *msm_dp_ctrl, bool enable); 34 void msm_dp_ctrl_phy_init(struct msm_dp_ctrl *msm_dp_ctrl); 35 void msm_dp_ctrl_phy_exit(struct msm_dp_ctrl *msm_dp_ctrl); 36 void msm_dp_ctrl_irq_phy_exit(struct msm_dp_ctrl *msm_dp_ctrl); 37 38 void msm_dp_ctrl_set_psr(struct msm_dp_ctrl *msm_dp_ctrl, bool enable); 39 void msm_dp_ctrl_config_psr(struct msm_dp_ctrl *msm_dp_ctrl); 40 41 int msm_dp_ctrl_core_clk_enable(struct msm_dp_ctrl *msm_dp_ctrl); 42 void msm_dp_ctrl_core_clk_disable(struct msm_dp_ctrl *msm_dp_ctrl); 43 44 #endif /* _DP_CTRL_H_ */ 45