Messages in this thread | | | From | Arnd Bergmann <> | Date | Tue, 9 Nov 2021 11:54:21 +0100 | Subject | Re: [PATCH v2 7/8] gpiolib: remove gpio_to_chip |
| |
On Tue, Nov 9, 2021 at 11:32 AM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > > #ifdef CONFIG_GPIOLIB > > I'm wondering if we need this ifdeffery at all.
We don't need it for the first half (gpio_set_value, gpio_direction_input, ...), which could just be unconditional wrappers around the gpiod versions. Removing that #ifdef would require always including linux/gpio/consumer.h here, so we'd no longer get a build failure when a driver uses gpiod_* without including that directly (when GPIOLIB is disabled).
I actually had a patch in my series to do this, but dropped that because the second half (gpio_request/gpio_free/...) does need the #ifdef
Arnd
| |