]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
gpio: Update for new sequence numbers
authorSimon Glass <sjg@chromium.org>
Thu, 17 Dec 2020 04:20:24 +0000 (21:20 -0700)
committerSimon Glass <sjg@chromium.org>
Sat, 19 Dec 2020 03:32:21 +0000 (20:32 -0700)
Use the dev_seq() sequence number in all cases.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/gpio/imx_rgpio2p.c
drivers/gpio/iproc_gpio.c
drivers/gpio/mvebu_gpio.c
drivers/gpio/mxc_gpio.c
drivers/gpio/vybrid_gpio.c

index 70ced75ea721a23baac957859f8c3cf26c499cb8..17edd40c5c56c1c847a1b5aa973aa110272ca70c 100644 (file)
@@ -183,7 +183,7 @@ static int imx_rgpio2p_bind(struct udevice *dev)
                return -ENOMEM;
 
        plat->regs = (struct gpio_regs *)addr;
-       plat->bank_index = dev->req_seq;
+       plat->bank_index = dev_seq(dev);
        dev->plat = plat;
 
        return 0;
index 0561b36e54fac64865a664b71c084a06ad73ed72..8c143e9b75bc7154d080bea0935c69492ac86500 100644 (file)
@@ -252,7 +252,7 @@ static int iproc_gpio_of_to_plat(struct udevice *dev)
                return ret;
        }
 
-       snprintf(name, sizeof(name), "GPIO%d", dev->req_seq);
+       snprintf(name, sizeof(name), "GPIO%d", dev_seq(dev));
        plat->name = strdup(name);
        if (!plat->name)
                return -ENOMEM;
index 166fc668843f2c777bded8621a552208cb88482b..4c1c68ee19edfbde9463d04a8e0f28813d463c00 100644 (file)
@@ -92,7 +92,7 @@ static int mvebu_gpio_probe(struct udevice *dev)
 
        priv->regs = dev_read_addr_ptr(dev);
        uc_priv->gpio_count = MVEBU_GPIOS_PER_BANK;
-       priv->name[0] = 'A' + dev->req_seq;
+       priv->name[0] = 'A' + dev_seq(dev);
        uc_priv->bank_name = priv->name;
 
        return 0;
index 29d1bc3517f8c1eae91b153b18a6cb66f533f3f3..9fc217ae6ae8d1d45c092e81bc07f0f71c3368ea 100644 (file)
@@ -318,7 +318,7 @@ static int mxc_gpio_of_to_plat(struct udevice *dev)
 
                plat->regs = (struct gpio_regs *)addr;
        }
-       plat->bank_index = dev->req_seq;
+       plat->bank_index = dev_seq(dev);
 
        return 0;
 }
index 91c0308f2fb4e2fa1a26357a12cb9dfe542b1515..fcce90c53c269817360fee83fd485ab23b32c92b 100644 (file)
@@ -114,7 +114,7 @@ static int vybrid_gpio_odata_to_plat(struct udevice *dev)
                return -EINVAL;
 
        plat->base = base_addr;
-       plat->chip = dev->req_seq;
+       plat->chip = dev_seq(dev);
        plat->port_name = fdt_get_name(gd->fdt_blob, dev_of_offset(dev), NULL);
 
        return 0;