[PATCH] gpio: rockchip: convert to dynamic GPIO base allocation

Shawn Lin shawn.lin at rock-chips.com
Tue Apr 7 02:59:56 PDT 2026


Hi Bartosz,

在 2026/03/31 星期二 16:05, Bartosz Golaszewski 写道:
> 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.
> 

I have confirmed internally that nobody depends on the pre-defined
GPIO numbering.

Thanks.

> Bart
> 



More information about the Linux-rockchip mailing list