From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Linus Walleij <linus.walleij@linaro.org>,
linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH 1/2] pinctrl: sh-pfc: Do not unconditionally support PIN_CONFIG_BIAS_DISABLE
Date: Thu, 03 Nov 2016 18:55:30 +0200 [thread overview]
Message-ID: <1878224.Wij8B8yE4Q@avalon> (raw)
In-Reply-To: <20161103153421.15527-2-niklas.soderlund+renesas@ragnatech.se>
Hi Niklas,
Thank you for the patch.
On Thursday 03 Nov 2016 16:34:20 Niklas Söderlund wrote:
> Always stating PIN_CONFIG_BIAS_DISABLE is supported gives untrue output
> when examining /sys/kernel/debug/pinctrl/e6060000.pfc/pinconf-pins if
> the operation get_bias() are implemented but the pin are not handled by
> the get_bias() implementation. In that case the output will state that
> "input bias disabled" indicating that this pin have bias control
> support.
>
> Make support for PIN_CONFIG_BIAS_DISABLE depend on that the pin either
> support SH_PFC_PIN_CFG_PULL_UP or SH_PFC_PIN_CFG_PULL_DOWN. This also
> solves the issue where SoC specific implementations print error messages
> if there particular implementation of {set,get}_bias() is called with a
> pin it do not know about.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/pinctrl/sh-pfc/pinctrl.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c
> b/drivers/pinctrl/sh-pfc/pinctrl.c index c577258..fcacfa7 100644
> --- a/drivers/pinctrl/sh-pfc/pinctrl.c
> +++ b/drivers/pinctrl/sh-pfc/pinctrl.c
> @@ -570,7 +570,8 @@ static bool sh_pfc_pinconf_validate(struct sh_pfc *pfc,
> unsigned int _pin,
>
> switch (param) {
> case PIN_CONFIG_BIAS_DISABLE:
> - return true;
> + return pin->configs &
> + (SH_PFC_PIN_CFG_PULL_UP | SH_PFC_PIN_CFG_PULL_DOWN);
>
> case PIN_CONFIG_BIAS_PULL_UP:
> return pin->configs & SH_PFC_PIN_CFG_PULL_UP;
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2016-11-03 16:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 15:34 [PATCH 0/2] pinctrl: sh-pfc: Fixups for bias handeling Niklas Söderlund
2016-11-03 15:34 ` [PATCH 1/2] pinctrl: sh-pfc: Do not unconditionally support PIN_CONFIG_BIAS_DISABLE Niklas Söderlund
2016-11-03 16:55 ` Laurent Pinchart [this message]
2016-11-07 10:33 ` Geert Uytterhoeven
2016-11-03 15:34 ` [PATCH 2/2] pinctrl: sh-pfc: r8a7795: Use lookup function for bias data Niklas Söderlund
2016-11-03 17:10 ` Laurent Pinchart
2016-11-03 19:26 ` Niklas Söderlund
2016-11-07 10:57 ` Geert Uytterhoeven
2016-11-07 12:23 ` Niklas Söderlund
2016-11-09 10:43 ` Laurent Pinchart
2016-11-09 12:30 ` Geert Uytterhoeven
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=1878224.Wij8B8yE4Q@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=geert+renesas@glider.be \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
/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