dd96317a5f526ca98aecc9019a566f126d7f48b2
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-3.10 / 0166-bcm2708-Allow-disk-activity-led-gpio-to-be-specified.patch
1 From e2fe98dc5d658c504d31a0ad1eb9748a2001ce09 Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Tue, 11 Feb 2014 17:03:51 +0000
4 Subject: [PATCH 166/174] bcm2708: Allow disk activity led gpio to be specified
5
6 ---
7 arch/arm/mach-bcm2708/bcm2708.c | 8 +++++++-
8 1 file changed, 7 insertions(+), 1 deletion(-)
9
10 --- a/arch/arm/mach-bcm2708/bcm2708.c
11 +++ b/arch/arm/mach-bcm2708/bcm2708.c
12 @@ -83,6 +83,8 @@
13 /* command line parameters */
14 static unsigned boardrev, serial;
15 static unsigned uart_clock;
16 +static unsigned disk_led_gpio = 16;
17 +static unsigned disk_led_active_low = 1;
18 static unsigned reboot_part = 0;
19 static unsigned w1_gpio_pin = W1_GPIO;
20
21 @@ -965,7 +967,9 @@ static struct platform_device bcm2708_le
22
23 static void __init bcm2708_init_led(void)
24 {
25 - platform_device_register(&bcm2708_led_device);
26 + bcm2708_leds[0].gpio = disk_led_gpio;
27 + bcm2708_leds[0].active_low = disk_led_active_low;
28 + platform_device_register(&bcm2708_led_device);
29 }
30 #else
31 static inline void bcm2708_init_led(void)
32 @@ -1004,5 +1008,7 @@ MACHINE_END
33 module_param(boardrev, uint, 0644);
34 module_param(serial, uint, 0644);
35 module_param(uart_clock, uint, 0644);
36 +module_param(disk_led_gpio, uint, 0644);
37 +module_param(disk_led_active_low, uint, 0644);
38 module_param(reboot_part, uint, 0644);
39 module_param(w1_gpio_pin, uint, 0644);