diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2018-03-12 10:46:08 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-03-19 16:14:20 -0400 |
commit | f11c308ac20eb14eb7ce0c4a25987cb5462e017c (patch) | |
tree | 8cf97dad363274b5bdf07d3e13f23432ae661a9f /drivers | |
parent | d876eaf2be874b21ea293e77faa2f33ae5ad62cb (diff) |
gpio: stm32f7_gpio: handle node ngpios
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/stm32f7_gpio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/stm32f7_gpio.c b/drivers/gpio/stm32f7_gpio.c index 11bc66da9ba..376e86cd699 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); |