[PATCH] gpio: rockchip: convert to dynamic GPIO base allocation
Bartosz Golaszewski
brgl at kernel.org
Tue Mar 31 01:05:26 PDT 2026
On Mon, Mar 30, 2026 at 11:53 AM Shawn Lin <shawn.lin at rock-chips.com> wrote:
>
> This driver is used on device tree based platform. Use dynamic
> GPIO numberspace base to suppress the warning:
>
> gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
> gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
> gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation.
> gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation.
> gpio gpiochip4: Static allocation of GPIO base is deprecated, use dynamic allocation.
>
> Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
> ---
>
> drivers/gpio/gpio-rockchip.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
> index ac1b939..08ea644 100644
> --- a/drivers/gpio/gpio-rockchip.c
> +++ b/drivers/gpio/gpio-rockchip.c
> @@ -582,7 +582,7 @@ static int rockchip_gpiolib_register(struct rockchip_pin_bank *bank)
> bank->gpio_chip = rockchip_gpiolib_chip;
>
> gc = &bank->gpio_chip;
> - gc->base = bank->pin_base;
> + gc->base = -1;
> gc->ngpio = bank->nr_pins;
> gc->label = bank->name;
> gc->parent = bank->dev;
> --
> 2.7.4
>
I take it you know first-hand that nobody depends on the predefined
GPIO numbering for this driver? If so, I can queue it for v7.1.
Bart
More information about the Linux-rockchip
mailing list