Skip to contentSkip to conversation

x86/olpc: select GPIOLIB_LEGACY

PATCH In review Arnd Bergmann 7 participants 11 messages Apr 27 – Apr 30

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/olpc: select GPIOLIB_LEGACY

From: Arnd Bergmann <[email protected]>

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.

---
 arch/x86/Kconfig  | 1 +
 sound/pci/Kconfig | 1 +
 2 files changed, 2 insertions(+)
arch/x86/Kconfig +1 -0
index f3f7cb01d69d..5ada2c108f4a 100644
@@ -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
sound/pci/Kconfig +1 -0
index e0996a9d90b0..6366f72b3667 100644
@@ -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
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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);

Quoted 5 lines

Select CONFIG_GPIOLIB_LEGACY for this platform and make sure the sound driver portion cannot be compiled without this.

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

#2 lore raw
Quoted 4 lines · Linus Walleij
Quoted 3 lines · Arnd Bergmann

Select CONFIG_GPIOLIB_LEGACY for this platform and make sure the sound driver portion cannot be compiled without this.

Quoted 8 lines
Quoted 2 lines

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

maintainer
#3 lore raw
Quoted 9 lines · Arnd Bergmann

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

#4 lore raw
Quoted 20 lines · Linus Walleij
Quoted 9 lines · Arnd Bergmann

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/*.

Quoted 6 lines

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.

#5 lore raw
Quoted 17 lines · Andres Salomon
Quoted 16 lines · Linus Walleij
Quoted 9 lines · Arnd Bergmann

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"

Quoted 7 lines
Quoted 7 lines

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.

It looks like Lubomir actually did that work already and submitted a proper driver a few years ago, at least for the XO-1.75:
https://lists.freedesktop.org/archives/dri-devel/2018-December/201019.html

This was never merged, but it's there in case someone wants to continue where he left off. As far as I can tell, the staging driver was used with the XO-1 and XO-1.5, while this one was for XO-1.75, but the actual chip is the same and the driver is almost portable.

Quoted 3 lines

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.

I see you are still listed as paid support for AMD Geode in the MAINTAINERS file. Is that still the case, or did that end along with your involvement in XO-1?

Are you aware of any Geode users that still update their kernels? I found that OpenWRT still publishes Geode builds (with XO-1 disabled, but everything else built in) but no indication that anyone has actually run these after around 2017.

Arnd

#6 lore raw
Quoted 3 lines · Arnd Bergmann
Quoted 2 lines · Andres Salomon
Quoted 1 line · Linus Walleij

On Tue, Apr 28, 2026 at 3:57 PM Arnd Bergmann <[email protected]> wrote:

[...]

Quoted 9 lines
Quoted 4 lines

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.

I see you are still listed as paid support for AMD Geode in the MAINTAINERS file. Is that still the case, or did that end along with your involvement in XO-1?

No, my involvement with anything Geode and OLPC ended years ago. Feel free to remove me from MAINTAINERS (unless someone has specific questions about hardware, which I'm happy to answer).

Quoted 6 lines

Are you aware of any Geode users that still update their kernels? I found that OpenWRT still publishes Geode builds (with XO-1 disabled, but everything else built in) but no indication that anyone has actually run these after around 2017.

Arnd

Personally I don't know anyone, but I feel like those Geode thin clients are more likely to still be in use. A machine with 256MB of ram in 2026 is going to be an absolutely miserable laptop to use, but that's still fine for a limited router or wifi access point. If you remove/disable the Geode stuff, you probably won't hear complaints until the next major OpenWRT release, though.

#7 lore raw
Quoted 10 lines · Andres Salomon
Quoted 3 lines · Arnd Bergmann
Quoted 2 lines · Andres Salomon
Quoted 1 line · Linus Walleij

On Tue, Apr 28, 2026 at 3:57 PM Arnd Bergmann <[email protected]> wrote:

[...]

Quoted 5 lines
Quoted 4 lines

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.

Quoted 8 lines
Quoted 4 lines

I see you are still listed as paid support for AMD Geode in the MAINTAINERS file. Is that still the case, or did that end along with your involvement in XO-1?

No, my involvement with anything Geode and OLPC ended years ago. Feel free to remove me from MAINTAINERS (unless someone has specific questions about hardware, which I'm happy to answer).

Ok, marking it 'Orphaned' is probably the right choice then, or the x86 maintainers can decide to remove it right away.

Quoted 11 lines
Quoted 4 lines

Are you aware of any Geode users that still update their kernels? I found that OpenWRT still publishes Geode builds (with XO-1 disabled, but everything else built in) but no indication that anyone has actually run these after around 2017.

Personally I don't know anyone, but I feel like those Geode thin clients are more likely to still be in use. A machine with 256MB of ram in 2026 is going to be an absolutely miserable laptop to use, but that's still fine for a limited router or wifi access point. If you remove/disable the Geode stuff, you probably won't hear complaints until the next major OpenWRT release, though.

Ah right, I was only looking at the embedded boards that have custom arch/x86/platform/ code. I guess the thin clients would generally just work as long as the SoC and south bridge drivers are there?

I'm also less worried about the thin clients, as they are unlikely to be used for anything mission-critical but were rather repurposed after the original owner replaced them with with Arm or x86-64 machines in the 2010s.

Arnd

#8 lore raw
In reply to Linus Walleij
Quoted 3 lines · Linus Walleij

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.

I'm still here, keeping infrastructure running, still have hardware, still receive telemetry showing children using our Fedora 18 build (!), and still answering technical questions.

But we don't have funding for this kind of work. We now buy-in laptops.

It would be wonderful if keeping dcon happens, but I have to be realistic; whoever does it will need to be very dedicated to acquire second-hand hardware and work through the various other things that stop the modern kernel from running on it. I'll cheer you on if that's you, and may even help out by mail, but I've other funded work, so my time is limited.

Good luck!

Acked-by on v1 1/1
#9 lore raw
In reply to Arnd Bergmann
Quoted 41 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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.

---
 arch/x86/Kconfig  | 1 +
 sound/pci/Kconfig | 1 +
 2 files changed, 2 insertions(+)
arch/x86/Kconfig +1 -0
index f3f7cb01d69d..5ada2c108f4a 100644
@@ -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
sound/pci/Kconfig +0 -0
index e0996a9d90b0..6366f72b3667 100644

sound/pci/Kconfig config SND_CS5535AUDIO · line 306

Quoted 7 lines
sound/pci/Kconfig +1 -0
@@ -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

thanks,

Takashi

maintainer Reviewed-by on v1 1/1
#10 lore raw
In reply to Arnd Bergmann
Quoted 13 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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);

Quoted 6 lines

Select CONFIG_GPIOLIB_LEGACY for this platform and make sure the sound driver portion cannot be compiled without this.

---