lantiq: use aliases device tree node for leds

The chosen node is clearly the wrong place for aliases.

Signed-off-by: Mathias Kresin <dev@kresin.me>
owl
Mathias Kresin 2016-10-04 20:34:03 +02:00
parent 8b639410d1
commit e07c80dfc8
36 changed files with 274 additions and 282 deletions

View File

@ -32,7 +32,7 @@ lantiq_get_dt_led() {
local label
local ledpath
local basepath="/sys/firmware/devicetree/base"
local nodepath="$basepath/chosen/leds/$1"
local nodepath="$basepath/aliases/led-$1"
[ -f "$nodepath" ] && ledpath=$(cat "$nodepath")
[ -n "$ledpath" ] && label=$(cat "$basepath$ledpath/label")

View File

@ -7,18 +7,18 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power;
failsafe = &power2;
running = &power;
dsl = &adsl;
internet = &internet;
usb = &usb;
usb2 = &usb2;
wifi = &wifi;
};
aliases {
led-boot = &power;
led-failsafe = &power2;
led-running = &power;
led-dsl = &adsl;
led-internet = &internet;
led-usb = &usb;
led-usb2 = &usb2;
led-wifi = &wifi;
};
memory@0 {

View File

@ -3,17 +3,17 @@
/ {
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power;
failsafe = &power;
running = &power;
dsl = &dsl;
internet = &online;
usb = &usb;
wifi = &wifi;
};
aliases {
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-dsl = &dsl;
led-internet = &online;
led-usb = &usb;
led-wifi = &wifi;
};
memory@0 {

View File

@ -7,17 +7,17 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &dsl;
internet = &internet_green;
usb = &usb;
wifi = &wifi;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-dsl = &dsl;
led-internet = &internet_green;
led-usb = &usb;
led-wifi = &wifi;
};
memory@0 {

View File

@ -7,17 +7,17 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_blue;
failsafe = &power_red;
running = &power_blue;
dsl = &dsl;
internet = &internet_blue;
usb = &usb;
wifi = &wifi;
};
aliases {
led-boot = &power_blue;
led-failsafe = &power_red;
led-running = &power_blue;
led-dsl = &dsl;
led-internet = &internet_blue;
led-usb = &usb;
led-wifi = &wifi;
};
memory@0 {

View File

@ -5,16 +5,14 @@
/ {
model = "ARV4525PW - Speedport W501V Typ A";
chosen {
leds {
aliases {
/* we dont have a power led, lets use the online led */
boot = &online;
failsafe = &online;
led-boot = &online;
led-failsafe = &online;
dsl = &dsl;
internet = &online;
wifi = &wifi;
};
led-dsl = &dsl;
led-internet = &online;
led-wifi = &wifi;
};
memory@0 {

View File

@ -7,16 +7,16 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_blue;
failsafe = &power_red;
running = &power_blue;
internet = &dsl_blue;
usb = &usb;
wifi = &wifi;
};
aliases {
led-boot = &power_blue;
led-failsafe = &power_red;
led-running = &power_blue;
led-internet = &dsl_blue;
led-usb = &usb;
led-wifi = &wifi;
};
memory@0 {
@ -113,7 +113,7 @@
lantiq,pull = <0>;
lantiq,output = <1>;
};
leds {
aliases {
lantiq,pins = "io3", "io5", "io6", "io7", "io9";
lantiq,output = <1>;
};

View File

@ -5,16 +5,14 @@
/ {
model = "ARV7506PW11 - Alice/O2 IAD 4421";
chosen {
leds {
boot = &power;
failsafe = &power_red;
running = &power;
aliases {
led-boot = &power;
led-failsafe = &power_red;
led-running = &power;
dsl = &dsl;
internet = &internet;
wifi = &wlan;
};
led-dsl = &dsl;
led-internet = &internet;
led-wifi = &wlan;
};
memory@0 {

View File

@ -7,15 +7,15 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power;
failsafe = &power;
running = &power;
internet = &internet;
wifi = &wlan;
};
aliases {
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-internet = &internet;
led-wifi = &wlan;
};
memory@0 {

View File

@ -7,17 +7,17 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &dsl;
internet = &online_green;
usb = &usb;
wifi = &wifi;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-dsl = &dsl;
led-internet = &online_green;
led-usb = &usb;
led-wifi = &wifi;
};
memory@0 {
@ -115,7 +115,7 @@
lantiq,pull = <2>;
lantiq,output = <1>;
};
leds {
aliases {
lantiq,pins = "io2", "io4", "io5", "io6", "io7", "io8", "io19";
lantiq,output = <1>;
};

View File

@ -7,16 +7,16 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power;
failsafe = &power2;
running = &power;
dsl = &dsl;
internet = &online;
wifi = &wifi;
};
aliases {
led-boot = &power;
led-failsafe = &power2;
led-running = &power;
led-dsl = &dsl;
led-internet = &online;
led-wifi = &wifi;
};
memory@0 {

View File

@ -7,14 +7,14 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_green;
running = &power_green;
internet = &internet_green;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_green;
led-running = &power_green;
led-internet = &internet_green;
};
memory@0 {

View File

@ -7,16 +7,16 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &power_green;
internet = &online;
wifi = &wifi;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-dsl = &power_green;
led-internet = &online;
led-wifi = &wifi;
};
memory@0 {

View File

@ -7,15 +7,15 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_red;
failsafe = &power_blue;
running = &power_red;
internet = &internet_red;
wifi = &wifi;
};
aliases {
led-boot = &power_red;
led-failsafe = &power_blue;
led-running = &power_red;
led-internet = &internet_red;
led-wifi = &wifi;
};
memory@0 {
@ -111,7 +111,7 @@
lantiq,pull = <2>;
lantiq,output = <1>;
};
leds {
aliases {
lantiq,pins = "io3", "io5", "io6", "io8";
lantiq,output = <1>;
lantiq,pull = <0>;

View File

@ -7,15 +7,15 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_red;
failsafe = &power_blue;
running = &power_red;
internet = &internet_red;
wifi = &wifi;
};
aliases {
led-boot = &power_red;
led-failsafe = &power_blue;
led-running = &power_red;
led-internet = &internet_red;
led-wifi = &wifi;
};
memory@0 {
@ -111,7 +111,7 @@
lantiq,open-drain = <1>;
lantiq,output = <1>;
};
leds {
aliases {
lantiq,pins = "io3", "io5", "io6", "io8";
lantiq,open-drain = <1>;
lantiq,output = <1>;

View File

@ -5,17 +5,15 @@
/ {
model = "ARV8539PW22 - Speedport W 504V Typ A";
chosen {
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
dsl = &dsl_green;
internet = &online_green;
wifi = &wireless_green;
};
};
memory@0 {
reg = <0x0 0x4000000>;

View File

@ -7,15 +7,15 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_orange;
failsafe = &power_red;
running = &power_blue;
internet = &broadband_blue;
wifi = &wireless_blue;
};
aliases {
led-boot = &power_orange;
led-failsafe = &power_red;
led-running = &power_blue;
led-internet = &broadband_blue;
led-wifi = &wireless_blue;
};
memory@0 { /* RAM: Samsung K4H511638F-LC 64MB */

View File

@ -7,15 +7,15 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_orange;
failsafe = &power_red;
running = &power_blue;
internet = &broadband_blue;
wifi = &wireless_blue;
};
aliases {
led-boot = &power_orange;
led-failsafe = &power_red;
led-running = &power_blue;
led-internet = &broadband_blue;
led-wifi = &wireless_blue;
};
memory@0 { /* RAM: Samsung K4H511638F-LC 64MB */

View File

@ -7,15 +7,15 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_blue;
internet = &broadband_blue;
wifi = &wireless_blue;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_blue;
led-internet = &broadband_blue;
led-wifi = &wireless_blue;
};
memory@0 {

View File

@ -8,13 +8,13 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power;
failsafe = &power;
running = &power;
aliases {
led-boot = &power;
led-failsafe = &power;
led-running = &power;
dsl = &dsl;
internet = &online_green;
led-dsl = &dsl;
led-internet = &online_green;
};
};

View File

@ -3,17 +3,17 @@
/ {
chosen {
bootargs = "root= console=ttyLTQ0,115200";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &dsl;
internet = &internet;
usb = &usb;
wifi = &wifi;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-dsl = &dsl;
led-internet = &internet;
led-usb = &usb;
led-wifi = &wifi;
};
memory@0 {

View File

@ -3,15 +3,15 @@
/ {
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power;
failsafe = &power;
running = &power;
usb = &usb1;
usb2 = &usb2;
};
aliases {
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-usb = &usb1;
led-usb2 = &usb2;
};
memory@0 {

View File

@ -7,16 +7,16 @@
chosen {
bootargs = "console=ttyLTQ0,115200 ubi.mtd=1,512 root=/dev/mtdblock9";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &dsl;
internet = &info_green;
wifi = &wifi;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-dsl = &dsl;
led-internet = &info_green;
led-wifi = &wifi;
};
memory@0 {

View File

@ -7,16 +7,16 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power;
failsafe = &power;
running = &power;
internet = &info_green;
dsl = &power;
wifi = &wlan;
};
aliases {
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-internet = &info_green;
led-dsl = &power;
led-wifi = &wlan;
};
memory@0 {

View File

@ -7,16 +7,16 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
internet = &info_green;
dsl = &power_green;
wifi = &wifi;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-internet = &info_green;
led-dsl = &power_green;
led-wifi = &wifi;
};
memory@0 {

View File

@ -7,17 +7,17 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_green;
running = &power_green;
dsl = &dsl;
internet = &online;
usb = &usb;
wifi = &wifi;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_green;
led-running = &power_green;
led-dsl = &dsl;
led-internet = &online;
led-usb = &usb;
led-wifi = &wifi;
};
memory@0 {

View File

@ -7,16 +7,16 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &dsl;
internet = &online;
wifi = &wifi;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-dsl = &dsl;
led-internet = &online;
led-wifi = &wifi;
};
memory@0 {

View File

@ -5,11 +5,9 @@
/ {
model = "P2812HNUF1 - ZyXEL P-2812HNU-F1";
chosen {
leds {
usb = &usb1;
usb2 = &usb2;
};
aliases {
led-usb = &usb1;
led-usb2 = &usb2;
};
fpi@10000000 {

View File

@ -3,16 +3,16 @@
/ {
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &dsl_green;
internet = &internet_green;
wifi = &wireless_green;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-dsl = &dsl_green;
led-internet = &internet_green;
led-wifi = &wireless_green;
};
cputemp@0 {

View File

@ -3,17 +3,17 @@
/ {
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
/* the power led can't be controlled, use the wps led instead */
boot = &wps;
failsafe = &wps;
dsl = &dsl;
internet = &internet;
usb = &usb0;
usb2 = &usb2;
};
aliases {
/* the power led can't be controlled, use the wps led instead */
led-boot = &wps;
led-failsafe = &wps;
led-dsl = &dsl;
led-internet = &internet;
led-usb = &usb0;
led-usb2 = &usb2;
};
memory@0 {

View File

@ -7,14 +7,14 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
internet = &dsl;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-internet = &dsl;
};
memory@0 {

View File

@ -5,16 +5,16 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &dsl;
internet = &internet_green;
wifi = &wifi;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-dsl = &dsl;
led-internet = &internet_green;
led-wifi = &wifi;
};
memory@0 {

View File

@ -6,16 +6,16 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &broadband_green;
internet = &internet_green;
wifi = &wireless_green;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-dsl = &broadband_green;
led-internet = &internet_green;
led-wifi = &wireless_green;
};
memory@0 {

View File

@ -7,16 +7,16 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power;
failsafe = &power;
dsl = &dsl;
internet = &internet;
usb = &usb;
usb2 = &usb;
};
aliases {
led-boot = &power;
led-failsafe = &power;
led-dsl = &dsl;
led-internet = &internet;
led-usb = &usb;
led-usb2 = &usb;
};
memory@0 {

View File

@ -7,17 +7,17 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &dsl;
internet = &online_green;
usb = &usb;
wifi = &wifi;
};
aliases {
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-dsl = &dsl;
led-internet = &online_green;
led-usb = &usb;
led-wifi = &wifi;
};
memory@0 {

View File

@ -7,16 +7,16 @@
chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds {
boot = &power_g;
failsafe = &diag_r;
running = &power_g;
dsl = &dsl;
internet = &router_g;
wifi = &wifi_g;
};
aliases {
led-boot = &power_g;
led-failsafe = &diag_r;
led-running = &power_g;
led-dsl = &dsl;
led-internet = &router_g;
led-wifi = &wifi_g;
};
memory@0 {