* [PATCH] x86/olpc: select GPIOLIB_LEGACY
@ 2026-04-27 14:43 Arnd Bergmann
2026-04-27 20:13 ` Linus Walleij
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Arnd Bergmann @ 2026-04-27 14:43 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
Jaroslav Kysela, Takashi Iwai, Linus Walleij, Bartosz Golaszewski
Cc: Arnd Bergmann, H. Peter Anvin, Peter Zijlstra, linux-kernel,
linux-sound, linux-gpio
From: Arnd Bergmann <arnd@arndb.de>
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@alien8.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/x86/Kconfig | 1 +
sound/pci/Kconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f3f7cb01d69d..5ada2c108f4a 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -3022,6 +3022,7 @@ config OLPC
bool "One Laptop Per Child support"
depends on !X86_PAE
select GPIOLIB
+ select GPIOLIB_LEGACY
select OF
select OF_PROMTREE
select IRQ_DOMAIN
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
index e0996a9d90b0..6366f72b3667 100644
--- a/sound/pci/Kconfig
+++ b/sound/pci/Kconfig
@@ -300,6 +300,7 @@ config SND_CS5535AUDIO
tristate "CS5535/CS5536 Audio"
depends on X86_32 || MIPS || COMPILE_TEST
depends on HAS_IOPORT
+ depends on GPIOLIB_LEGACY || !OLPC
select SND_PCM
select SND_AC97_CODEC
help
--
2.39.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/olpc: select GPIOLIB_LEGACY
2026-04-27 14:43 [PATCH] x86/olpc: select GPIOLIB_LEGACY Arnd Bergmann
@ 2026-04-27 20:13 ` Linus Walleij
2026-04-28 13:56 ` Arnd Bergmann
2026-04-28 6:19 ` Takashi Iwai
2026-04-28 8:07 ` Bartosz Golaszewski
2 siblings, 1 reply; 7+ messages in thread
From: Linus Walleij @ 2026-04-27 20:13 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
Jaroslav Kysela, Takashi Iwai, Bartosz Golaszewski, Arnd Bergmann,
H. Peter Anvin, Peter Zijlstra, linux-kernel, linux-sound,
linux-gpio
On Mon, Apr 27, 2026 at 4:43 PM Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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@alien8.de>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linusw@kernel.org>
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/olpc: select GPIOLIB_LEGACY
2026-04-27 14:43 [PATCH] x86/olpc: select GPIOLIB_LEGACY Arnd Bergmann
2026-04-27 20:13 ` Linus Walleij
@ 2026-04-28 6:19 ` Takashi Iwai
2026-04-28 8:07 ` Bartosz Golaszewski
2 siblings, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2026-04-28 6:19 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
Jaroslav Kysela, Takashi Iwai, Linus Walleij, Bartosz Golaszewski,
Arnd Bergmann, H. Peter Anvin, Peter Zijlstra, linux-kernel,
linux-sound, linux-gpio
On Mon, 27 Apr 2026 16:43:05 +0200,
Arnd Bergmann wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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@alien8.de>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/x86/Kconfig | 1 +
> sound/pci/Kconfig | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index f3f7cb01d69d..5ada2c108f4a 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -3022,6 +3022,7 @@ config OLPC
> bool "One Laptop Per Child support"
> depends on !X86_PAE
> select GPIOLIB
> + select GPIOLIB_LEGACY
> select OF
> select OF_PROMTREE
> select IRQ_DOMAIN
> diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
> index e0996a9d90b0..6366f72b3667 100644
> --- a/sound/pci/Kconfig
> +++ b/sound/pci/Kconfig
> @@ -300,6 +300,7 @@ config SND_CS5535AUDIO
> tristate "CS5535/CS5536 Audio"
> depends on X86_32 || MIPS || COMPILE_TEST
> depends on HAS_IOPORT
> + depends on GPIOLIB_LEGACY || !OLPC
> select SND_PCM
> select SND_AC97_CODEC
> help
Acked-by: Takashi Iwai <tiwai@suse.de>
thanks,
Takashi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/olpc: select GPIOLIB_LEGACY
2026-04-27 14:43 [PATCH] x86/olpc: select GPIOLIB_LEGACY Arnd Bergmann
2026-04-27 20:13 ` Linus Walleij
2026-04-28 6:19 ` Takashi Iwai
@ 2026-04-28 8:07 ` Bartosz Golaszewski
2 siblings, 0 replies; 7+ messages in thread
From: Bartosz Golaszewski @ 2026-04-28 8:07 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, H. Peter Anvin, Peter Zijlstra, linux-kernel,
linux-sound, linux-gpio, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, x86, Jaroslav Kysela, Takashi Iwai,
Linus Walleij, Bartosz Golaszewski
On Mon, 27 Apr 2026 16:43:05 +0200, Arnd Bergmann <arnd@kernel.org> said:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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@alien8.de>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/olpc: select GPIOLIB_LEGACY
2026-04-27 20:13 ` Linus Walleij
@ 2026-04-28 13:56 ` Arnd Bergmann
2026-04-28 22:34 ` Linus Walleij
0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2026-04-28 13:56 UTC (permalink / raw)
To: Linus Walleij, Arnd Bergmann
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
Jaroslav Kysela, Takashi Iwai, Bartosz Golaszewski,
H. Peter Anvin, Peter Zijlstra, linux-kernel, linux-sound,
open list:GPIO SUBSYSTEM, James Cameron, James Cameron,
linux-geode, Andres Salomon, Lubomir Rintel
On Mon, Apr 27, 2026, at 22:13, Linus Walleij wrote:
> On Mon, Apr 27, 2026 at 4:43 PM Arnd Bergmann <arnd@kernel.org> wrote:
>> 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@alien8.de>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Reviewed-by: Linus Walleij <linusw@kernel.org>
>
> 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.
I understand where you're coming from: the machine was certainly
never really nice and was already quite underpowered 20 years ago,
Pretty much any distro that used to support it has stopped
years ago.
On the other hand, even the XO-1 was widely shipped to both users
and developers, super durable, and influential. There are a handful
of other upstream board files for the SCx200/Geode family, but this
is probably the most common one by far.
I see that the display controller driver (olpc_dcon) was removed
two years ago after being broken for years. It was first
removed in 2016 but restored immediately as there were still
users at the time.
I've added Andres Salomon, James Cameron and Lubomir Rintel
to Cc, they may have more information about who is still using
XO-1, and if anyone is still updating kernels.
Arnd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/olpc: select GPIOLIB_LEGACY
2026-04-28 13:56 ` Arnd Bergmann
@ 2026-04-28 22:34 ` Linus Walleij
2026-04-28 22:39 ` Andres Salomon
0 siblings, 1 reply; 7+ messages in thread
From: Linus Walleij @ 2026-04-28 22:34 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, Jaroslav Kysela, Takashi Iwai,
Bartosz Golaszewski, H. Peter Anvin, Peter Zijlstra, linux-kernel,
linux-sound, open list:GPIO SUBSYSTEM, James Cameron,
James Cameron, linux-geode, Andres Salomon, Lubomir Rintel
On Tue, Apr 28, 2026 at 3:57 PM Arnd Bergmann <arnd@arndb.de> wrote:
> On the other hand, even the XO-1 was widely shipped to both users
> and developers, super durable, and influential. There are a handful
> of other upstream board files for the SCx200/Geode family, but this
> is probably the most common one by far.
>
> I see that the display controller driver (olpc_dcon) was removed
> two years ago after being broken for years. It was first
> removed in 2016 but restored immediately as there were still
> users at the time.
I looked at the removed driver
commit 214c2754fb0af78fde9faa2e5f9693c4618f3d5b
"staging: olpc_dcon: Remove driver marked as broken since 2022"
This is a simple driver and would *not* be hard to rewrite
using the DRM helpers that exist today, by just looking at other
simple DRM drivers such as drivers/gpu/drm/tve200/*.
So if there is interest full upstream support should not be
hard to attain. But it requires some dedication, and I wonder
if such exist.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/olpc: select GPIOLIB_LEGACY
2026-04-28 22:34 ` Linus Walleij
@ 2026-04-28 22:39 ` Andres Salomon
0 siblings, 0 replies; 7+ messages in thread
From: Andres Salomon @ 2026-04-28 22:39 UTC (permalink / raw)
To: Linus Walleij, Arnd Bergmann
Cc: Arnd Bergmann, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, Jaroslav Kysela, Takashi Iwai,
Bartosz Golaszewski, H. Peter Anvin, Peter Zijlstra, linux-kernel,
linux-sound, open list:GPIO SUBSYSTEM, James Cameron,
James Cameron, linux-geode, Lubomir Rintel
On 4/28/26 18:34, Linus Walleij wrote:
> On Tue, Apr 28, 2026 at 3:57 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
>> On the other hand, even the XO-1 was widely shipped to both users
>> and developers, super durable, and influential. There are a handful
>> of other upstream board files for the SCx200/Geode family, but this
>> is probably the most common one by far.
>>
>> I see that the display controller driver (olpc_dcon) was removed
>> two years ago after being broken for years. It was first
>> removed in 2016 but restored immediately as there were still
>> users at the time.
>
> I looked at the removed driver
> commit 214c2754fb0af78fde9faa2e5f9693c4618f3d5b
> "staging: olpc_dcon: Remove driver marked as broken since 2022"
>
> This is a simple driver and would *not* be hard to rewrite
> using the DRM helpers that exist today, by just looking at other
> simple DRM drivers such as drivers/gpu/drm/tve200/*.
>
> So if there is interest full upstream support should not be
> hard to attain. But it requires some dedication, and I wonder
> if such exist.
>
> Yours,
> Linus Walleij
I can't speak for other (former) OLPC folks, but I donated my remaining
OLPC hardware about seven years ago; so I no longer have any interest or
ability to support the hardware.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-04-28 22:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 14:43 [PATCH] x86/olpc: select GPIOLIB_LEGACY Arnd Bergmann
2026-04-27 20:13 ` Linus Walleij
2026-04-28 13:56 ` Arnd Bergmann
2026-04-28 22:34 ` Linus Walleij
2026-04-28 22:39 ` Andres Salomon
2026-04-28 6:19 ` Takashi Iwai
2026-04-28 8:07 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox