* [PATCH] gpio-vf610: always register 32 GPIOs
@ 2024-02-05 11:16 Sascha Hauer
2024-02-08 7:41 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2024-02-05 11:16 UTC (permalink / raw)
To: Barebox List
The gpio-vf610 driver used to parse the number of GPIOs to register from
the gpio-ranges property. This was ok to do when the gpio-ranges
property only contained a single entry like on the vf610. On i.MX93 we
have multiple entries though, so the first entry doesn't contain the
full number of GPIOs the device supports. We would have to parse all
entries instead. That doesn't give us any gain though, we can equally
well just register the maximum of 32 GPIOs and just have a few GPIOs
registered that are not pinmuxed to the outside.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/gpio/gpio-vf610.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index 510ee74333..7c535c2e5e 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -177,7 +177,7 @@ static int vf610_gpio_probe(struct device *dev)
port->need_pinctrl = devtype->need_pinctrl;
port->pinctrl_base = be32_to_cpu(gpio_ranges[PINCTRL_BASE]);
- port->chip.ngpio = be32_to_cpu(gpio_ranges[COUNT]);
+ port->chip.ngpio = 32;
/*
* Some old bindings have two register ranges. When we have two ranges
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] gpio-vf610: always register 32 GPIOs
2024-02-05 11:16 [PATCH] gpio-vf610: always register 32 GPIOs Sascha Hauer
@ 2024-02-08 7:41 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-02-08 7:41 UTC (permalink / raw)
To: Barebox List, Sascha Hauer
On Mon, 05 Feb 2024 12:16:27 +0100, Sascha Hauer wrote:
> The gpio-vf610 driver used to parse the number of GPIOs to register from
> the gpio-ranges property. This was ok to do when the gpio-ranges
> property only contained a single entry like on the vf610. On i.MX93 we
> have multiple entries though, so the first entry doesn't contain the
> full number of GPIOs the device supports. We would have to parse all
> entries instead. That doesn't give us any gain though, we can equally
> well just register the maximum of 32 GPIOs and just have a few GPIOs
> registered that are not pinmuxed to the outside.
>
> [...]
Applied, thanks!
[1/1] gpio-vf610: always register 32 GPIOs
https://git.pengutronix.de/cgit/barebox/commit/?id=fc1d6f60e2b3 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-08 7:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-05 11:16 [PATCH] gpio-vf610: always register 32 GPIOs Sascha Hauer
2024-02-08 7:41 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox