diff options
author | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2014-10-09 02:53:35 -0400 |
---|---|---|
committer | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2014-12-11 07:58:12 -0500 |
commit | 765692078f08d0229e545d3c1a50bddbc16c800c (patch) | |
tree | 1950e70afe72f8fa624778c0d8c746426f126c05 | |
parent | 41a14623bd7345017b62f167110cf95808a4891a (diff) |
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: Benjamin Gaignard <benjamin.gaignard@linaro.org>
-rw-r--r-- | Documentation/devicetree/bindings/gpu/st,stih4xx.txt | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/sti/sti_hdmi.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/sti/sti_hdmi.h | 5 |
3 files changed, 5 insertions, 13 deletions
diff --git a/Documentation/devicetree/bindings/gpu/st,stih4xx.txt b/Documentation/devicetree/bindings/gpu/st,stih4xx.txt index 8885d9e203fc..32cfc7b7631b 100644 --- a/Documentation/devicetree/bindings/gpu/st,stih4xx.txt +++ b/Documentation/devicetree/bindings/gpu/st,stih4xx.txt | |||
@@ -68,7 +68,6 @@ STMicroelectronics stih4xx platforms | |||
68 | number of clocks may depend of the SoC type. | 68 | number of clocks may depend of the SoC type. |
69 | - clock-names: names of the clocks listed in clocks property in the same | 69 | - clock-names: names of the clocks listed in clocks property in the same |
70 | order. | 70 | order. |
71 | - hdmi,hpd-gpio: gpio id to detect if an hdmi cable is plugged or not. | ||
72 | - ddc: phandle of an I2C controller used for DDC EDID probing | 71 | - ddc: phandle of an I2C controller used for DDC EDID probing |
73 | 72 | ||
74 | sti-hda: | 73 | sti-hda: |
@@ -174,7 +173,6 @@ Example: | |||
174 | interrupt-names = "irq"; | 173 | interrupt-names = "irq"; |
175 | clock-names = "pix", "tmds", "phy", "audio"; | 174 | clock-names = "pix", "tmds", "phy", "audio"; |
176 | 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>; | 175 | 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>; |
177 | hdmi,hpd-gpio = <&PIO2 5>; | ||
178 | }; | 176 | }; |
179 | 177 | ||
180 | sti-hda@fe85a000 { | 178 | sti-hda@fe85a000 { |
diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c index fed1b5fe4842..192119761c14 100644 --- a/drivers/gpu/drm/sti/sti_hdmi.c +++ b/drivers/gpu/drm/sti/sti_hdmi.c | |||
@@ -130,8 +130,7 @@ static irqreturn_t hdmi_irq_thread(int irq, void *arg) | |||
130 | 130 | ||
131 | /* Hot plug/unplug IRQ */ | 131 | /* Hot plug/unplug IRQ */ |
132 | if (hdmi->irq_status & HDMI_INT_HOT_PLUG) { | 132 | if (hdmi->irq_status & HDMI_INT_HOT_PLUG) { |
133 | /* read gpio to get the status */ | 133 | hdmi->hpd = readl(hdmi->regs + HDMI_STA) & HDMI_STA_HOT_PLUG; |
134 | hdmi->hpd = gpio_get_value(hdmi->hpd_gpio); | ||
135 | if (hdmi->drm_dev) | 134 | if (hdmi->drm_dev) |
136 | drm_helper_hpd_irq_event(hdmi->drm_dev); | 135 | drm_helper_hpd_irq_event(hdmi->drm_dev); |
137 | } | 136 | } |
@@ -766,13 +765,7 @@ static int sti_hdmi_probe(struct platform_device *pdev) | |||
766 | return PTR_ERR(hdmi->clk_audio); | 765 | return PTR_ERR(hdmi->clk_audio); |
767 | } | 766 | } |
768 | 767 | ||
769 | hdmi->hpd_gpio = of_get_named_gpio(np, "hdmi,hpd-gpio", 0); | 768 | hdmi->hpd = readl(hdmi->regs + HDMI_STA) & HDMI_STA_HOT_PLUG; |
770 | if (hdmi->hpd_gpio < 0) { | ||
771 | DRM_ERROR("Failed to get hdmi hpd-gpio\n"); | ||
772 | return -EIO; | ||
773 | } | ||
774 | |||
775 | hdmi->hpd = gpio_get_value(hdmi->hpd_gpio); | ||
776 | 769 | ||
777 | init_waitqueue_head(&hdmi->wait_event); | 770 | init_waitqueue_head(&hdmi->wait_event); |
778 | 771 | ||
diff --git a/drivers/gpu/drm/sti/sti_hdmi.h b/drivers/gpu/drm/sti/sti_hdmi.h index d00a3e0d807f..3d22390e1f3b 100644 --- a/drivers/gpu/drm/sti/sti_hdmi.h +++ b/drivers/gpu/drm/sti/sti_hdmi.h | |||
@@ -14,6 +14,9 @@ | |||
14 | #define HDMI_STA 0x0010 | 14 | #define HDMI_STA 0x0010 |
15 | #define HDMI_STA_DLL_LCK BIT(5) | 15 | #define HDMI_STA_DLL_LCK BIT(5) |
16 | 16 | ||
17 | #define HDMI_STA_HOT_PLUG_SHIFT 4 | ||
18 | #define HDMI_STA_HOT_PLUG (1 << HDMI_STA_HOT_PLUG_SHIFT) | ||
19 | |||
17 | struct sti_hdmi; | 20 | struct sti_hdmi; |
18 | 21 | ||
19 | struct hdmi_phy_ops { | 22 | struct hdmi_phy_ops { |
@@ -37,7 +40,6 @@ struct hdmi_phy_ops { | |||
37 | * @irq_status: interrupt status register | 40 | * @irq_status: interrupt status register |
38 | * @phy_ops: phy start/stop operations | 41 | * @phy_ops: phy start/stop operations |
39 | * @enabled: true if hdmi is enabled else false | 42 | * @enabled: true if hdmi is enabled else false |
40 | * @hpd_gpio: hdmi hot plug detect gpio number | ||
41 | * @hpd: hot plug detect status | 43 | * @hpd: hot plug detect status |
42 | * @wait_event: wait event | 44 | * @wait_event: wait event |
43 | * @event_received: wait event status | 45 | * @event_received: wait event status |
@@ -57,7 +59,6 @@ struct sti_hdmi { | |||
57 | u32 irq_status; | 59 | u32 irq_status; |
58 | struct hdmi_phy_ops *phy_ops; | 60 | struct hdmi_phy_ops *phy_ops; |
59 | bool enabled; | 61 | bool enabled; |
60 | int hpd_gpio; | ||
61 | bool hpd; | 62 | bool hpd; |
62 | wait_queue_head_t wait_event; | 63 | wait_queue_head_t wait_event; |
63 | bool event_received; | 64 | bool event_received; |