Re: [PATCH 10/21] leds: gpio: make legacy gpiolib interface optional

From: Arnd Bergmann
Date: Wed Aug 20 2025 - 08:02:31 EST


On Wed, Aug 20, 2025, at 09:16, Lee Jones wrote:
> On Tue, 19 Aug 2025, Arnd Bergmann wrote:
>
> Sounds like we're between a rock and a hard place with this.

I don't think either variant is that bad to be honest, as it
gets us a long way towards removing the legacy interface from
default builds without having to update or remove the holdouts
immediately. It's mainly led-gpio and gpio-keys that need
a change like this.

Splitting out the entire gpio_led_platform_data handling
into a single #ifdef function block would be a little cleaner,
but that would in turn require changing over a couple of
files that got converted from legacy gpio numbers to passing
gpio descriptors or lookup tables (ppc44x/warp, x86/sel3350,
arm/omap1), making them use device properties instead.

> Will the legacy parts be removed at some point or do you foresee us
> supporting this forever?

It's hard to predict an timeline here, there is certainly a lot of
interest in minimizing the legacy users as much as possible and
patches are getting written for x86 and arm, but I don't see much
movement on the mips and sh platforms. These are also the ones
that have been holdouts for CONFIG_LEGACY_CLK for years, and I
hope we can eventually drop support for those boards.

That said, I first need to get my own act together and refresh
my patches to drop the old arm board files so we can merge that.

Arnd