Re: [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled

From: Claus H. Stovgaard
Date: Wed Jul 10 2019 - 16:02:31 EST


Hi Linus

On tir, 2019-07-09 at 15:30 +0200, Linus Walleij wrote:
>
> I remember I had this discussion in the past, and I made a large
> refactoring to make it possible for drivers that need gpiod_*
> calls to simply do:
>
> select GPIOLIB
>
> in Kconfig.
>
> This should solve also this problem I think.
>
> However I do realize that there may be situations where people
> simply want to make GPIO support entirely optional without
> having to e.g. create custom stubs and encapsulate things
> inside if IS_ENABLED(CONFIG_GPIOLIB).

You properly saw the email in linux-i2c, but will just it for
completeness.
https://marc.info/?l=linux-i2c&m=156257442124566&w=2

The background for getting the warning, was upgrading a system on
Xilinx ZynqMP SoC from 4.14 to 4.19. As part of this upgrade wp (write
protect) has been introduced in the at24 driver, resulting in the
warning from comsumer.h as I don't have enabled GPIOLIB.

Regards
Claus