From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
stable@vger.kernel.org, Maximilian Luz <luzmaximilian@gmail.com>
Subject: Re: [PATCH v2 1/1] pinctrl: intel: Show the GPIO base calculation explicitly
Date: Mon, 8 Mar 2021 19:21:44 +0200 [thread overview]
Message-ID: <YEZdKLY2loUg66Ti@smile.fi.intel.com> (raw)
In-Reply-To: <20210308170842.88555-1-andriy.shevchenko@linux.intel.com>
On Mon, Mar 08, 2021 at 07:08:42PM +0200, Andy Shevchenko wrote:
> During the split of intel_pinctrl_add_padgroups(), the _by_size() variant
> missed the GPIO base calculations and hence made unable to retrieve proper
> GPIO number.
>
> Assign the gpio_base explicitly in _by_size() variant.
>
> While at it, differentiate NOMAP case with the rest in _by_gpps() variant.
Meanwhile pushed to my review and testing queue, thanks!
> Fixes: 036e126c72eb ("pinctrl: intel: Split intel_pinctrl_add_padgroups() for better maintenance")
> Reported-and-tested-by: Maximilian Luz <luzmaximilian@gmail.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
> v2: added tag and Cc'ed to stable@ (Mika)
> drivers/pinctrl/intel/pinctrl-intel.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
> index 8085782cd8f9..7283203861ae 100644
> --- a/drivers/pinctrl/intel/pinctrl-intel.c
> +++ b/drivers/pinctrl/intel/pinctrl-intel.c
> @@ -1357,6 +1357,7 @@ static int intel_pinctrl_add_padgroups_by_gpps(struct intel_pinctrl *pctrl,
> gpps[i].gpio_base = 0;
> break;
> case INTEL_GPIO_BASE_NOMAP:
> + break;
> default:
> break;
> }
> @@ -1393,6 +1394,7 @@ static int intel_pinctrl_add_padgroups_by_size(struct intel_pinctrl *pctrl,
> gpps[i].size = min(gpp_size, npins);
> npins -= gpps[i].size;
>
> + gpps[i].gpio_base = gpps[i].base;
> gpps[i].padown_num = padown_num;
>
> /*
> --
> 2.30.1
>
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2021-03-08 17:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-08 17:08 [PATCH v2 1/1] pinctrl: intel: Show the GPIO base calculation explicitly Andy Shevchenko
2021-03-08 17:21 ` Andy Shevchenko [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=YEZdKLY2loUg66Ti@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luzmaximilian@gmail.com \
--cc=mika.westerberg@linux.intel.com \
--cc=stable@vger.kernel.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