[PATCH v3 19/28] gpio: Update for new sequence numbers

Simon Glass sjg at chromium.org
Thu Dec 17 05:20:24 CET 2020


Use the dev_seq() sequence number in all cases.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 drivers/gpio/imx_rgpio2p.c | 2 +-
 drivers/gpio/iproc_gpio.c  | 2 +-
 drivers/gpio/mvebu_gpio.c  | 2 +-
 drivers/gpio/mxc_gpio.c    | 2 +-
 drivers/gpio/vybrid_gpio.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c
index 70ced75ea72..17edd40c5c5 100644
--- a/drivers/gpio/imx_rgpio2p.c
+++ b/drivers/gpio/imx_rgpio2p.c
@@ -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;
diff --git a/drivers/gpio/iproc_gpio.c b/drivers/gpio/iproc_gpio.c
index 0561b36e54f..8c143e9b75b 100644
--- a/drivers/gpio/iproc_gpio.c
+++ b/drivers/gpio/iproc_gpio.c
@@ -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;
diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
index 166fc668843..4c1c68ee19e 100644
--- a/drivers/gpio/mvebu_gpio.c
+++ b/drivers/gpio/mvebu_gpio.c
@@ -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;
diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index 29d1bc3517f..9fc217ae6ae 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -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;
 }
diff --git a/drivers/gpio/vybrid_gpio.c b/drivers/gpio/vybrid_gpio.c
index 91c0308f2fb..fcce90c53c2 100644
--- a/drivers/gpio/vybrid_gpio.c
+++ b/drivers/gpio/vybrid_gpio.c
@@ -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;
-- 
2.29.2.684.gfbc64c5ab5-goog



More information about the U-Boot mailing list