Re: [PATCH] gpiolib: move legacy interface into linux/gpio/legacy.h
From: Arnd Bergmann
Date: Tue Apr 28 2026 - 13:03:46 EST
On Tue, Apr 28, 2026, at 17:53, Andy Shevchenko wrote:
> On Tue, Apr 28, 2026 at 05:45:07PM +0200, Arnd Bergmann wrote:
>
>> Split the old contents from gpio.h for clarity. Ideally any driver
>> that still includes linux/gpio.h can now be ported over to use
>> either linux/gpio/legacy.h or linux/gpio/consumer.h, with the
>> original file getting removed once that is complete.
>>
>> No functional changes intended for now.
>
> But I'm not sure why. The idea to kill gpio.h completely, no need to keep it
> longer than legacy stuff exists. I don't take 'clarity' as a good justification
> here, since the old header are still there (however just a shallow wrapper).
I currently count 59 files that use the legacy header,
and I have a patch to change those over to include it
directly. I could post it now, but the exact list seems to
be changing by the day at the moment. It may be better
to split it up by subsystem once the first patch is merged,
or it could go through the gpio tree.
There are another 94 uses of linux/gpio.h that should
be linux/gpio/consumer.h instead. That patch is of course
trivial as well, but I have not prepared it yet.
I don't think the legacy stuff is going away any time soon,
so removing it from linux/gpio.h with the follow-up patch
should help avoid new instances getting merged unnoticed.
Arnd