Commit 76569207 authored by Benjamin Gaignard's avatar Benjamin Gaignard

drm: sti: remove gpio for HDMI hot plug detection

gpio used for HDMI hot plug detection is useless,
HDMI_STI register contains an hot plug detection status bit.
Fix binding documentation.
Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
parent 41a14623
...@@ -68,7 +68,6 @@ STMicroelectronics stih4xx platforms ...@@ -68,7 +68,6 @@ STMicroelectronics stih4xx platforms
number of clocks may depend of the SoC type. number of clocks may depend of the SoC type.
- clock-names: names of the clocks listed in clocks property in the same - clock-names: names of the clocks listed in clocks property in the same
order. order.
- hdmi,hpd-gpio: gpio id to detect if an hdmi cable is plugged or not.
- ddc: phandle of an I2C controller used for DDC EDID probing - ddc: phandle of an I2C controller used for DDC EDID probing
sti-hda: sti-hda:
...@@ -174,7 +173,6 @@ Example: ...@@ -174,7 +173,6 @@ Example:
interrupt-names = "irq"; interrupt-names = "irq";
clock-names = "pix", "tmds", "phy", "audio"; clock-names = "pix", "tmds", "phy", "audio";
clocks = <&clockgen_c_vcc CLK_S_PIX_HDMI>, <&clockgen_c_vcc CLK_S_TMDS_HDMI>, <&clockgen_c_vcc CLK_S_HDMI_REJECT_PLL>, <&clockgen_b1 CLK_S_PCM_0>; clocks = <&clockgen_c_vcc CLK_S_PIX_HDMI>, <&clockgen_c_vcc CLK_S_TMDS_HDMI>, <&clockgen_c_vcc CLK_S_HDMI_REJECT_PLL>, <&clockgen_b1 CLK_S_PCM_0>;
hdmi,hpd-gpio = <&PIO2 5>;
}; };
sti-hda@fe85a000 { sti-hda@fe85a000 {
......
...@@ -130,8 +130,7 @@ static irqreturn_t hdmi_irq_thread(int irq, void *arg) ...@@ -130,8 +130,7 @@ static irqreturn_t hdmi_irq_thread(int irq, void *arg)
/* Hot plug/unplug IRQ */ /* Hot plug/unplug IRQ */
if (hdmi->irq_status & HDMI_INT_HOT_PLUG) { if (hdmi->irq_status & HDMI_INT_HOT_PLUG) {
/* read gpio to get the status */ hdmi->hpd = readl(hdmi->regs + HDMI_STA) & HDMI_STA_HOT_PLUG;
hdmi->hpd = gpio_get_value(hdmi->hpd_gpio);
if (hdmi->drm_dev) if (hdmi->drm_dev)
drm_helper_hpd_irq_event(hdmi->drm_dev); drm_helper_hpd_irq_event(hdmi->drm_dev);
} }
...@@ -766,13 +765,7 @@ static int sti_hdmi_probe(struct platform_device *pdev) ...@@ -766,13 +765,7 @@ static int sti_hdmi_probe(struct platform_device *pdev)
return PTR_ERR(hdmi->clk_audio); return PTR_ERR(hdmi->clk_audio);
} }
hdmi->hpd_gpio = of_get_named_gpio(np, "hdmi,hpd-gpio", 0); hdmi->hpd = readl(hdmi->regs + HDMI_STA) & HDMI_STA_HOT_PLUG;
if (hdmi->hpd_gpio < 0) {
DRM_ERROR("Failed to get hdmi hpd-gpio\n");
return -EIO;
}
hdmi->hpd = gpio_get_value(hdmi->hpd_gpio);
init_waitqueue_head(&hdmi->wait_event); init_waitqueue_head(&hdmi->wait_event);
......
...@@ -14,6 +14,9 @@ ...@@ -14,6 +14,9 @@
#define HDMI_STA 0x0010 #define HDMI_STA 0x0010
#define HDMI_STA_DLL_LCK BIT(5) #define HDMI_STA_DLL_LCK BIT(5)
#define HDMI_STA_HOT_PLUG_SHIFT 4
#define HDMI_STA_HOT_PLUG (1 << HDMI_STA_HOT_PLUG_SHIFT)
struct sti_hdmi; struct sti_hdmi;
struct hdmi_phy_ops { struct hdmi_phy_ops {
...@@ -37,7 +40,6 @@ struct hdmi_phy_ops { ...@@ -37,7 +40,6 @@ struct hdmi_phy_ops {
* @irq_status: interrupt status register * @irq_status: interrupt status register
* @phy_ops: phy start/stop operations * @phy_ops: phy start/stop operations
* @enabled: true if hdmi is enabled else false * @enabled: true if hdmi is enabled else false
* @hpd_gpio: hdmi hot plug detect gpio number
* @hpd: hot plug detect status * @hpd: hot plug detect status
* @wait_event: wait event * @wait_event: wait event
* @event_received: wait event status * @event_received: wait event status
...@@ -57,7 +59,6 @@ struct sti_hdmi { ...@@ -57,7 +59,6 @@ struct sti_hdmi {
u32 irq_status; u32 irq_status;
struct hdmi_phy_ops *phy_ops; struct hdmi_phy_ops *phy_ops;
bool enabled; bool enabled;
int hpd_gpio;
bool hpd; bool hpd;
wait_queue_head_t wait_event; wait_queue_head_t wait_event;
bool event_received; bool event_received;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment