diff options
author | Stephane Viau <sviau@codeaurora.org> | 2015-06-04 17:31:42 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2015-06-11 13:11:06 -0400 |
commit | 865807d0a96934593bc143e374b353d9c17e977f (patch) | |
tree | 24520043ce4955bd26e7568db6d8fcb1a336a5be /drivers/gpu/drm/msm/hdmi | |
parent | 5e4eb82fc23bafa76b0b010f41401eb75db9a851 (diff) | |
download | op-kernel-dev-865807d0a96934593bc143e374b353d9c17e977f.zip op-kernel-dev-865807d0a96934593bc143e374b353d9c17e977f.tar.gz |
drm/msm/hdmi: Use pinctrl in HDMI driver
Some targets (eg: msm8994) use the pinctrl framework to configure
interface pins. This change adds support for initialization and
pinctrl active/sleep state control for the HDMI driver.
Signed-off-by: Stephane Viau <sviau@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/hdmi')
-rw-r--r-- | drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c index bf72ad6..54aa93f 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c @@ -16,6 +16,7 @@ */ #include <linux/gpio.h> +#include <linux/pinctrl/consumer.h> #include "msm_kms.h" #include "hdmi.h" @@ -150,6 +151,12 @@ static int hpd_enable(struct hdmi_connector *hdmi_connector) } } + ret = pinctrl_pm_select_default_state(dev); + if (ret) { + dev_err(dev, "pinctrl state chg failed: %d\n", ret); + goto fail; + } + ret = gpio_config(hdmi, true); if (ret) { dev_err(dev, "failed to configure GPIOs: %d\n", ret); @@ -219,6 +226,10 @@ static void hdp_disable(struct hdmi_connector *hdmi_connector) if (ret) dev_warn(dev, "failed to unconfigure GPIOs: %d\n", ret); + ret = pinctrl_pm_select_sleep_state(dev); + if (ret) + dev_warn(dev, "pinctrl state chg failed: %d\n", ret); + for (i = 0; i < config->hpd_reg_cnt; i++) { ret = regulator_disable(hdmi->hpd_regs[i]); if (ret) |