aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAdam Ford2018-08-17 14:37:58 -0500
committerTom Rini2018-09-11 21:38:15 -0400
commit535f46dad920094df12b2d19f071db2e6a8ae0ab (patch)
treee801d809acebced3bb0326d31ebc0f8352ccebf8 /drivers
parentabb205ded1fe77ea03ccf3c5938ec0ca524e630a (diff)
GPIO: omap_gpio: Fix gpio name names with device tree
The GPIO bank numbers do not appear in the device tree, so this patch makes the gpio name based on the address (ie gpio@49054000_31 vs gpio4_31) adam Signed-off-by: Adam Ford <aford173@gmail.com> Tested-by: Derald D. Woods <woods.technical@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/omap_gpio.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c
index 651f6994e41..0f1ddeff929 100644
--- a/drivers/gpio/omap_gpio.c
+++ b/drivers/gpio/omap_gpio.c
@@ -288,11 +288,9 @@ static int omap_gpio_probe(struct udevice *dev)
struct gpio_bank *bank = dev_get_priv(dev);
struct omap_gpio_platdata *plat = dev_get_platdata(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
- int banknum;
char name[18], *str;
- banknum = plat->bank_index;
- sprintf(name, "GPIO%d_", banknum + 1);
+ sprintf(name, "gpio@%4x_", (unsigned int)plat->base);
str = strdup(name);
if (!str)
return -ENOMEM;