]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
gpio: stm32f7_gpio: handle node ngpios
authorPatrick Delaunay <patrick.delaunay@st.com>
Mon, 12 Mar 2018 09:46:08 +0000 (10:46 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 19 Mar 2018 20:14:20 +0000 (16:14 -0400)
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
drivers/gpio/stm32f7_gpio.c

index 11bc66da9ba08b9fba115485c680be5068c9bcb1..376e86cd6995b61b46e89af00d89d37e1ee3309c 100644 (file)
@@ -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);