Amstrad Delta LED support
Subsystems (4)
PATCH 1/1 Amstrad Delta LED support
[Which tree should I be trying to submit this to? The patch is against and works fine with 2.6.17-rc2]
Use the new LED infrastructure to support the 6 LEDs present on the Amstrad Delta.
-----
arch/arm/mach-omap1/board-ams-delta.c +11 -0
@@ -84,6 +84,15 @@ static struct omap_board_config_kernel a { OMAP_TAG_UART, &ams_delta_uart_config }, }; +static struct platform_device ams_delta_led_device = { + .name ="ams-delta-led" , + .id =-1 +}; + +static struct platform_device *ams_delta_devices[]__initdata = { + &ams_delta_led_device, +}; +static void __init ams_delta_init (void ) {iotable_init (ams_delta_io_desc,ARRAY_SIZE (ams_delta_io_desc));
@@ -94,6 +103,8 @@ static void __init ams_delta_init(void)/* Clear latch2 (NAND, LCD, modem enable) */ ams_delta_latch2_write (~0 ,0 ); + +platform_add_devices (ams_delta_devices,ARRAY_SIZE (ams_delta_devices)); }static void __init ams_delta_map_io (void )
drivers/leds/Kconfig +6 -0
@@ -60,6 +60,12 @@ config LEDS_S3C24XX This option enables support for LEDs connected to GPIO lines on Samsung S3C24XX series CPUs, such as the S3C2410 and S3C2440. +config LEDS_AMS_DELTA + tristate "LED Support for the Amstrad Delta (E3)" + depends LEDS_CLASS && MACH_AMS_DELTA + help + This option enables support for the LEDs on Amstrad Delta (E3). + comment "LED Triggers" config LEDS_TRIGGERS
drivers/leds/leds-ams-delta.c +161 -0
161 lines not on this page · raw message
drivers/leds/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_LEDS_SPITZ) += leds-spitz. obj-$(CONFIG_LEDS_IXP4XX) += leds-ixp4xx-gpio.o obj-$(CONFIG_LEDS_TOSA) += leds-tosa.o obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o +obj-$(CONFIG_LEDS_AMS_DELTA) += leds-ams-delta.o # LED Triggers obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
-----
J.
Signature · 1 line
101 things you can't have too much of : 4 - Chocolate.
Quoted 2 lines · Jonathan McDowell
[Which tree should I be trying to submit this to? The patch is against and works fine with 2.6.17-rc2]
I prefer the following PM defines, so there is only one block of CONFIG_PM
#ifdef CONFIG_PM
int foo_suspend(...)
{
}
int foo_resume(...)
{
}
#else
#define foo_suspend NULL
#define foo_resume NULL
#endif
Quoted 6 lines
(quoted diff) +6
-0+static struct platform_driver foo_driver = { + .probe = foo_probe, + .remove = foo_remove, + .suspend = foo_suspend, + .resume = foo_resume, +};
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/) 'a smiley only costs 4 bytes'
Quoted 5 lines · Ben Dooks
Quoted 2 lines · Jonathan McDowell
[Which tree should I be trying to submit this to? The patch is against and works fine with 2.6.17-rc2]
I prefer the following PM defines, so there is only one block of
CONFIG_PM
Seems reasonable; leds-spitz has the two blocks and that's what I'd used as inspiration. Revised version below.
Use the new LED infrastructure to support the 6 LEDs present on the Amstrad Delta.
-----
arch/arm/mach-omap1/board-ams-delta.c +11 -0
@@ -84,6 +84,15 @@ static struct omap_board_config_kernel a { OMAP_TAG_UART, &ams_delta_uart_config }, }; +static struct platform_device ams_delta_led_device = { + .name ="ams-delta-led" , + .id =-1 +}; + +static struct platform_device *ams_delta_devices[]__initdata = { + &ams_delta_led_device, +}; +static void __init ams_delta_init (void ) {iotable_init (ams_delta_io_desc,ARRAY_SIZE (ams_delta_io_desc));
@@ -94,6 +103,8 @@ static void __init ams_delta_init(void)/* Clear latch2 (NAND, LCD, modem enable) */ ams_delta_latch2_write (~0 ,0 ); + +platform_add_devices (ams_delta_devices,ARRAY_SIZE (ams_delta_devices)); }static void __init ams_delta_map_io (void )
drivers/leds/Kconfig +6 -0
@@ -60,6 +60,12 @@ config LEDS_S3C24XX This option enables support for LEDs connected to GPIO lines on Samsung S3C24XX series CPUs, such as the S3C2410 and S3C2440. +config LEDS_AMS_DELTA + tristate "LED Support for the Amstrad Delta (E3)" + depends LEDS_CLASS && MACH_AMS_DELTA + help + This option enables support for the LEDs on Amstrad Delta (E3). + comment "LED Triggers" config LEDS_TRIGGERS
drivers/leds/leds-ams-delta.c +162 -0
162 lines not on this page · raw message
drivers/leds/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_LEDS_SPITZ) += leds-spitz. obj-$(CONFIG_LEDS_IXP4XX) += leds-ixp4xx-gpio.o obj-$(CONFIG_LEDS_TOSA) += leds-tosa.o obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o +obj-$(CONFIG_LEDS_AMS_DELTA) += leds-ams-delta.o # LED Triggers obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
-----
J.
Signature · 1 line
noodles is owned by dr
Richard Purdie
Acked-byQuoted 12 lines · Jonathan McDowell
Quoted 5 lines · Ben Dooks
Quoted 2 lines · Jonathan McDowell
[Which tree should I be trying to submit this to? The patch is against and works fine with 2.6.17-rc2]
I prefer the following PM defines, so there is only one block of
CONFIG_PMSeems reasonable; leds-spitz has the two blocks and that's what I'd used as inspiration. Revised version below.
Quoted 4 lines
Use the new LED infrastructure to support the 6 LEDs present on the Amstrad Delta.
Signed-off-by Jonathan McDowell <[email protected]>