[PATCH] gpio-vf610: always register 32 GPIOs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux