mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-24 14:25:56 +00:00
gpio: dw: Add ngpios DT-property support
Starting with Linux commit 7569486d79ae ("gpio: dwapb: Add ngpios DT-property support") the "snps,nr-gpios" property was marked as deprecated. And since all newly added dw-apb-gpio nodes are described using generic "ngpios" property, it's time to add support for it. Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
This commit is contained in:
parent
faf82cc695
commit
370806854e
1 changed files with 3 additions and 1 deletions
|
@ -177,6 +177,8 @@ static int gpio_dwapb_bind(struct udevice *dev)
|
||||||
|
|
||||||
plat->base = (void *)base;
|
plat->base = (void *)base;
|
||||||
plat->bank = bank;
|
plat->bank = bank;
|
||||||
|
|
||||||
|
if (ofnode_read_u32(node, "ngpios", &plat->pins))
|
||||||
plat->pins = ofnode_read_u32_default(node, "snps,nr-gpios", 0);
|
plat->pins = ofnode_read_u32_default(node, "snps,nr-gpios", 0);
|
||||||
|
|
||||||
if (ofnode_read_string_index(node, "bank-name", 0,
|
if (ofnode_read_string_index(node, "bank-name", 0,
|
||||||
|
|
Loading…
Add table
Reference in a new issue