Re: [PATCH] x86/olpc: select GPIOLIB_LEGACY

From: Linus Walleij

Date: Mon Apr 27 2026 - 16:14:06 EST


On Mon, Apr 27, 2026 at 4:43 PM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:

> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> The OLPC GPIO controller sets up a fixed number space that is used
> by at least two drivers:
>
> arch/x86/platform/olpc/olpc-xo1-sci.c: In function 'setup_ec_sci':
> arch/x86/platform/olpc/olpc-xo1-sci.c:358:13: error: implicit declaration of function 'gpio_request' [-Wimplicit-function-declaration]
> 358 | r = gpio_request(OLPC_GPIO_ECSCI, "OLPC-ECSCI");
> | ^~~~~~~~~~~~
> sound/pci/cs5535audio/cs5535audio_olpc.c: In function 'olpc_analog_input':
> sound/pci/cs5535audio/cs5535audio_olpc.c:41:9: error: implicit declaration of function 'gpio_set_value'; did you mean 'gpiod_set_value'? [-Wimplicit-function-declaration]
> 41 | gpio_set_value(OLPC_GPIO_MIC_AC, on);
>
> Select CONFIG_GPIOLIB_LEGACY for this platform and make sure the
> sound driver portion cannot be compiled without this.
>
> Acked-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

I started to try to fix up this driver but it's such a mess. I feel
the OLPC XO1 support needs to be deleted unless someone
steps up to actually test and maintain it.

Yours,
Linus Walleij