aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm
diff options
context:
space:
mode:
authorArchit Taneja <architt@codeaurora.org>2016-09-13 11:21:35 -0400
committerRob Clark <robdclark@gmail.com>2016-09-15 13:02:02 -0400
commit5f6f5e08b1fba96fab0f7fa14025f956d25067ff (patch)
tree30291ed3a5245e78bd2368a57aa0b0544dbf2309 /drivers/gpu/drm/msm
parent13ce5b6e38b7e487d3b900520f8d608122730095 (diff)
drm/msm/hdmi: Clean up HDMI gpio DT bindings
Make the following changes in the HDMI gpio bindings: - Use "-gpios" as the suffix for all the gpio names - Move all the gpios to optional, since there are platforms that use none of them. - The HPD gpio is a standard one, remove the "qcom,hdmi-tx-" prefix from it. - Remove the HDMI DDC clk/data gpios. They are just leftovers of an old way to configure pinctrl properties. - Add a missing lpm gpio used on some platforms. Make the necessary changes in the driver to incorporate these changes. There hasn't been any upstream DT that uses the HDMI bindings, so it's okay to change and move around these properties. Cc: Rob Herring <robh@kernel.org> Cc: devicetree@vger.kernel.org Signed-off-by: Archit Taneja <architt@codeaurora.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm')
-rw-r--r--drivers/gpu/drm/msm/hdmi/hdmi.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
index 973720792236..a968cad509c2 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
@@ -422,12 +422,29 @@ static const struct {
422 422
423static int msm_hdmi_get_gpio(struct device_node *of_node, const char *name) 423static int msm_hdmi_get_gpio(struct device_node *of_node, const char *name)
424{ 424{
425 int gpio = of_get_named_gpio(of_node, name, 0); 425 int gpio;
426
427 /* try with the gpio names as in the table (downstream bindings) */
428 gpio = of_get_named_gpio(of_node, name, 0);
426 if (gpio < 0) { 429 if (gpio < 0) {
427 char name2[32]; 430 char name2[32];
428 snprintf(name2, sizeof(name2), "%s-gpio", name); 431
432 /* try with the gpio names as in the upstream bindings */
433 snprintf(name2, sizeof(name2), "%s-gpios", name);
429 gpio = of_get_named_gpio(of_node, name2, 0); 434 gpio = of_get_named_gpio(of_node, name2, 0);
430 if (gpio < 0) { 435 if (gpio < 0) {
436 char name3[32];
437
438 /*
439 * try again after stripping out the "qcom,hdmi-tx"
440 * prefix. This is mainly to match "hpd-gpios" used
441 * in the upstream bindings
442 */
443 if (sscanf(name2, "qcom,hdmi-tx-%s", name3))
444 gpio = of_get_named_gpio(of_node, name3, 0);
445 }
446
447 if (gpio < 0) {
431 DBG("failed to get gpio: %s (%d)", name, gpio); 448 DBG("failed to get gpio: %s (%d)", name, gpio);
432 gpio = -1; 449 gpio = -1;
433 } 450 }