summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2024-02-05 12:16:27 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-02-08 08:41:06 +0100
commitfc1d6f60e2b320725095bf513b6be1cc59295d59 (patch)
tree4bc80ae5fe0b6890367f199c3c9aedc8ad84359e
parentc8bf88f4f96af2cf67dd6cda9c9374d3fc07e26f (diff)
downloadbarebox-fc1d6f60e2b3.tar.gz
barebox-fc1d6f60e2b3.tar.xz
gpio-vf610: always register 32 GPIOs
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. Link: https://lore.barebox.org/20240205111627.2397633-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/gpio/gpio-vf610.c2
1 files changed, 1 insertions, 1 deletions
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