mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-16 23:07:00 +00:00
gpio: mvebu_gpio: Read number of gpios from DT
Device tree property "ngpios" contains number of gpios. Use it when available. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
7d8bb89d56
commit
dc986c600f
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ static int mvebu_gpio_probe(struct udevice *dev)
|
|||
struct mvebu_gpio_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->regs = dev_read_addr_ptr(dev);
|
||||
uc_priv->gpio_count = MVEBU_GPIOS_PER_BANK;
|
||||
uc_priv->gpio_count = dev_read_u32_default(dev, "ngpios", MVEBU_GPIOS_PER_BANK);
|
||||
priv->name[0] = 'A' + dev_seq(dev);
|
||||
uc_priv->bank_name = priv->name;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue