All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-arm-msm@vger.kernel.org,
	Doug Anderson <dianders@chromium.org>
Subject: Re: [PATCH] pinctrl: qcom: spmi-mpp: Fix drive strength setting
Date: Mon, 3 Sep 2018 13:58:09 -0700	[thread overview]
Message-ID: <20180903205809.GC1437@tuxbook-pro> (raw)
In-Reply-To: <20180831005852.156465-1-swboyd@chromium.org>

On Thu 30 Aug 17:58 PDT 2018, Stephen Boyd wrote:

> It looks like we parse the drive strength setting here, but never
> actually write it into the hardware to update it. Parse the setting and
> then write it at the end of the pinconf setting function so that it
> actually sticks in the hardware.
> 
> Fixes: 0e948042c420 ("pinctrl: qcom: spmi-mpp: Implement support for sink mode")
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Doug Anderson <dianders@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> index 6556dbeae65e..1793a4d05e15 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> @@ -455,7 +455,7 @@ static int pmic_mpp_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
>  			pad->dtest = arg;
>  			break;
>  		case PIN_CONFIG_DRIVE_STRENGTH:
> -			arg = pad->drive_strength;
> +			pad->drive_strength = arg;
>  			break;
>  		case PMIC_MPP_CONF_AMUX_ROUTE:
>  			if (arg >= PMIC_MPP_AMUX_ROUTE_ABUS4)
> @@ -502,6 +502,10 @@ static int pmic_mpp_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
>  	if (ret < 0)
>  		return ret;
>  
> +	ret = pmic_mpp_write(state, pad, PMIC_MPP_REG_SINK_CTL, pad->drive_strength);
> +	if (ret < 0)
> +		return ret;
> +
>  	val = pad->is_enabled << PMIC_MPP_REG_MASTER_EN_SHIFT;
>  
>  	return pmic_mpp_write(state, pad, PMIC_MPP_REG_EN_CTL, val);
> -- 
> Sent by a computer through tubes
> 

  reply	other threads:[~2018-09-03 20:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31  0:58 [PATCH] pinctrl: qcom: spmi-mpp: Fix drive strength setting Stephen Boyd
2018-09-03 20:58 ` Bjorn Andersson [this message]
2018-09-10  7:31 ` Linus Walleij

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=20180903205809.GC1437@tuxbook-pro \
    --to=bjorn.andersson@linaro.org \
    --cc=dianders@chromium.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swboyd@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.