diff options
author | Olof Johansson <olof@lixom.net> | 2014-05-05 06:10:45 +0200 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2014-05-05 06:10:45 +0200 |
commit | f375964d34f8f5447dbe7a3b72c071a1d3491bca (patch) | |
tree | 484273a5fd370d46c30fc1cbcd1a76556c240c8f /arch/arm/mach-versatile | |
parent | Linux 3.14-rc4 (diff) | |
parent | ARM: plat-versatile: update defconfigs for Versatile LEDs (diff) | |
download | linux-f375964d34f8f5447dbe7a3b72c071a1d3491bca.tar.xz linux-f375964d34f8f5447dbe7a3b72c071a1d3491bca.zip |
Merge tag 'versatile-leds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/cleanup
Merge "Versatile LEDs conversion" from Linus Walleij:
This contains a christmas-decoration fix from Russell
King, converts the Versatile LEDs to a platform device
and moves the driver to the LEDs subsystem.
* tag 'versatile-leds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator:
ARM: plat-versatile: update defconfigs for Versatile LEDs
ARM/leds: move ARM Versatile LED driver to leds subsystem
ARM: plat-versatile: convert LEDs to platform device
ARM: plat-versatile: LEDs initialise to off state
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-versatile')
-rw-r--r-- | arch/arm/mach-versatile/core.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index a335126ae18f..b31878570a00 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c @@ -310,6 +310,21 @@ static struct platform_device char_lcd_device = { .resource = char_lcd_resources, }; +static struct resource leds_resources[] = { + { + .start = VERSATILE_SYS_BASE + VERSATILE_SYS_LED_OFFSET, + .end = VERSATILE_SYS_BASE + VERSATILE_SYS_LED_OFFSET + 4, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device leds_device = { + .name = "versatile-leds", + .id = -1, + .num_resources = ARRAY_SIZE(leds_resources), + .resource = leds_resources, +}; + /* * Clock handling */ @@ -795,6 +810,7 @@ void __init versatile_init(void) platform_device_register(&versatile_i2c_device); platform_device_register(&smc91x_device); platform_device_register(&char_lcd_device); + platform_device_register(&leds_device); for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { struct amba_device *d = amba_devs[i]; |