public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
To: Stephane Viau <sviau@codeaurora.org>
Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, robdclark@gmail.com
Subject: Re: [PATCH] drm/msm/hdmi: Use pinctrl in HDMI driver
Date: Fri, 29 May 2015 17:56:50 +0300	[thread overview]
Message-ID: <1432911410.6844.9.camel@mm-sol.com> (raw)
In-Reply-To: <1432907385-19772-1-git-send-email-sviau@codeaurora.org>


Hi Stephane,

On Fri, 2015-05-29 at 09:49 -0400, Stephane Viau wrote:
> 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>
> ---
>  drivers/gpu/drm/msm/hdmi/hdmi.c           | 25 +++++++++++++++++++++++++
>  drivers/gpu/drm/msm/hdmi/hdmi.h           |  5 +++++
>  drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 31 +++++++++++++++++++++++++++++++
>  3 files changed, 61 insertions(+)
> 

No devicetree binding documentation?

>  static int hdmi_bind(struct device *dev, struct device *master, void *data)
> @@ -365,6 +379,7 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
>  #ifdef CONFIG_OF
>         struct device_node *of_node = dev->of_node;
>         const struct of_device_id *match;
> +       struct pinctrl *pinctrl;
> 
>         match = of_match_node(dt_match, of_node);
>         if (match && match->data) {
> @@ -383,6 +398,16 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
>         hdmi_cfg->mux_sel_gpio  = get_gpio(dev, of_node, "qcom,hdmi-tx-mux-sel");
>         hdmi_cfg->mux_lpm_gpio  = get_gpio(dev, of_node, "qcom,hdmi-tx-mux-lpm");
> 
> +       /* not all targets have pinctrl, do not fail in case of error: */
> +       pinctrl = devm_pinctrl_get(dev);
> +       if (IS_ERR_OR_NULL(pinctrl)) {
> +               dev_warn(dev, "cannot get pinctrl: %s\n", of_node->name);
> +       } else {
> +               hdmi_cfg->active  = get_pinctrl_state(dev, pinctrl, "hdmi_active");
> +               hdmi_cfg->sleep   = get_pinctrl_state(dev, pinctrl, "hdmi_sleep");

How this differs from PINCTRL_STATE_DEFAULT and PINCTRL_STATE_SLEEP?

Regards,
Ivan

      reply	other threads:[~2015-05-29 14:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29 13:49 [PATCH] drm/msm/hdmi: Use pinctrl in HDMI driver Stephane Viau
2015-05-29 14:56 ` Ivan T. Ivanov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432911410.6844.9.camel@mm-sol.com \
    --to=iivanov@mm-sol.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=sviau@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox