.. | .. |
---|
19 | 19 | #include "msm_drv.h" |
---|
20 | 20 | #include "hdmi.xml.h" |
---|
21 | 21 | |
---|
22 | | -#define HDMI_MAX_NUM_GPIO 6 |
---|
23 | | - |
---|
24 | 22 | struct hdmi_phy; |
---|
25 | 23 | struct hdmi_platform_config; |
---|
26 | | - |
---|
27 | | -struct hdmi_gpio_data { |
---|
28 | | - struct gpio_desc *gpiod; |
---|
29 | | - bool output; |
---|
30 | | - int value; |
---|
31 | | -}; |
---|
32 | 24 | |
---|
33 | 25 | struct hdmi_audio { |
---|
34 | 26 | bool enabled; |
---|
.. | .. |
---|
60 | 52 | struct regulator **pwr_regs; |
---|
61 | 53 | struct clk **hpd_clks; |
---|
62 | 54 | struct clk **pwr_clks; |
---|
| 55 | + |
---|
| 56 | + struct gpio_desc *hpd_gpiod; |
---|
63 | 57 | |
---|
64 | 58 | struct hdmi_phy *phy; |
---|
65 | 59 | struct device *phy_dev; |
---|
.. | .. |
---|
109 | 103 | /* clks that need to be on for screen pwr (ie pixel clk): */ |
---|
110 | 104 | const char **pwr_clk_names; |
---|
111 | 105 | int pwr_clk_cnt; |
---|
112 | | - |
---|
113 | | - /* gpio's: */ |
---|
114 | | - struct hdmi_gpio_data gpios[HDMI_MAX_NUM_GPIO]; |
---|
115 | 106 | }; |
---|
| 107 | + |
---|
| 108 | +struct hdmi_bridge { |
---|
| 109 | + struct drm_bridge base; |
---|
| 110 | + struct hdmi *hdmi; |
---|
| 111 | + struct work_struct hpd_work; |
---|
| 112 | +}; |
---|
| 113 | +#define to_hdmi_bridge(x) container_of(x, struct hdmi_bridge, base) |
---|
116 | 114 | |
---|
117 | 115 | void msm_hdmi_set_mode(struct hdmi *hdmi, bool power_on); |
---|
118 | 116 | |
---|
.. | .. |
---|
230 | 228 | struct drm_bridge *msm_hdmi_bridge_init(struct hdmi *hdmi); |
---|
231 | 229 | void msm_hdmi_bridge_destroy(struct drm_bridge *bridge); |
---|
232 | 230 | |
---|
233 | | -/* |
---|
234 | | - * hdmi connector: |
---|
235 | | - */ |
---|
236 | | - |
---|
237 | | -void msm_hdmi_connector_irq(struct drm_connector *connector); |
---|
238 | | -struct drm_connector *msm_hdmi_connector_init(struct hdmi *hdmi); |
---|
239 | | -int msm_hdmi_hpd_enable(struct drm_connector *connector); |
---|
| 231 | +void msm_hdmi_hpd_irq(struct drm_bridge *bridge); |
---|
| 232 | +enum drm_connector_status msm_hdmi_bridge_detect( |
---|
| 233 | + struct drm_bridge *bridge); |
---|
| 234 | +int msm_hdmi_hpd_enable(struct drm_bridge *bridge); |
---|
| 235 | +void msm_hdmi_hpd_disable(struct hdmi_bridge *hdmi_bridge); |
---|
240 | 236 | |
---|
241 | 237 | /* |
---|
242 | 238 | * i2c adapter for ddc: |
---|