diff options
author | Tom Rini <trini@konsulko.com> | 2018-11-29 16:36:53 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-11-29 16:36:53 -0500 |
commit | 6d4a3ff2649faa2cf2739e332557f256cc34831e (patch) | |
tree | 0d732648670188246051bd404544c3612f920d62 /drivers/gpio/dwapb_gpio.c | |
parent | 93e72ac472b537bb4b0c6a97a7e6aab2b37860c6 (diff) | |
parent | 30bade20a67a8205e10d006d8e1ac66552c1b137 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
Diffstat (limited to 'drivers/gpio/dwapb_gpio.c')
-rw-r--r-- | drivers/gpio/dwapb_gpio.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c index 68836a7902..e55fb4ac73 100644 --- a/drivers/gpio/dwapb_gpio.c +++ b/drivers/gpio/dwapb_gpio.c @@ -180,6 +180,13 @@ static int gpio_dwapb_bind(struct udevice *dev) plat->pins = fdtdec_get_int(blob, node, "snps,nr-gpios", 0); plat->name = fdt_stringlist_get(blob, node, "bank-name", 0, NULL); + if (!plat->name) { + /* + * Fall back to node name. This means accessing pins + * via bank name won't work. + */ + plat->name = fdt_get_name(blob, node, NULL); + } ret = device_bind(dev, dev->driver, plat->name, plat, -1, &subdev); |