LED: Add LED device support for the zaurus corgi and spitz models
Subsystems (4)
PATCH 6/11 LED: Add LED device support for the zaurus corgi and spitz models
Adds LED drivers for LEDs found on the Sharp Zaurus c7x0 (corgi, shepherd, husky) and cxx00 (akita, spitz, borzoi) models.
arch/arm/mach-pxa/corgi.c +10 -0
@@ -165,6 +165,15 @@/* +* Corgi LEDs +*/ +static struct platform_device corgiled_device = { + .name ="corgi-led" , + .id =-1 , +}; + + +/* * Corgi Touch Screen Device */ static struct resource corgits_resources[] = {
@@ -298,6 +307,7 @@ &corgikbd_device, &corgibl_device, &corgits_device, + &corgiled_device, };static void __init corgi_init (void )
arch/arm/mach-pxa/spitz.c +10 -0
@@ -243,6 +243,15 @@/* +* Spitz LEDs +*/ +static struct platform_device spitzled_device = { + .name ="spitz-led" , + .id =-1 , +}; + + +/* * Spitz Touch Screen Device */ static struct resource spitzts_resources[] = {
@@ -419,6 +428,7 @@ &spitzkbd_device, &spitzts_device, &spitzbl_device, + &spitzled_device, };static void __init common_init (void )
drivers/leds/Kconfig +14 -0
@@ -22,6 +22,20 @@ These triggers allow kernel events to drive the LEDs and can be configured via sysfs. If unsure, say Y. +config LEDS_CORGI + tristate "LED Support for the Sharp SL-C7x0 series" + depends LEDS_CLASS && PXA_SHARP_C7xx + help + This option enables support for the LEDs on Sharp Zaurus + SL-C7x0 series (C700, C750, C760, C860). + +config LEDS_SPITZ + tristate "LED Support for the Sharp SL-Cxx00 series" + depends LEDS_CLASS && PXA_SHARP_Cxx00 + help + This option enables support for the LEDs on Sharp Zaurus + SL-Cxx00 series (C1000, C3000, C3100). + config LEDS_TRIGGER_TIMER tristate "LED Timer Trigger" depends LEDS_TRIGGERS
drivers/leds/Makefile +4 -0
@@ -4,5 +4,9 @@ obj-$(CONFIG_LEDS_CLASS) += led-class.o obj-$(CONFIG_LEDS_TRIGGERS) += led-triggers.o +# LED Platform Drivers +obj-$(CONFIG_LEDS_CORGI) += leds-corgi.o +obj-$(CONFIG_LEDS_SPITZ) += leds-spitz.o + # LED Triggers obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
drivers/leds/leds-corgi.c new file +121 -0
121 lines not on this page · raw message
drivers/leds/leds-spitz.c new file +125 -0
125 lines not on this page · raw message
Quoted 10 lines · Richard Purdie
Adds LED drivers for LEDs found on the Sharp Zaurus c7x0 (corgi, shepherd, husky) and cxx00 (akita, spitz, borzoi) models.
Signed-off-by Richard Purdie <[email protected]>Index:
linux-2.6.15/arch/arm/mach-pxa/corgi.c
===================================================================
arch/arm/mach-pxa/corgi.c line 173
Quoted 9 lines
arch/arm/mach-pxa/corgi.c +6
-0@@ -165,6 +165,15 @@/* +* Corgi LEDs +*/ +static struct platform_device corgiled_device = { + .name ="corgi-led" , + .id =-1 , +};
Please use the platform device interface to create these dynamically and don't make static structures.
thanks,
greg k-h
Quoted 13 lines · Greg KH
Quoted 12 lines · Richard Purdie
Adds LED drivers for LEDs found on the Sharp Zaurus c7x0 (corgi, shepherd, husky) and cxx00 (akita, spitz, borzoi) models.
Signed-off-by Richard Purdie <[email protected]>Index:
linux-2.6.15/arch/arm/mach-pxa/corgi.c
===================================================================arch/arm/mach-pxa/corgi.c +0
-0@@ -165,6 +165,15 @@
Quoted 10 lines
arch/arm/mach-pxa/corgi.c line 173
Quoted 7 lines
arch/arm/mach-pxa/corgi.c +6
-0/* +* Corgi LEDs +*/ +static struct platform_device corgiled_device = { + .name ="corgi-led" , + .id =-1 , +};Please use the platform device interface to create these dynamically and don't make static structures.
This is very much in keeping with the rest of that file and the way this has been traditionally been handled in arm board support files. Admittedly, definitions are usually more complex than this.
Russell, do you have a view on this?
Richard