Signed-off-by: Daniel Golle <daniel@makrotopia.org>master
parent
e882d5bf31
commit
6b2874707a
@ -1,26 +0,0 @@ |
||||
#!/bin/sh |
||||
|
||||
. /lib/functions/uci-defaults.sh |
||||
|
||||
board=$(board_name) |
||||
board_config_update |
||||
|
||||
case $board in |
||||
"akitio,myloud") |
||||
ucidef_set_led_default "status" "status" "akitio:red:status" "0" |
||||
;; |
||||
"mitrastar,stg-212") |
||||
ucidef_set_led_default "power" "power" "zyxel:blue:status" "1" |
||||
;; |
||||
"shuttle,kd20") |
||||
ucidef_set_led_default "power" "power" "kd20:blue:status" "1" |
||||
;; |
||||
"cloudengines,pogoplug"*) |
||||
ucidef_set_led_default "power" "power" "pogoplug:blue:internal" "1" |
||||
;; |
||||
|
||||
esac |
||||
|
||||
board_config_flush |
||||
|
||||
exit 0 |
@ -1,41 +0,0 @@ |
||||
#!/bin/sh |
||||
# Copyright (C) 2009-2013 OpenWrt.org |
||||
|
||||
. /lib/functions.sh |
||||
. /lib/functions/leds.sh |
||||
|
||||
get_status_led() { |
||||
case $(board_name) in |
||||
"akitio,mycloud") |
||||
status_led="akitio:red:status" |
||||
;; |
||||
"mitrastar,stg-212") |
||||
status_led="zyxel:blue:status" |
||||
;; |
||||
"shuttle,kd20") |
||||
status_led="kd20:blue:status" |
||||
;; |
||||
"cloudengines,pogoplug"*) |
||||
status_led="pogoplug:blue:internal" |
||||
;; |
||||
esac |
||||
} |
||||
|
||||
set_state() { |
||||
get_status_led |
||||
|
||||
case "$1" in |
||||
preinit) |
||||
status_led_blink_preinit |
||||
;; |
||||
failsafe) |
||||
status_led_blink_failsafe |
||||
;; |
||||
preinit_regular) |
||||
status_led_blink_preinit_regular |
||||
;; |
||||
done) |
||||
status_led_on |
||||
;; |
||||
esac |
||||
} |
@ -0,0 +1,34 @@ |
||||
--- a/arch/arm/boot/dts/ox820-cloudengines-pogoplug-series-3.dts
|
||||
+++ b/arch/arm/boot/dts/ox820-cloudengines-pogoplug-series-3.dts
|
||||
@@ -28,24 +28,28 @@
|
||||
serial0 = &uart0;
|
||||
gpio0 = &gpio0;
|
||||
gpio1 = &gpio1;
|
||||
+ led-boot = &led_status;
|
||||
+ led-failsafe = &led_warn;
|
||||
+ led-running = &led_act;
|
||||
+ led-upgrade = &led_warn;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
- blue {
|
||||
+ led_status: blue {
|
||||
label = "pogoplug:blue";
|
||||
gpios = <&gpio0 2 0>;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
- orange {
|
||||
+ led_warn: orange {
|
||||
label = "pogoplug:orange";
|
||||
gpios = <&gpio1 16 1>;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
- green {
|
||||
+ led_act: green {
|
||||
label = "pogoplug:green";
|
||||
gpios = <&gpio1 17 1>;
|
||||
default-state = "keep";
|
Loading…
Reference in new issue