ath79: remove model name from LED labels
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sat, 26 Sep 2020 15:31:17 +0000 (17:31 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Fri, 2 Oct 2020 11:51:39 +0000 (13:51 +0200)
commit6f96a4d043a9367c6c0d166299d808df764e88e6
tree2e67e0c56508f18a424183f0e0cef1f9fa736269
parent365a639f916b4e9a3771cbaa1271153e111ebde6
ath79: remove model name from LED labels

Currently, we request LED labels in OpenWrt to follow the scheme

  modelname:color:function

However, specifying the modelname at the beginning is actually
entirely useless for the devices we support in OpenWrt. On the
contrary, having this part actually introduces inconvenience in
several aspects:

  - We need to ensure/check consistency with the DTS compatible
  - We have various exceptions where not the model name is used,
    but the vendor name (like tp-link), which is hard to track
    and justify even for core-developers
  - Having model-based components will not allow to share
    identical LED definitions in DTSI files
  - The inconsistency in what's used for the model part complicates
    several scripts, e.g. board.d/01_leds or LED migrations from
    ar71xx where this was even more messy

Apart from our needs, upstream has deprecated the label property
entirely and introduced new properties to specify color and
function properties separately. However, the implementation does
not appear to be ready and probably won't become ready and/or
match our requirements in the foreseeable future.

However, the limitation of generic LEDs to color and function
properties follows the same idea pointed out above. Generic LEDs
will get names like "green:status" or "red:indicator" then, and
if a "devicename" is prepended, it will be the one of an internal
device, like "phy1:amber:status".

With this patch, we move into the same direction, and just drop
the boardname from the LED labels. This allows to consolidate
a few definitions in DTSI files (will be much more on ramips),
and to drop a few migrations compared to ar71xx that just changed
the boardname. But mainly, it will liberate us from a completely
useless subject to take care of for device support review and
maintenance.
To also drop the boardname from existing configurations, a simple
migration routine is added unconditionally.

Although this seems unfamiliar at first look, a quick check in kernel
for the arm/arm64 dts files revealed that while 1033 lines have
labels with three parts *:*:*, still 284 actually use a two-part
labelling *:*, and thus is also acceptable and not even rare there.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
241 files changed:
target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts
target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts
target/linux/ath79/dts/ar7100_mikrotik_routerboard-4xx.dtsi
target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi
target/linux/ath79/dts/ar7161_aruba_ap-105.dts
target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi
target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts
target/linux/ath79/dts/ar7161_meraki_mr16.dts
target/linux/ath79/dts/ar7161_netgear_wndr.dtsi
target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts
target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts
target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts
target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts
target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts
target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
target/linux/ath79/dts/ar7240_tplink.dtsi
target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi
target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi
target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts
target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi
target/linux/ath79/dts/ar7241_tplink.dtsi
target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts
target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts
target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi
target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts
target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
target/linux/ath79/dts/ar7241_ubnt_airrouter.dts
target/linux/ath79/dts/ar7241_ubnt_unifi.dts
target/linux/ath79/dts/ar7242_avm_fritz300e.dts
target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts
target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi
target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts
target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts
target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts
target/linux/ath79/dts/ar7242_ubnt_sw.dtsi
target/linux/ath79/dts/ar724x_ubnt_xm_outdoor.dtsi
target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts
target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts
target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts
target/linux/ath79/dts/ar9330_dlink_dir-505.dts
target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts
target/linux/ath79/dts/ar9330_pqi_air-pen.dts
target/linux/ath79/dts/ar9331_8dev_carambola2.dts
target/linux/ath79/dts/ar9331_alfa-network_ap121f.dts
target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi
target/linux/ath79/dts/ar9331_alfa-network_ap121fe.dts
target/linux/ath79/dts/ar9331_arduino_yun.dts
target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
target/linux/ath79/dts/ar9331_etactica_eg200.dts
target/linux/ath79/dts/ar9331_glinet_64xx.dtsi
target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts
target/linux/ath79/dts/ar9331_hak5_lan-turtle.dts
target/linux/ath79/dts/ar9331_hak5_packet-squirrel.dts
target/linux/ath79/dts/ar9331_hak5_wifi-pineapple-nano.dts
target/linux/ath79/dts/ar9331_pisen_ts-d084.dts
target/linux/ath79/dts/ar9331_pisen_wmm003n.dts
target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts
target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts
target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi
target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi
target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi
target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts
target/linux/ath79/dts/ar9341_pcs_cr3000.dts
target/linux/ath79/dts/ar9341_pisen_wmb001n.dts
target/linux/ath79/dts/ar9341_tplink.dtsi
target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts
target/linux/ath79/dts/ar9341_tplink_tl-wa850re-v1.dts
target/linux/ath79/dts/ar9341_tplink_tl-wa860re-v1.dts
target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts
target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts
target/linux/ath79/dts/ar9342_iodata_etg3-r.dts
target/linux/ath79/dts/ar9342_ubnt_nanobeam-ac.dts
target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts
target/linux/ath79/dts/ar9342_ubnt_powerbeam-5ac-gen2.dts
target/linux/ath79/dts/ar9342_ubnt_xw.dtsi
target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts
target/linux/ath79/dts/ar9344_alfa-network_n5q.dts
target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts
target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts
target/linux/ath79/dts/ar9344_devolo_magic-2-wifi.dts
target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts
target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts
target/linux/ath79/dts/ar9344_enterasys_ws-ap3705i.dts
target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5n.dtsi
target/linux/ath79/dts/ar9344_netgear_wndr.dtsi
target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi
target/linux/ath79/dts/ar9344_netgear_wndr_wan.dtsi
target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
target/linux/ath79/dts/ar9344_pcs_cap324.dts
target/linux/ath79/dts/ar9344_pcs_cr5000.dts
target/linux/ath79/dts/ar9344_qihoo_c301.dts
target/linux/ath79/dts/ar9344_samsung_wam250.dts
target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts
target/linux/ath79/dts/ar9344_teltonika_rut955.dts
target/linux/ath79/dts/ar9344_tplink_cpe610-v1.dts
target/linux/ath79/dts/ar9344_tplink_cpe610-v2.dts
target/linux/ath79/dts/ar9344_tplink_cpe_1port.dtsi
target/linux/ath79/dts/ar9344_tplink_cpe_2port.dtsi
target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi
target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts
target/linux/ath79/dts/ar9344_wd_mynet-n750.dts
target/linux/ath79/dts/ar9344_wd_mynet-wifi-rangeextender.dts
target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts
target/linux/ath79/dts/qca9531_alfa-network_n2q.dts
target/linux/ath79/dts/qca9531_alfa-network_r36a.dts
target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts
target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts
target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts
target/linux/ath79/dts/qca9531_comfast_cf-e5.dts
target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts
target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts
target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts
target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts
target/linux/ath79/dts/qca9531_dlink_dch-g020-a1.dts
target/linux/ath79/dts/qca9531_engenius_ews511ap.dts
target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
target/linux/ath79/dts/qca9531_glinet_gl-x750.dts
target/linux/ath79/dts/qca9531_telco_t1.dts
target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts
target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts
target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
target/linux/ath79/dts/qca9531_wallys_dr531.dts
target/linux/ath79/dts/qca9531_yuncore_a770.dts
target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts
target/linux/ath79/dts/qca9533_dlink_dap-13xx.dtsi
target/linux/ath79/dts/qca9533_mikrotik_routerboard-lhg-hb.dtsi
target/linux/ath79/dts/qca9533_tplink_cpe210.dtsi
target/linux/ath79/dts/qca9533_tplink_cpe220-v3.dts
target/linux/ath79/dts/qca9533_tplink_cpexxx.dtsi
target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi
target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts
target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi
target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dtsi
target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi
target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts
target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi
target/linux/ath79/dts/qca9556_avm_fritz1750e.dts
target/linux/ath79/dts/qca9556_avm_fritz450e.dts
target/linux/ath79/dts/qca9556_avm_fritzdvbc.dts
target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts
target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi
target/linux/ath79/dts/qca9557_iodata_wn-ac1167dgr.dts
target/linux/ath79/dts/qca9557_iodata_wn-ac1600dgr.dts
target/linux/ath79/dts/qca9557_iodata_wn-ac1600dgr2.dts
target/linux/ath79/dts/qca9557_zyxel_nbg6616.dts
target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts
target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v1.dts
target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v2.dts
target/linux/ath79/dts/qca9558_comfast_cf-wr650ac.dtsi
target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts
target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts
target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts
target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts
target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts
target/linux/ath79/dts/qca9558_devolo_dvl1750x.dts
target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts
target/linux/ath79/dts/qca9558_domywifi_dw33d.dts
target/linux/ath79/dts/qca9558_engenius_ecb1750.dts
target/linux/ath79/dts/qca9558_engenius_epg5000.dts
target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts
target/linux/ath79/dts/qca9558_mikrotik_routerboard-921gs-5hpacd-15s.dts
target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts
target/linux/ath79/dts/qca9558_mikrotik_routerboard-92x.dtsi
target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi
target/linux/ath79/dts/qca9558_ocedo_koala.dts
target/linux/ath79/dts/qca9558_ocedo_ursus.dts
target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts
target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts
target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi
target/linux/ath79/dts/qca9558_tplink_archer-c5-v1.dts
target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts
target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts
target/linux/ath79/dts/qca9558_tplink_archer-d7.dtsi
target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts
target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts
target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi
target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts
target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts
target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts
target/linux/ath79/dts/qca9561_avm_fritz4020.dts
target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts
target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts
target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts
target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi
target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts
target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts
target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts
target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi
target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts
target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts
target/linux/ath79/dts/qca9563_compex_wpj563.dts
target/linux/ath79/dts/qca9563_dlink_dir-842-c.dtsi
target/linux/ath79/dts/qca9563_dlink_dir-842-c1.dts
target/linux/ath79/dts/qca9563_dlink_dir-842-c2.dts
target/linux/ath79/dts/qca9563_dlink_dir-842-c3.dts
target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts
target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts
target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts
target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi
target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi
target/linux/ath79/dts/qca9563_nec_wg1200cr.dts
target/linux/ath79/dts/qca9563_nec_wg800hp.dts
target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts
target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts
target/linux/ath79/dts/qca9563_phicomm_k2t.dts
target/linux/ath79/dts/qca9563_rosinson_wr818.dts
target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts
target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts
target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts
target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts
target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi
target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts
target/linux/ath79/dts/qca9563_tplink_re450.dtsi
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi
target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi
target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts
target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi
target/linux/ath79/dts/qca9563_yuncore_a782.dts
target/linux/ath79/dts/qca9563_yuncore_xd4200.dts
target/linux/ath79/dts/tp9343_tplink_tl-wa901nd.dtsi
target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi
target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts
target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts
target/linux/ath79/generic/base-files/etc/board.d/01_leds
target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration
target/linux/ath79/mikrotik/base-files/etc/board.d/01_leds
target/linux/ath79/mikrotik/base-files/etc/uci-defaults/04_led_migration
target/linux/ath79/nand/base-files/etc/board.d/01_leds
target/linux/ath79/nand/base-files/etc/uci-defaults/04_led_migration [new file with mode: 0644]
target/linux/ath79/tiny/base-files/etc/board.d/01_leds
target/linux/ath79/tiny/base-files/etc/uci-defaults/04_led_migration