* [PATCH v1 1/1] pinctrl: intel: Show the GPIO base calculation explicitly
@ 2021-03-08 16:49 Andy Shevchenko
2021-03-08 16:51 ` Mika Westerberg
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2021-03-08 16:49 UTC (permalink / raw)
To: Andy Shevchenko, Mika Westerberg, linux-gpio, linux-kernel
Cc: Andy Shevchenko, Linus Walleij, Maximilian Luz
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.
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>
---
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 e015345bf8f4..795d60d9ebba 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -1356,6 +1356,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;
}
@@ -1392,6 +1393,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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] pinctrl: intel: Show the GPIO base calculation explicitly
2021-03-08 16:49 [PATCH v1 1/1] pinctrl: intel: Show the GPIO base calculation explicitly Andy Shevchenko
@ 2021-03-08 16:51 ` Mika Westerberg
0 siblings, 0 replies; 2+ messages in thread
From: Mika Westerberg @ 2021-03-08 16:51 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-gpio, linux-kernel, Andy Shevchenko, Linus Walleij,
Maximilian Luz
On Mon, Mar 08, 2021 at 06:49:10PM +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.
>
> 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>
I think this needs stable tag too.
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-08 16:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-08 16:49 [PATCH v1 1/1] pinctrl: intel: Show the GPIO base calculation explicitly Andy Shevchenko
2021-03-08 16:51 ` Mika Westerberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).