diff options
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r-- | arch/arm/mach-kirkwood/netspace_v2-setup.c | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c index 4c1f4744fe62..3ae158d72681 100644 --- a/arch/arm/mach-kirkwood/netspace_v2-setup.c +++ b/arch/arm/mach-kirkwood/netspace_v2-setup.c | |||
@@ -182,8 +182,14 @@ static struct platform_device netspace_v2_gpio_buttons = { | |||
182 | 182 | ||
183 | static struct gpio_led netspace_v2_gpio_led_pins[] = { | 183 | static struct gpio_led netspace_v2_gpio_led_pins[] = { |
184 | { | 184 | { |
185 | .name = "ns_v2:red:fail", | 185 | .name = "ns_v2:blue:sata", |
186 | .gpio = NETSPACE_V2_GPIO_RED_LED, | 186 | .default_trigger = "default-on", |
187 | .gpio = NETSPACE_V2_GPIO_BLUE_LED_CMD, | ||
188 | .active_low = 1, | ||
189 | }, | ||
190 | { | ||
191 | .name = "ns_v2:red:fail", | ||
192 | .gpio = NETSPACE_V2_GPIO_RED_LED, | ||
187 | }, | 193 | }, |
188 | }; | 194 | }; |
189 | 195 | ||
@@ -202,30 +208,19 @@ static struct platform_device netspace_v2_gpio_leds = { | |||
202 | 208 | ||
203 | static void __init netspace_v2_gpio_leds_init(void) | 209 | static void __init netspace_v2_gpio_leds_init(void) |
204 | { | 210 | { |
205 | platform_device_register(&netspace_v2_gpio_leds); | 211 | int err; |
206 | 212 | ||
207 | /* | 213 | /* Configure register slow_led to allow SATA activity LED blinking */ |
208 | * Configure the front blue LED to blink in relation with the SATA | 214 | err = gpio_request(NETSPACE_V2_GPIO_BLUE_LED_SLOW, "blue LED slow"); |
209 | * activity. | 215 | if (err == 0) { |
210 | */ | 216 | err = gpio_direction_output(NETSPACE_V2_GPIO_BLUE_LED_SLOW, 0); |
211 | if (gpio_request(NETSPACE_V2_GPIO_BLUE_LED_SLOW, | 217 | if (err) |
212 | "SATA blue LED slow") != 0) | 218 | gpio_free(NETSPACE_V2_GPIO_BLUE_LED_SLOW); |
213 | return; | 219 | } |
214 | if (gpio_direction_output(NETSPACE_V2_GPIO_BLUE_LED_SLOW, 0) != 0) | 220 | if (err) |
215 | goto err_free_1; | 221 | pr_err("netspace_v2: failed to configure blue LED slow GPIO\n"); |
216 | if (gpio_request(NETSPACE_V2_GPIO_BLUE_LED_CMD, | 222 | |
217 | "SATA blue LED command") != 0) | 223 | platform_device_register(&netspace_v2_gpio_leds); |
218 | goto err_free_1; | ||
219 | if (gpio_direction_output(NETSPACE_V2_GPIO_BLUE_LED_CMD, 0) != 0) | ||
220 | goto err_free_2; | ||
221 | |||
222 | return; | ||
223 | |||
224 | err_free_2: | ||
225 | gpio_free(NETSPACE_V2_GPIO_BLUE_LED_CMD); | ||
226 | err_free_1: | ||
227 | gpio_free(NETSPACE_V2_GPIO_BLUE_LED_SLOW); | ||
228 | pr_err("netspace_v2: failed to configure SATA blue LED\n"); | ||
229 | } | 224 | } |
230 | 225 | ||
231 | /***************************************************************************** | 226 | /***************************************************************************** |