Re: [tip:x86/platform 1/1] platform_bt.c:undefined reference to `gpiod_add_lookup_table'

From: Linus Walleij
Date: Wed Apr 19 2017 - 05:01:26 EST


On Tue, Apr 18, 2017 at 3:41 PM, Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> On Fri, 2017-04-07 at 12:36 +0200, Linus Walleij wrote:

>> They return NULL if the GPIO is not there, or if the
>> GPIO library is compiled out (as of HEAD, due to the
>> patch from Dmitry T.)
>
> I'm talking if they are used or not in hci_bcm.c.
>
> Just checked and indeed the driver is using _optional() variants.
> This means GPIOLIB is optional to the driver.

GPIOLIB's idea of "optional" should preferrably be the same as
an optional regulator, i.e. "electrically optional" not "software optional".

The regulator example is for example an ADC reference voltage that is
not strictly required, then it is optional, and the ADC can use some
internal reference voltage instead. It does not mean that the regulator
framework is optional.

I'd like to have the same semantice for GPIO but maybe that is a
pipe dream :/

Yours,
Linus Walleij