summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBinbin Zhou <zhoubinbin@loongson.cn>2025-10-23 17:03:46 +0800
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2025-10-27 14:48:39 +0100
commit3cde66094575a5b1310a7631d28761bd3dfcea63 (patch)
tree16e4e9e25e4fd9f0521a29e8b3862059e6e442ff
parent9452252dff94ff2cbcd33d3418c2b95ff74bdba5 (diff)
gpio: loongson-64bit: Switch to dynamic allocate GPIO base in byte mode
gpiolib want to get completely rid of static gpiobase allocation, so switch to dynamic allocate GPIO base in byte mode, also can avoid warning message: [1.529974] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation. Reported-by: Hongliang Wang <wanghongliang@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20251023090346.1995894-1-zhoubinbin@loongson.cn Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-rw-r--r--drivers/gpio/gpio-loongson-64bit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-loongson-64bit.c b/drivers/gpio/gpio-loongson-64bit.c
index 02f181cb219e..d4e291b275f0 100644
--- a/drivers/gpio/gpio-loongson-64bit.c
+++ b/drivers/gpio/gpio-loongson-64bit.c
@@ -312,6 +312,7 @@ static int loongson_gpio_init(struct platform_device *pdev, struct loongson_gpio
lgpio->chip.gc.direction_output = loongson_gpio_direction_output;
lgpio->chip.gc.set = loongson_gpio_set;
lgpio->chip.gc.parent = &pdev->dev;
+ lgpio->chip.gc.base = -1;
spin_lock_init(&lgpio->lock);
}