summaryrefslogtreecommitdiff
path: root/arch/arm/mach-versatile
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-05-04 21:10:45 -0700
committerOlof Johansson <olof@lixom.net>2014-05-04 21:10:45 -0700
commitf375964d34f8f5447dbe7a3b72c071a1d3491bca (patch)
tree484273a5fd370d46c30fc1cbcd1a76556c240c8f /arch/arm/mach-versatile
parentcfbf8d4857c26a8a307fb7cd258074c9dcd8c691 (diff)
parent9b58d187fdce9df05fd331ad5790bf503d7e3dfe (diff)
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.c16
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];