Re: [PATCH v3] pinctrl: starfive: use dynamic GPIO base allocation
From: Bartosz Golaszewski
Date: Wed Dec 03 2025 - 15:34:55 EST
On Sun, Oct 26, 2025 at 12:44 PM Ali Tariq <alitariq45892@xxxxxxxxx> wrote:
>
> The JH7110 pinctrl driver currently sets a static GPIO base number from
> platform data:
>
> sfp->gc.base = info->gc_base;
>
> Static base assignment is deprecated and results in the following warning:
>
> gpio gpiochip0: Static allocation of GPIO base is deprecated,
> use dynamic allocation.
>
> Set `sfp->gc.base = -1` to let the GPIO core dynamically allocate
> the base number. This removes the warning and aligns the driver
> with current GPIO guidelines.
>
> Since the GPIO base is now allocated dynamically, remove `gc_base` field in
> `struct jh7110_pinctrl_soc_info` and the associated `JH7110_SYS_GC_BASE`
> and `JH7110_AON_GC_BASE` constants as they are no longer used anywhere
> in the driver.
>
> Tested on VisionFive 2 (JH7110 SoC).
>
> Signed-off-by: Ali Tariq <alitariq45892@xxxxxxxxx>
> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@xxxxxxxxxxxxx>
> ---
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>