Re: [PATCH] drm/msm/hdmi: enable lpm-mux if it is present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 31, 2014 at 10:46 AM, Stephane Viau <sviau@xxxxxxxxxxxxxx> wrote:
> From: Beeresh Gopal <gbeeresh@xxxxxxxxxxxxxx>
>
> lpm-mux is programmed to enable HDMI connector
> on the docking station for S805 chipset based
> devices.
>
> Signed-off-by: Beeresh Gopal <gbeeresh@xxxxxxxxxxxxxx>

other than the issues Andreas mentioned, it looks good, so with those addressed:

Reviewed-by: Rob Clark <robdclark@xxxxxxxxx>


> ---
>  drivers/gpu/drm/msm/hdmi/hdmi.c           |  1 +
>  drivers/gpu/drm/msm/hdmi/hdmi.h           |  1 +
>  drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 24 +++++++++++++++++++++++-
>  3 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
> index bb1f696..f2c92e6 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
> @@ -453,6 +453,7 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
>         config.hpd_gpio      = get_gpio("qcom,hdmi-tx-hpd");
>         config.mux_en_gpio   = get_gpio("qcom,hdmi-tx-mux-en");
>         config.mux_sel_gpio  = get_gpio("qcom,hdmi-tx-mux-sel");
> +       config.mux_lpm_gpio  = get_gpio("qcom,hdmi-tx-mux-lpm");
>         config.shared_irq    = true;
>
>  #else
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h
> index 0a077b0..323ceb7 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi.h
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h
> @@ -103,6 +103,7 @@ struct hdmi_platform_config {
>
>         /* gpio's: */
>         int ddc_clk_gpio, ddc_data_gpio, hpd_gpio, mux_en_gpio, mux_sel_gpio;
> +       int mux_lpm_gpio;
>
>         /* older devices had their own irq, mdp5+ it is shared w/ mdp: */
>         bool shared_irq;
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
> index 93d1551..1301d03 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
> @@ -63,7 +63,8 @@ static int gpio_config(struct hdmi *hdmi, bool on)
>                         ret = gpio_request(config->mux_en_gpio, "HDMI_MUX_EN");
>                         if (ret) {
>                                 dev_err(dev->dev, "'%s'(%d) gpio_request failed: %d\n",
> -                                       "HDMI_MUX_SEL", config->mux_en_gpio, ret);
> +                                       "HDMI_MUX_EN",
> +                                       config->mux_en_gpio, ret);
>                                 goto error4;
>                         }
>                         gpio_set_value_cansleep(config->mux_en_gpio, 1);
> @@ -78,6 +79,19 @@ static int gpio_config(struct hdmi *hdmi, bool on)
>                         }
>                         gpio_set_value_cansleep(config->mux_sel_gpio, 0);
>                 }
> +
> +               if (config->mux_lpm_gpio != -1) {
> +                       ret = gpio_request(config->mux_lpm_gpio,
> +                                       "HDMI_MUX_LPM");
> +                       if (ret) {
> +                               dev_err(dev->dev,
> +                                       "'%s'(%d) gpio_request failed: %d\n",
> +                                       "HDMI_MUX_LPM",
> +                                       config->mux_lpm_gpio, ret);
> +                               goto error6;
> +                       }
> +                       gpio_set_value_cansleep(config->mux_lpm_gpio, 1);
> +               }
>                 DBG("gpio on");
>         } else {
>                 gpio_free(config->ddc_clk_gpio);
> @@ -93,11 +107,19 @@ static int gpio_config(struct hdmi *hdmi, bool on)
>                         gpio_set_value_cansleep(config->mux_sel_gpio, 1);
>                         gpio_free(config->mux_sel_gpio);
>                 }
> +
> +               if (config->mux_lpm_gpio != -1) {
> +                       gpio_set_value_cansleep(config->mux_lpm_gpio, 0);
> +                       gpio_free(config->mux_lpm_gpio);
> +               }
>                 DBG("gpio off");
>         }
>
>         return 0;
>
> +error6:
> +       if (config->mux_sel_gpio != -1)
> +               gpio_free(config->mux_sel_gpio);
>  error5:
>         if (config->mux_en_gpio != -1)
>                 gpio_free(config->mux_en_gpio);
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> hosted by The Linux Foundation
>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux