diff mbox series

[RFC,v4,net-next,11/23] pinctrl: ocelot: update pinctrl to automatic base address

Message ID 20211116062328.1949151-12-colin.foster@in-advantage.com
State Accepted
Commit a159c2b4cb7517fe11f3ce698f792126e964fc7a
Headers show
Series None | expand

Commit Message

Colin Foster Nov. 16, 2021, 6:23 a.m. UTC
struct gpio_chip recommends passing -1 as base to gpiolib. Doing so avoids
conflicts when the chip is external and gpiochip0 already exists.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
---
 drivers/pinctrl/pinctrl-ocelot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index cc7fb0556169..f015404c425c 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -1308,7 +1308,7 @@  static int ocelot_gpiochip_register(struct platform_device *pdev,
 	gc = &info->gpio_chip;
 	gc->ngpio = info->desc->npins;
 	gc->parent = &pdev->dev;
-	gc->base = 0;
+	gc->base = -1;
 	gc->of_node = info->dev->of_node;
 	gc->label = "ocelot-gpio";