aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2012-07-17 01:55:37 -0400
committerAndrew Lunn <andrew@lunn.ch>2012-07-27 10:50:41 -0400
commitb94a257cdb115c0bc2058685b18280c9319780a3 (patch)
tree72a68e74c5fe94dc1d0a87e0b96c8b809e67ea16
parent258f367628ed2258fb1b3ba28a287a6369dd0419 (diff)
ARM: Kirkwood: Describe Dreamplug LEDs in DT.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
-rw-r--r--arch/arm/boot/dts/kirkwood-dreamplug.dts16
-rw-r--r--arch/arm/mach-kirkwood/board-dreamplug.c34
2 files changed, 16 insertions, 34 deletions
diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
index d64ff7d30016..26e281fbf6bc 100644
--- a/arch/arm/boot/dts/kirkwood-dreamplug.dts
+++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
@@ -55,4 +55,20 @@
55 }; 55 };
56 }; 56 };
57 57
58 gpio-leds {
59 compatible = "gpio-leds";
60
61 bluetooth {
62 label = "dreamplug:blue:bluetooth";
63 gpios = <&gpio1 15 1>;
64 };
65 wifi {
66 label = "dreamplug:green:wifi";
67 gpios = <&gpio1 16 1>;
68 };
69 wifi-ap {
70 label = "dreamplug:green:wifi_ap";
71 gpios = <&gpio1 17 1>;
72 };
73 };
58}; 74};
diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c
index e49439320b7d..aeb234d0d0e3 100644
--- a/arch/arm/mach-kirkwood/board-dreamplug.c
+++ b/arch/arm/mach-kirkwood/board-dreamplug.c
@@ -22,7 +22,6 @@
22#include <linux/of_irq.h> 22#include <linux/of_irq.h>
23#include <linux/of_platform.h> 23#include <linux/of_platform.h>
24#include <linux/gpio.h> 24#include <linux/gpio.h>
25#include <linux/leds.h>
26#include <linux/mtd/physmap.h> 25#include <linux/mtd/physmap.h>
27#include <linux/spi/flash.h> 26#include <linux/spi/flash.h>
28#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
@@ -47,37 +46,6 @@ static struct mvsdio_platform_data dreamplug_mvsdio_data = {
47 /* unfortunately the CD signal has not been connected */ 46 /* unfortunately the CD signal has not been connected */
48}; 47};
49 48
50static struct gpio_led dreamplug_led_pins[] = {
51 {
52 .name = "dreamplug:blue:bluetooth",
53 .gpio = 47,
54 .active_low = 1,
55 },
56 {
57 .name = "dreamplug:green:wifi",
58 .gpio = 48,
59 .active_low = 1,
60 },
61 {
62 .name = "dreamplug:green:wifi_ap",
63 .gpio = 49,
64 .active_low = 1,
65 },
66};
67
68static struct gpio_led_platform_data dreamplug_led_data = {
69 .leds = dreamplug_led_pins,
70 .num_leds = ARRAY_SIZE(dreamplug_led_pins),
71};
72
73static struct platform_device dreamplug_leds = {
74 .name = "leds-gpio",
75 .id = -1,
76 .dev = {
77 .platform_data = &dreamplug_led_data,
78 }
79};
80
81static unsigned int dreamplug_mpp_config[] __initdata = { 49static unsigned int dreamplug_mpp_config[] __initdata = {
82 MPP0_SPI_SCn, 50 MPP0_SPI_SCn,
83 MPP1_SPI_MOSI, 51 MPP1_SPI_MOSI,
@@ -100,6 +68,4 @@ void __init dreamplug_init(void)
100 kirkwood_ge00_init(&dreamplug_ge00_data); 68 kirkwood_ge00_init(&dreamplug_ge00_data);
101 kirkwood_ge01_init(&dreamplug_ge01_data); 69 kirkwood_ge01_init(&dreamplug_ge01_data);
102 kirkwood_sdio_init(&dreamplug_mvsdio_data); 70 kirkwood_sdio_init(&dreamplug_mvsdio_data);
103
104 platform_device_register(&dreamplug_leds);
105} 71}