Re: [PATCH v2] pinctrl: starfive: use dynamic GPIO base allocation

From: Emil Renner Berthing
Date: Sat Oct 25 2025 - 06:52:44 EST


Quoting Ali Tariq (2025-10-24 16:33:53)
> 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.
>
> Tested on VisionFive 2 (JH7110 SoC).
>
> Signed-off-by: Ali Tariq <alitariq45892@xxxxxxxxx>
> ---
> Changes in v2
> - Remove unused gc_base field from struct jh7110_pinctrl_soc_info
> - Drop unused JH7110_SYS_GC_BASE and JH7110_AON_GC_BASE defines
> - Remove .gc_base assignments from jh7110_sys_pinctrl_info and jh7110_aon_pinctrl_info
> - No functional change otherwise

Hi Ali,

Thanks for the detailed log of changes since v1. Just 2 comments:

1) The justification for why this is no longer needed should be in the commit
message, and not just in a random thread that will soon be forgotten.

2) Please don't send new revisions as replies. Start a new mail thread.

The code changes look good though, so once that is fixed you can add

Reviewed-by: Emil Renner Berthing <emil.renner.berthing@xxxxxxxxxxxxx>

/Emil