Skip to content
Snippets Groups Projects
Commit 07f03d08 authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

base-files: support port_state LED types in board.d


Add support for handling port_state LEDs as used by ADM5120.

Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
parent 197c32e7
No related branches found
No related tags found
No related merge requests found
......@@ -354,6 +354,14 @@ generate_led() {
EOF
;;
portstate)
local port_state
json_get_vars port_state
uci -q batch <<-EOF
set system.$cfg.port_state='$port_state'
EOF
;;
timer|oneshot)
local delayon delayoff
json_get_vars delayon delayoff
......
......@@ -432,6 +432,25 @@ ucidef_set_led_switch() {
json_select ..
}
ucidef_set_led_portstate() {
local cfg="led_$1"
local name="$2"
local sysfs="$3"
local port_state="$4"
json_select_object led
json_select_object "$1"
json_add_string name "$name"
json_add_string type portstate
json_add_string sysfs "$sysfs"
json_add_string trigger port_state
json_add_string port_state "$port_state"
json_select ..
json_select ..
}
ucidef_set_led_default() {
local cfg="led_$1"
local name="$2"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment