aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-01-03 03:04:39 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-01-24 16:39:52 -0500
commitaeee3f5a4d3c3c953bf30e1278df8815995995ac (patch)
treea626d25544c67c3ba740653a900fc1575333c4c4 /arch/mips
parent9cbeac05b63d4a886be25df77aad47c19eefd9d6 (diff)
MIPS: BCM47XX: Use "timer" trigger for status LEDs
Some devices have power LED as well as status LED. The second one is used to show the firmware is up and running. Set "timer" trigger for such LEDs. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/6312/
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/bcm47xx/leds.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c
index cc141c1e668f..28d281cc2e7d 100644
--- a/arch/mips/bcm47xx/leds.c
+++ b/arch/mips/bcm47xx/leds.c
@@ -16,6 +16,16 @@
16 .default_state = _default_state, \ 16 .default_state = _default_state, \
17 } 17 }
18 18
19#define BCM47XX_GPIO_LED_TRIGGER(_gpio, _color, _function, _active_low, \
20 _default_trigger) \
21 { \
22 .name = "bcm47xx:" _color ":" _function, \
23 .gpio = _gpio, \
24 .active_low = _active_low, \
25 .default_state = LEDS_GPIO_DEFSTATE_OFF, \
26 .default_trigger = _default_trigger, \
27 }
28
19/* Asus */ 29/* Asus */
20 30
21static const struct gpio_led 31static const struct gpio_led
@@ -176,13 +186,13 @@ bcm47xx_leds_dell_tm2300[] __initconst = {
176 186
177static const struct gpio_led 187static const struct gpio_led
178bcm47xx_leds_dlink_dir130[] __initconst = { 188bcm47xx_leds_dlink_dir130[] __initconst = {
179 BCM47XX_GPIO_LED(0, "green", "status", 1, LEDS_GPIO_DEFSTATE_OFF), /* Originally blinking when device is ready, separated from "power" LED */ 189 BCM47XX_GPIO_LED_TRIGGER(0, "green", "status", 1, "timer"), /* Originally blinking when device is ready, separated from "power" LED */
180 BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), 190 BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF),
181}; 191};
182 192
183static const struct gpio_led 193static const struct gpio_led
184bcm47xx_leds_dlink_dir330[] __initconst = { 194bcm47xx_leds_dlink_dir330[] __initconst = {
185 BCM47XX_GPIO_LED(0, "green", "status", 1, LEDS_GPIO_DEFSTATE_OFF), /* Originally blinking when device is ready, separated from "power" LED */ 195 BCM47XX_GPIO_LED_TRIGGER(0, "green", "status", 1, "timer"), /* Originally blinking when device is ready, separated from "power" LED */
186 BCM47XX_GPIO_LED(4, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), 196 BCM47XX_GPIO_LED(4, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
187 BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), 197 BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF),
188}; 198};