Re: [PATCH] gpio: aggregator: restore the set_config operation

From: Geert Uytterhoeven

Date: Mon Sep 29 2025 - 06:15:28 EST


Hi Thomas,

On Mon, 29 Sept 2025 at 12:03, Thomas Richard
<thomas.richard@xxxxxxxxxxx> wrote:
> Restore the set_config operation, as it was lost during the refactoring of
> the gpio-aggregator driver while creating the gpio forwarder library.
>
> Fixes: b31c68fd851e7 ("gpio: aggregator: handle runtime registration of gpio_desc in gpiochip_fwd")
> Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-lkp/202509281206.a7334ae8-lkp@xxxxxxxxx
> Signed-off-by: Thomas Richard <thomas.richard@xxxxxxxxxxx>

Thanks for your patch!

> --- a/drivers/gpio/gpio-aggregator.c
> +++ b/drivers/gpio/gpio-aggregator.c
> @@ -723,6 +723,7 @@ struct gpiochip_fwd *devm_gpiochip_fwd_alloc(struct device *dev,
> chip->get_multiple = gpio_fwd_get_multiple_locked;
> chip->set = gpio_fwd_set;
> chip->set_multiple = gpio_fwd_set_multiple_locked;
> + chip->set_config = gpio_fwd_set_config;
> chip->to_irq = gpio_fwd_to_irq;
> chip->base = -1;
> chip->ngpio = ngpios;
>

Is there any specific reason why you are doing this unconditionally,
instead of only when any of its parents support .set_config(), like
was done before?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds