From aab8e20f28eba03c09b9d20662adb7ce046df354 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 21 Dec 2023 08:25:16 +0100 Subject: [PATCH] base-files: add support for the pattern trigger to the led script https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/leds-trigger-pattern.txt Signed-off-by: John Crispin --- package/base-files/files/etc/init.d/led | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led index ea2688cab2..9c4d2091c8 100755 --- a/package/base-files/files/etc/init.d/led +++ b/package/base-files/files/etc/init.d/led @@ -62,6 +62,7 @@ load_led() { config_get delay $1 delay "150" config_get message $1 message "" config_get gpio $1 gpio "0" + config_get pattern $1 pattern "0 1000 25 1000" config_get_bool inverted $1 inverted "0" # execute application led trigger @@ -150,6 +151,10 @@ load_led() { echo $inverted > /sys/class/leds/${sysfs}/inverted ;; + "pattern") + echo $pattern > /sys/class/leds/${sysfs}/pattern + ;; + switch[0-9]*) local port_mask speed_mask -- 2.30.2