public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: linus.walleij@linaro.org, wens@csie.org, samuel@sholland.org,
	linux-gpio@vger.kernel.org,
	Andrei Lalaev <andrey.lalaev@gmail.com>
Cc: linux-sunxi@lists.linux.dev, Andrei Lalaev <andrey.lalaev@gmail.com>
Subject: Re: [PATCH] pinctrl: sunxi: sunxi_pconf_set: use correct offset
Date: Thu, 26 May 2022 22:52:35 +0200	[thread overview]
Message-ID: <8939552.CDJkKcVGEf@kista> (raw)
In-Reply-To: <20220525190423.410609-1-andrey.lalaev@gmail.com>

Hi!

Dne sreda, 25. maj 2022 ob 21:04:25 CEST je Andrei Lalaev napisal(a):
> Some Allwinner SoCs have 2 pinctrls (PIO and R_PIO).
> Previous implementation used absolute pin numbering and it was incorrect
> for R_PIO pinctrl.
> It's necessary to take into account the base pin number.

You didn't explain how issue manifests. How did you find it?

Best regards,
Jernej

> 
> Fixes: 90be64e27621 ("pinctrl: sunxi: implement pin_config_set")
> Signed-off-by: Andrei Lalaev <andrey.lalaev@gmail.com>
> ---
>  drivers/pinctrl/sunxi/pinctrl-sunxi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/
pinctrl-sunxi.c
> index d9327d7d56ee..dd928402af99 100644
> --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
> +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
> @@ -544,6 +544,8 @@ static int sunxi_pconf_set(struct pinctrl_dev *pctldev, 
unsigned pin,
>  	struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
>  	int i;
>  
> +	pin -= pctl->desc->pin_base;
> +
>  	for (i = 0; i < num_configs; i++) {
>  		enum pin_config_param param;
>  		unsigned long flags;
> -- 
> 2.25.1
> 
> 



  reply	other threads:[~2022-05-26 20:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 19:04 [PATCH] pinctrl: sunxi: sunxi_pconf_set: use correct offset Andrei Lalaev
2022-05-26 20:52 ` Jernej Škrabec [this message]
2022-06-15 18:06   ` Andrei Lalaev
2022-06-15 13:17 ` Linus Walleij
2022-06-15 15:56   ` Jernej Škrabec
2022-06-17  4:32     ` Samuel Holland
2022-06-27  9:27 ` 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=8939552.CDJkKcVGEf@kista \
    --to=jernej.skrabec@gmail.com \
    --cc=andrey.lalaev@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=samuel@sholland.org \
    --cc=wens@csie.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