From 65d184cac386b4a97cdc88428413f00f66abc6e3 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Fri, 20 Nov 2020 16:18:47 +0100 Subject: [PATCH] busybox: standby: ccimx8x/mn: configure power LED for blinking in standby configure power LED for blinking in standby configure power LED solid on after resume https://jira.digi.com/browse/DEL-7330 Signed-off-by: Hector Bujanda --- .../busybox/busybox/ccimx8mn/standby-actions | 19 +++++++++++++++++++ .../busybox/busybox/ccimx8x/standby-actions | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/meta-digi-dey/recipes-core/busybox/busybox/ccimx8mn/standby-actions b/meta-digi-dey/recipes-core/busybox/busybox/ccimx8mn/standby-actions index c6bf84654..8d564dc37 100644 --- a/meta-digi-dey/recipes-core/busybox/busybox/ccimx8mn/standby-actions +++ b/meta-digi-dey/recipes-core/busybox/busybox/ccimx8mn/standby-actions @@ -36,6 +36,17 @@ if [ "${1}" == "pre" ]; then systemctl stop bluetooth systemctl stop bluetooth-init fi + + # Configure Power LED for blinking in standby + if [ -d "/sys/class/leds/power:green" ]; then + # Configure LED for blinking + echo timer > /sys/class/leds/power\:green/trigger + # Turn LED on at max brightness + echo 19 > /sys/class/leds/power\:green/brightness + # Configure blinking timings + echo 100 > /sys/class/leds/power\:green/delay_on + echo 1000 > /sys/class/leds/power\:green/delay_off + fi elif [ "${1}" == "post" ]; then # Resume wireless interfaces if [ -d "/proc/device-tree/wireless" ]; then @@ -61,4 +72,12 @@ elif [ "${1}" == "post" ]; then rm -f /tmp/up_bt_on_resume fi fi + + # Configure Power LED solid on after resume + if [ -d "/sys/class/leds/power:green" ]; then + # Reset LED settings by writing 0 to brigtness descriptor + echo 0 > /sys/class/leds/power\:green/brightness + # Turn LED on at max brightness + echo 19 > /sys/class/leds/power\:green/brightness + fi fi diff --git a/meta-digi-dey/recipes-core/busybox/busybox/ccimx8x/standby-actions b/meta-digi-dey/recipes-core/busybox/busybox/ccimx8x/standby-actions index 3d3a4a85d..f3ba254c9 100644 --- a/meta-digi-dey/recipes-core/busybox/busybox/ccimx8x/standby-actions +++ b/meta-digi-dey/recipes-core/busybox/busybox/ccimx8x/standby-actions @@ -36,6 +36,17 @@ if [ "${1}" == "pre" ]; then systemctl stop bluetooth systemctl stop bluetooth-init fi + + # Configure Power LED for blinking in standby + if [ -d "/sys/class/leds/power:green" ]; then + # Configure LED for blinking + echo timer > /sys/class/leds/power\:green/trigger + # Turn LED on at max brightness + echo 19 > /sys/class/leds/power\:green/brightness + # Configure blinking timings + echo 100 > /sys/class/leds/power\:green/delay_on + echo 1000 > /sys/class/leds/power\:green/delay_off + fi elif [ "${1}" == "post" ]; then # Resume wireless interfaces if [ -d "/proc/device-tree/wireless" ]; then @@ -61,4 +72,12 @@ elif [ "${1}" == "post" ]; then rm -f /tmp/up_bt_on_resume fi fi + + # Configure Power LED solid on after resume + if [ -d "/sys/class/leds/power:green" ]; then + # Reset LED settings by writing 0 to brigtness descriptor + echo 0 > /sys/class/leds/power\:green/brightness + # Turn LED on at max brightness + echo 19 > /sys/class/leds/power\:green/brightness + fi fi