summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100/badge4.c
diff options
context:
space:
mode:
authorBryan Wu <bryan.wu@canonical.com>2012-03-14 02:22:03 +0800
committerBryan Wu <bryan.wu@canonical.com>2012-08-01 11:22:14 +0800
commit18775a7bea8fbbebe8818db7a64aaeb40b40a0c5 (patch)
tree6f47d6a4147a6505da85cf4126254bdccc458842 /arch/arm/mach-sa1100/badge4.c
parentdafbeadf4a9e1b2765641b687e3343be76d2eacd (diff)
downloadop-kernel-dev-18775a7bea8fbbebe8818db7a64aaeb40b40a0c5.zip
op-kernel-dev-18775a7bea8fbbebe8818db7a64aaeb40b40a0c5.tar.gz
ARM: mach-sa1100: retire custom LED code
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Diffstat (limited to 'arch/arm/mach-sa1100/badge4.c')
-rw-r--r--arch/arm/mach-sa1100/badge4.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c
index b30fb99..038df48 100644
--- a/arch/arm/mach-sa1100/badge4.c
+++ b/arch/arm/mach-sa1100/badge4.c
@@ -22,6 +22,8 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/errno.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
@@ -76,8 +78,36 @@ static struct platform_device sa1111_device = {
.resource = sa1111_resources,
};
+/* LEDs */
+struct gpio_led badge4_gpio_leds[] = {
+ {
+ .name = "badge4:red",
+ .default_trigger = "heartbeat",
+ .gpio = 7,
+ },
+ {
+ .name = "badge4:green",
+ .default_trigger = "cpu0",
+ .gpio = 9,
+ },
+};
+
+static struct gpio_led_platform_data badge4_gpio_led_info = {
+ .leds = badge4_gpio_leds,
+ .num_leds = ARRAY_SIZE(badge4_gpio_leds),
+};
+
+static struct platform_device badge4_leds = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &badge4_gpio_led_info,
+ }
+};
+
static struct platform_device *devices[] __initdata = {
&sa1111_device,
+ &badge4_leds,
};
static int __init badge4_sa1111_init(void)
OpenPOWER on IntegriCloud