linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gpio: vf610: switch to dynamic allocat GPIO base
@ 2023-05-06  8:59 haibo.chen
  2023-05-06  8:59 ` [PATCH 2/2] gpio: mxc: " haibo.chen
  2023-05-06 13:04 ` [PATCH 1/2] gpio: vf610: " Linus Walleij
  0 siblings, 2 replies; 13+ messages in thread
From: haibo.chen @ 2023-05-06  8:59 UTC (permalink / raw)
  To: linus.walleij, brgl
  Cc: linux-gpio, linux-kernel, linux-imx, haibo.chen, christophe.leroy

From: Haibo Chen <haibo.chen@nxp.com>

gpiolib want to get completely rid of static gpiobase allocation,
so switch to dynamic allocat GPIO base, also can avoid warning
message:

[    1.529974] gpio gpiochip0: Static allocation of GPIO base
is deprecated, use dynamic allocation.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 drivers/gpio/gpio-vf610.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index d3f3a69d4907..70e16cef7738 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -259,7 +259,6 @@ static void vf610_gpio_disable_clk(void *data)
 static int vf610_gpio_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct device_node *np = dev->of_node;
 	struct vf610_gpio_port *port;
 	struct gpio_chip *gc;
 	struct gpio_irq_chip *girq;
@@ -319,7 +318,7 @@ static int vf610_gpio_probe(struct platform_device *pdev)
 	gc->parent = dev;
 	gc->label = dev_name(dev);
 	gc->ngpio = VF610_GPIO_PER_PORT;
-	gc->base = of_alias_get_id(np, "gpio") * VF610_GPIO_PER_PORT;
+	gc->base = -1;
 
 	gc->request = gpiochip_generic_request;
 	gc->free = gpiochip_generic_free;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-08-28 13:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-06  8:59 [PATCH 1/2] gpio: vf610: switch to dynamic allocat GPIO base haibo.chen
2023-05-06  8:59 ` [PATCH 2/2] gpio: mxc: " haibo.chen
2023-05-06 13:06   ` Linus Walleij
2023-08-21  2:47     ` Bough Chen
2023-08-21  7:25       ` Linus Walleij
2023-08-21  7:44         ` Alexander Stein
2023-08-21 10:21           ` Linus Walleij
2023-08-21 12:17             ` Bartosz Golaszewski
2023-08-28 13:56               ` Ahmad Fatoum
2023-05-26 13:12   ` Bartosz Golaszewski
2023-05-06 13:04 ` [PATCH 1/2] gpio: vf610: " Linus Walleij
2023-08-21  2:47   ` Bough Chen
2023-08-22  9:39     ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).