aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood
diff options
context:
space:
mode:
authorJamie Lentin <jm@lentin.co.uk>2012-07-19 16:30:58 -0400
committerAndrew Lunn <andrew@lunn.ch>2012-07-27 10:49:45 -0400
commit09059e9f29d6167511b8df0f6518e8a0b1bd4c70 (patch)
tree4ce170f76b32717f0bd1e7fae18ed55e2eabf100 /arch/arm/mach-kirkwood
parent55650d4e5b0b8de785e4682f4149951e2ce0e731 (diff)
ARM: Kirkwood: Replace DNS-320/DNS-325 leds with dt bindings
Replace code in board-dnskw with the equivalent devicetree bindings. Signed-off-by: Jamie Lentin <jm@lentin.co.uk> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r--arch/arm/mach-kirkwood/board-dnskw.c90
1 files changed, 0 insertions, 90 deletions
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index 1c97efa7705e..aac9c90715c5 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -68,90 +68,6 @@ static unsigned int dnskw_mpp_config[] __initdata = {
68 0 68 0
69}; 69};
70 70
71static struct gpio_led dns325_led_pins[] = {
72 {
73 .name = "dns325:white:power",
74 .gpio = 26,
75 .active_low = 1,
76 .default_trigger = "default-on",
77 },
78 {
79 .name = "dns325:white:usb",
80 .gpio = 43,
81 .active_low = 1,
82 },
83 {
84 .name = "dns325:red:l_hdd",
85 .gpio = 28,
86 .active_low = 1,
87 },
88 {
89 .name = "dns325:red:r_hdd",
90 .gpio = 27,
91 .active_low = 1,
92 },
93 {
94 .name = "dns325:red:usb",
95 .gpio = 29,
96 .active_low = 1,
97 },
98};
99
100static struct gpio_led_platform_data dns325_led_data = {
101 .num_leds = ARRAY_SIZE(dns325_led_pins),
102 .leds = dns325_led_pins,
103};
104
105static struct platform_device dns325_led_device = {
106 .name = "leds-gpio",
107 .id = -1,
108 .dev = {
109 .platform_data = &dns325_led_data,
110 },
111};
112
113static struct gpio_led dns320_led_pins[] = {
114 {
115 .name = "dns320:blue:power",
116 .gpio = 26,
117 .active_low = 1,
118 .default_trigger = "default-on",
119 },
120 {
121 .name = "dns320:blue:usb",
122 .gpio = 43,
123 .active_low = 1,
124 },
125 {
126 .name = "dns320:orange:l_hdd",
127 .gpio = 28,
128 .active_low = 1,
129 },
130 {
131 .name = "dns320:orange:r_hdd",
132 .gpio = 27,
133 .active_low = 1,
134 },
135 {
136 .name = "dns320:orange:usb",
137 .gpio = 35,
138 .active_low = 1,
139 },
140};
141
142static struct gpio_led_platform_data dns320_led_data = {
143 .num_leds = ARRAY_SIZE(dns320_led_pins),
144 .leds = dns320_led_pins,
145};
146
147static struct platform_device dns320_led_device = {
148 .name = "leds-gpio",
149 .id = -1,
150 .dev = {
151 .platform_data = &dns320_led_data,
152 },
153};
154
155static struct gpio_keys_button dnskw_button_pins[] = { 71static struct gpio_keys_button dnskw_button_pins[] = {
156 { 72 {
157 .code = KEY_POWER, 73 .code = KEY_POWER,
@@ -237,12 +153,6 @@ void __init dnskw_init(void)
237 platform_device_register(&dnskw_button_device); 153 platform_device_register(&dnskw_button_device);
238 platform_device_register(&dnskw_fan_device); 154 platform_device_register(&dnskw_fan_device);
239 155
240 if (of_machine_is_compatible("dlink,dns-325"))
241 platform_device_register(&dns325_led_device);
242
243 else if (of_machine_is_compatible("dlink,dns-320"))
244 platform_device_register(&dns320_led_device);
245
246 /* Register power-off GPIO. */ 156 /* Register power-off GPIO. */
247 if (gpio_request(36, "dnskw:power:off") == 0 157 if (gpio_request(36, "dnskw:power:off") == 0
248 && gpio_direction_output(36, 0) == 0) 158 && gpio_direction_output(36, 0) == 0)