Re: [PATCH] gpiolib: make legacy interfaces optional

From: Bartosz Golaszewski
Date: Thu Jul 24 2025 - 10:27:57 EST


On Thu, Jul 24, 2025 at 4:22 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> On Wed, Jul 23, 2025, at 10:39, Bartosz Golaszewski wrote:
> > On Tue, Jul 22, 2025 at 5:36 PM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
>
> >> #include <linux/types.h>
> >> +#ifdef CONFIG_GPIOLIB
> >> +#include <linux/gpio/consumer.h>
> >
> > I want to queue this ASAP but do we really need this guard here?
> > consumer.h already guards against !CONFIG_GPIOLIB internally, right?
>
> I was trying to not change the behavior here. linux/gpio/consumer.h has
> an #ifdef check but has the #else portion with empty stubs that can
> be used by any driver that includes it, while drivers that include
> linux/gpio.h never saw the stub version.
>
> Arnd

Ok, fair enough, let me queue this and we can change it later if needed.

Bart