aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2012-07-17 02:26:11 -0400
committerAndrew Lunn <andrew@lunn.ch>2012-07-27 10:50:33 -0400
commit258f367628ed2258fb1b3ba28a287a6369dd0419 (patch)
treec74595c38916b88fd515c6c05251ac0c50e75848 /arch
parent48135a66c247cfaf99611a19f4272178d3e4f1de (diff)
ARM: Kirkwood: Describe iConnects LEDs in DT.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/kirkwood-iconnect.dts34
-rw-r--r--arch/arm/mach-kirkwood/board-iconnect.c46
2 files changed, 34 insertions, 46 deletions
diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts
index 1b5898eab32c..52d947045106 100644
--- a/arch/arm/boot/dts/kirkwood-iconnect.dts
+++ b/arch/arm/boot/dts/kirkwood-iconnect.dts
@@ -31,4 +31,38 @@
31 status = "ok"; 31 status = "ok";
32 }; 32 };
33 }; 33 };
34 gpio-leds {
35 compatible = "gpio-leds";
36
37 led-level {
38 label = "led_level";
39 gpios = <&gpio1 9 0>;
40 linux,default-trigger = "default-on";
41 };
42 power-blue {
43 label = "power:blue";
44 gpios = <&gpio1 11 0>;
45 linux,default-trigger = "timer";
46 };
47 usb1 {
48 label = "usb1:blue";
49 gpios = <&gpio1 12 0>;
50 };
51 usb2 {
52 label = "usb2:blue";
53 gpios = <&gpio1 13 0>;
54 };
55 usb3 {
56 label = "usb3:blue";
57 gpios = <&gpio1 14 0>;
58 };
59 usb4 {
60 label = "usb4:blue";
61 gpios = <&gpio1 15 0>;
62 };
63 otb {
64 label = "otb:blue";
65 gpios = <&gpio1 16 0>;
66 };
67 };
34}; 68};
diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c
index df043aa754a4..d7a9198ed300 100644
--- a/arch/arm/mach-kirkwood/board-iconnect.c
+++ b/arch/arm/mach-kirkwood/board-iconnect.c
@@ -19,7 +19,6 @@
19#include <linux/mtd/partitions.h> 19#include <linux/mtd/partitions.h>
20#include <linux/mv643xx_eth.h> 20#include <linux/mv643xx_eth.h>
21#include <linux/gpio.h> 21#include <linux/gpio.h>
22#include <linux/leds.h>
23#include <linux/input.h> 22#include <linux/input.h>
24#include <linux/gpio_keys.h> 23#include <linux/gpio_keys.h>
25#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
@@ -31,50 +30,6 @@ static struct mv643xx_eth_platform_data iconnect_ge00_data = {
31 .phy_addr = MV643XX_ETH_PHY_ADDR(11), 30 .phy_addr = MV643XX_ETH_PHY_ADDR(11),
32}; 31};
33 32
34static struct gpio_led iconnect_led_pins[] = {
35 {
36 .name = "led_level",
37 .gpio = 41,
38 .default_trigger = "default-on",
39 }, {
40 .name = "power:blue",
41 .gpio = 42,
42 .default_trigger = "timer",
43 }, {
44 .name = "power:red",
45 .gpio = 43,
46 }, {
47 .name = "usb1:blue",
48 .gpio = 44,
49 }, {
50 .name = "usb2:blue",
51 .gpio = 45,
52 }, {
53 .name = "usb3:blue",
54 .gpio = 46,
55 }, {
56 .name = "usb4:blue",
57 .gpio = 47,
58 }, {
59 .name = "otb:blue",
60 .gpio = 48,
61 },
62};
63
64static struct gpio_led_platform_data iconnect_led_data = {
65 .leds = iconnect_led_pins,
66 .num_leds = ARRAY_SIZE(iconnect_led_pins),
67 .gpio_blink_set = orion_gpio_led_blink_set,
68};
69
70static struct platform_device iconnect_leds = {
71 .name = "leds-gpio",
72 .id = -1,
73 .dev = {
74 .platform_data = &iconnect_led_data,
75 }
76};
77
78static unsigned int iconnect_mpp_config[] __initdata = { 33static unsigned int iconnect_mpp_config[] __initdata = {
79 MPP12_GPIO, 34 MPP12_GPIO,
80 MPP35_GPIO, 35 MPP35_GPIO,
@@ -140,7 +95,6 @@ void __init iconnect_init(void)
140 kirkwood_ge00_init(&iconnect_ge00_data); 95 kirkwood_ge00_init(&iconnect_ge00_data);
141 96
142 platform_device_register(&iconnect_button_device); 97 platform_device_register(&iconnect_button_device);
143 platform_device_register(&iconnect_leds);
144} 98}
145 99
146static int __init iconnect_pci_init(void) 100static int __init iconnect_pci_init(void)