[U-Boot] [PATCH 06/16] gpio: stm32f7_gpio: handle node ngpios

Patrick Delaunay patrick.delaunay at st.com
Mon Mar 5 14:24:33 UTC 2018


Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
---

 drivers/gpio/stm32f7_gpio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/stm32f7_gpio.c b/drivers/gpio/stm32f7_gpio.c
index 11bc66d..376e86c 100644
--- a/drivers/gpio/stm32f7_gpio.c
+++ b/drivers/gpio/stm32f7_gpio.c
@@ -90,7 +90,8 @@ static int gpio_stm32_probe(struct udevice *dev)
 	if (!name)
 		return -EINVAL;
 	uc_priv->bank_name = name;
-	uc_priv->gpio_count = STM32_GPIOS_PER_BANK;
+	uc_priv->gpio_count = dev_read_u32_default(dev, "ngpios",
+						   STM32_GPIOS_PER_BANK);
 	debug("%s, addr = 0x%p, bank_name = %s\n", __func__, (u32 *)priv->regs,
 	      uc_priv->bank_name);
 
-- 
2.7.4



More information about the U-Boot mailing list