Skip to contentSkip to conversation

leds: New PCEngines Alix LED driver using gpio interface

PATCH In review [email protected] 3 participants 3 messages Mar 6, 2011 – Apr 7, 2011 LED

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 leds: New PCEngines Alix LED driver using gpio interface

From: Ed Wildgoose <[email protected]>

This new driver replaces the old PCEngines Alix 2/3 LED driver with a new driver that controls the LEDs through the leds-gpio driver. The old driver accessed GPIOs directly, which created a conflict and prevented also loading the cs5535-gio driver to read other GPIOs on the Alix board. With this new driver, both are loaded and therefore it's possible to access both the LEDs and onboard GPIOs

This driver is based on leds-net5501.c
by: Alessandro Zummo <[email protected]>
Additionally it relies on parts of the patch: 7f131cf3ed
by: Daniel Mack <[email protected]> to perform detection of the Alix board

---
:100644 100644 6f190f4... 25f0285... M drivers/leds/Kconfig
:100644 100644 f59ffad... 62c8fff... M drivers/leds/leds-alix2.c

 drivers/leds/Kconfig      |    2 +-
 drivers/leds/leds-alix2.c |  196 ++++++++++----------------------------------
 2 files changed, 46 insertions(+), 152 deletions(-)
drivers/leds/Kconfig +1 -1
index 6f190f4..25f0285 100644
@@ -100,7 +100,7 @@ config LEDS_WRAP
 config LEDS_ALIX2
 	tristate "LED Support for ALIX.2 and ALIX.3 series"
 	depends on LEDS_CLASS
-	depends on X86 && !GPIO_CS5535 && !CS5535_GPIO
+	depends on X86 && LEDS_GPIO_PLATFORM && GPIO_CS5535
 	help
 	  This option enables support for the PCEngines ALIX.2 and ALIX.3 LEDs.
 	  You have to set leds-alix2.force=1 for boards with Award BIOS.
drivers/leds/leds-alix2.c +45 -151

240 lines not on this page · raw message

Signature · 1 line
1.7.4
#1 lore raw
Quoted 9 lines · On Sun, 6 Mar 2011 16:51:25 +0000 [email protected] wrote:

From: Ed Wildgoose <[email protected]>

This new driver replaces the old PCEngines Alix 2/3 LED driver with a new driver that controls the LEDs through the leds-gpio driver. The old driver accessed GPIOs directly, which created a conflict and prevented also loading the cs5535-gio driver to read other GPIOs on the Alix board. With this new driver, both are loaded and therefore it's possible to access both the LEDs and onboard GPIOs

Quoted 4 lines

This driver is based on leds-net5501.c
by: Alessandro Zummo <[email protected]>
Additionally it relies on parts of the patch: 7f131cf3ed
by: Daniel Mack <[email protected]> to perform detection of the Alix board

As far as I can tell from looking at it, this driver maintains all the same interfaces and behaviour as the old version. Am I right?

#2 lore raw
Quoted 12 lines · Andrew Morton
Quoted 9 lines · On Sun, 6 Mar 2011 16:51:25 +0000 [email protected] wrote:

From: Ed Wildgoose <[email protected]>

This new driver replaces the old PCEngines Alix 2/3 LED driver with a new driver that controls the LEDs through the leds-gpio driver. The old driver accessed GPIOs directly, which created a conflict and prevented also loading the cs5535-gio driver to read other GPIOs on the Alix board. With this new driver, both are loaded and therefore it's possible to access both the LEDs and onboard GPIOs

Quoted 7 lines
Quoted 4 lines

This driver is based on leds-net5501.c
by: Alessandro Zummo <[email protected]>
Additionally it relies on parts of the patch: 7f131cf3ed
by: Daniel Mack <[email protected]> to perform detection of the Alix board

As far as I can tell from looking at it, this driver maintains all the same interfaces and behaviour as the old version. Am I right?

Yes, this is correct. The substance of the change is simply to use the leds-gpio interface rather than fiddling with gpio settings directly. However, please note that Grant and Andres suggested that the driver should instead move to "arch" and out of leds? Therefore, I created an updated version of this patch which you can find from message id:
"[email protected]", ie:

    http://lists.zerezo.com/linux-kernel/msg27455553.html

Additionally this updated patch has a slightly amended copyright - several folks thought that the updated copyright statement was more appropriate

My apologies that this updated patch was not more clearly marked as such
- Grant has taken the time to point out how I should submit patches more clearly in the future

I would be happy to shuffle the code around further if anyone has an opinion?

Thanks for picking this up

Ed W