* [PATCH v2 0/2] pinctrl: ocelot: Add fixes for ocelot driver
@ 2022-03-04 14:44 Horatiu Vultur
2022-03-04 14:44 ` [PATCH v2 1/2] pinctrl: ocelot: Fix the pincfg resource Horatiu Vultur
2022-03-04 14:44 ` [PATCH v2 2/2] pinctrl: ocelot: Fix interrupt parsing Horatiu Vultur
0 siblings, 2 replies; 8+ messages in thread
From: Horatiu Vultur @ 2022-03-04 14:44 UTC (permalink / raw)
To: linux-gpio, linux-kernel
Cc: linus.walleij, colin.foster, andriy.shevchenko, Horatiu Vultur
This contains two fixes for the ocelot pinctrl:
- first fixes the memory resource index for pincfg
- second fixes the interrupt parsing
v1->v2:
- add Reviewed-by tag for patch 1
- use platform_get_irq_optional instead of irq_of_parse_and_map
Horatiu Vultur (2):
pinctrl: ocelot: Fix the pincfg resource.
pinctrl: ocelot: Fix interrupt parsing
drivers/pinctrl/pinctrl-ocelot.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.33.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/2] pinctrl: ocelot: Fix the pincfg resource.
2022-03-04 14:44 [PATCH v2 0/2] pinctrl: ocelot: Add fixes for ocelot driver Horatiu Vultur
@ 2022-03-04 14:44 ` Horatiu Vultur
2022-03-07 12:45 ` Michael Walle
2022-03-04 14:44 ` [PATCH v2 2/2] pinctrl: ocelot: Fix interrupt parsing Horatiu Vultur
1 sibling, 1 reply; 8+ messages in thread
From: Horatiu Vultur @ 2022-03-04 14:44 UTC (permalink / raw)
To: linux-gpio, linux-kernel
Cc: linus.walleij, colin.foster, andriy.shevchenko, Horatiu Vultur
The pincfg resources are in the second memory resource. But the driver
still tries to access the first memory resource to get the pincfg. This
is wrong therefore fix to access the second memory resource.
Reviewed-by: Colin Foster <colin.foster@in-advantage.com>
Fixes: ad96111e658a95 ("pinctrl: ocelot: combine get resource and ioremap into single call")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
drivers/pinctrl/pinctrl-ocelot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index 685c79e08d40..a859fbcb09af 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -1892,7 +1892,7 @@ static struct regmap *ocelot_pinctrl_create_pincfg(struct platform_device *pdev)
.max_register = 32,
};
- base = devm_platform_ioremap_resource(pdev, 0);
+ base = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(base)) {
dev_dbg(&pdev->dev, "Failed to ioremap config registers (no extended pinconf)\n");
return NULL;
--
2.33.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/2] pinctrl: ocelot: Fix interrupt parsing
2022-03-04 14:44 [PATCH v2 0/2] pinctrl: ocelot: Add fixes for ocelot driver Horatiu Vultur
2022-03-04 14:44 ` [PATCH v2 1/2] pinctrl: ocelot: Fix the pincfg resource Horatiu Vultur
@ 2022-03-04 14:44 ` Horatiu Vultur
2022-03-15 0:52 ` Linus Walleij
1 sibling, 1 reply; 8+ messages in thread
From: Horatiu Vultur @ 2022-03-04 14:44 UTC (permalink / raw)
To: linux-gpio, linux-kernel
Cc: linus.walleij, colin.foster, andriy.shevchenko, Horatiu Vultur
In the blamed commit, it removes the duplicate of_node assignment in the
driver. But the driver uses this before calling into of_gpio_dev_init to
determine if it needs to assign an IRQ chip to the GPIO. The fixes
consists in using the platform_get_irq_optional
Fixes: 8a8d6bbe1d3bc7 ("pinctrl: Get rid of duplicate of_node assignment in the drivers")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
drivers/pinctrl/pinctrl-ocelot.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index a859fbcb09af..e8501dac2f04 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -1851,8 +1851,8 @@ static int ocelot_gpiochip_register(struct platform_device *pdev,
gc->base = -1;
gc->label = "ocelot-gpio";
- irq = irq_of_parse_and_map(gc->of_node, 0);
- if (irq) {
+ irq = platform_get_irq_optional(pdev, 0);
+ if (irq > 0) {
girq = &gc->irq;
girq->chip = &ocelot_irqchip;
girq->parent_handler = ocelot_irq_handler;
--
2.33.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: ocelot: Fix the pincfg resource.
2022-03-04 14:44 ` [PATCH v2 1/2] pinctrl: ocelot: Fix the pincfg resource Horatiu Vultur
@ 2022-03-07 12:45 ` Michael Walle
2022-03-08 8:30 ` Horatiu Vultur
0 siblings, 1 reply; 8+ messages in thread
From: Michael Walle @ 2022-03-07 12:45 UTC (permalink / raw)
To: horatiu.vultur
Cc: andriy.shevchenko, colin.foster, linus.walleij, linux-gpio,
linux-kernel, Michael Walle
> The pincfg resources are in the second memory resource. But the driver
> still tries to access the first memory resource to get the pincfg. This
> is wrong therefore fix to access the second memory resource.
>
> Reviewed-by: Colin Foster <colin.foster@in-advantage.com>
> Fixes: ad96111e658a95 ("pinctrl: ocelot: combine get resource and ioremap into single call")
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
There is already this patch pending, which does exactly
the same:
https://lore.kernel.org/linux-gpio/20220216082020.981797-1-michael@walle.cc/
FWIW, there is also this one:
https://lore.kernel.org/linux-gpio/20220216122727.1005041-1-michael@walle.cc/
-michael
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: ocelot: Fix the pincfg resource.
2022-03-07 12:45 ` Michael Walle
@ 2022-03-08 8:30 ` Horatiu Vultur
2022-03-08 8:31 ` Michael Walle
0 siblings, 1 reply; 8+ messages in thread
From: Horatiu Vultur @ 2022-03-08 8:30 UTC (permalink / raw)
To: Michael Walle
Cc: andriy.shevchenko, colin.foster, linus.walleij, linux-gpio, linux-kernel
The 03/07/2022 13:45, Michael Walle wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> > The pincfg resources are in the second memory resource. But the driver
> > still tries to access the first memory resource to get the pincfg. This
> > is wrong therefore fix to access the second memory resource.
> >
> > Reviewed-by: Colin Foster <colin.foster@in-advantage.com>
> > Fixes: ad96111e658a95 ("pinctrl: ocelot: combine get resource and ioremap into single call")
> > Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
>
> There is already this patch pending, which does exactly
> the same:
> https://lore.kernel.org/linux-gpio/20220216082020.981797-1-michael@walle.cc/
Sorry, I have missed your patch.
Should I resend this series where I will drop this patch? What is the
correct approach?
>
> FWIW, there is also this one:
> https://lore.kernel.org/linux-gpio/20220216122727.1005041-1-michael@walle.cc/
>
> -michael
--
/Horatiu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: ocelot: Fix the pincfg resource.
2022-03-08 8:30 ` Horatiu Vultur
@ 2022-03-08 8:31 ` Michael Walle
2022-03-15 0:51 ` Linus Walleij
0 siblings, 1 reply; 8+ messages in thread
From: Michael Walle @ 2022-03-08 8:31 UTC (permalink / raw)
To: Horatiu Vultur
Cc: andriy.shevchenko, colin.foster, linus.walleij, linux-gpio, linux-kernel
Am 2022-03-08 09:30, schrieb Horatiu Vultur:
> The 03/07/2022 13:45, Michael Walle wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know
>> the content is safe
>>
>> > The pincfg resources are in the second memory resource. But the driver
>> > still tries to access the first memory resource to get the pincfg. This
>> > is wrong therefore fix to access the second memory resource.
>> >
>> > Reviewed-by: Colin Foster <colin.foster@in-advantage.com>
>> > Fixes: ad96111e658a95 ("pinctrl: ocelot: combine get resource and ioremap into single call")
>> > Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
>>
>> There is already this patch pending, which does exactly
>> the same:
>> https://lore.kernel.org/linux-gpio/20220216082020.981797-1-michael@walle.cc/
>
> Sorry, I have missed your patch.
> Should I resend this series where I will drop this patch? What is the
> correct approach?
Actually, I don't know. Maybe you don't need to do anything, Linus?
-michael
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: ocelot: Fix the pincfg resource.
2022-03-08 8:31 ` Michael Walle
@ 2022-03-15 0:51 ` Linus Walleij
0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2022-03-15 0:51 UTC (permalink / raw)
To: Michael Walle
Cc: Horatiu Vultur, andriy.shevchenko, colin.foster, linux-gpio,
linux-kernel
On Tue, Mar 8, 2022 at 9:32 AM Michael Walle <michael@walle.cc> wrote:
> Am 2022-03-08 09:30, schrieb Horatiu Vultur:
> > The 03/07/2022 13:45, Michael Walle wrote:
> >> EXTERNAL EMAIL: Do not click links or open attachments unless you know
> >> the content is safe
> >>
> >> > The pincfg resources are in the second memory resource. But the driver
> >> > still tries to access the first memory resource to get the pincfg. This
> >> > is wrong therefore fix to access the second memory resource.
> >> >
> >> > Reviewed-by: Colin Foster <colin.foster@in-advantage.com>
> >> > Fixes: ad96111e658a95 ("pinctrl: ocelot: combine get resource and ioremap into single call")
> >> > Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> >>
> >> There is already this patch pending, which does exactly
> >> the same:
> >> https://lore.kernel.org/linux-gpio/20220216082020.981797-1-michael@walle.cc/
> >
> > Sorry, I have missed your patch.
> > Should I resend this series where I will drop this patch? What is the
> > correct approach?
>
> Actually, I don't know. Maybe you don't need to do anything, Linus?
I'll just apply 2/2 if applicable.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] pinctrl: ocelot: Fix interrupt parsing
2022-03-04 14:44 ` [PATCH v2 2/2] pinctrl: ocelot: Fix interrupt parsing Horatiu Vultur
@ 2022-03-15 0:52 ` Linus Walleij
0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2022-03-15 0:52 UTC (permalink / raw)
To: Horatiu Vultur; +Cc: linux-gpio, linux-kernel, colin.foster, andriy.shevchenko
On Fri, Mar 4, 2022 at 3:42 PM Horatiu Vultur
<horatiu.vultur@microchip.com> wrote:
> In the blamed commit, it removes the duplicate of_node assignment in the
> driver. But the driver uses this before calling into of_gpio_dev_init to
> determine if it needs to assign an IRQ chip to the GPIO. The fixes
> consists in using the platform_get_irq_optional
>
> Fixes: 8a8d6bbe1d3bc7 ("pinctrl: Get rid of duplicate of_node assignment in the drivers")
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-03-15 0:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 14:44 [PATCH v2 0/2] pinctrl: ocelot: Add fixes for ocelot driver Horatiu Vultur
2022-03-04 14:44 ` [PATCH v2 1/2] pinctrl: ocelot: Fix the pincfg resource Horatiu Vultur
2022-03-07 12:45 ` Michael Walle
2022-03-08 8:30 ` Horatiu Vultur
2022-03-08 8:31 ` Michael Walle
2022-03-15 0:51 ` Linus Walleij
2022-03-04 14:44 ` [PATCH v2 2/2] pinctrl: ocelot: Fix interrupt parsing Horatiu Vultur
2022-03-15 0:52 ` Linus Walleij
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.