[PATCH] gpio-vf610: always register 32 GPIOs

Sascha Hauer s.hauer at pengutronix.de
Mon Feb 5 03:16:27 PST 2024


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 at 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




More information about the barebox mailing list