From 13ca47fc05b4ba7f84361569200b0dc86915896a Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 4 Apr 2019 09:58:34 -0500 Subject: Fix LED status on upgrade. --- ...x-brightness-setting-when-setting-delay_off-0.patch | 18 ++++++++++++++++++ recipes-kernel/linux/linux-at91_4.9.87.bb | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 recipes-kernel/linux/linux-at91-4.9.87/linux-4.9-led-core-Fix-brightness-setting-when-setting-delay_off-0.patch diff --git a/recipes-kernel/linux/linux-at91-4.9.87/linux-4.9-led-core-Fix-brightness-setting-when-setting-delay_off-0.patch b/recipes-kernel/linux/linux-at91-4.9.87/linux-4.9-led-core-Fix-brightness-setting-when-setting-delay_off-0.patch new file mode 100644 index 0000000..61aa7e1 --- /dev/null +++ b/recipes-kernel/linux/linux-at91-4.9.87/linux-4.9-led-core-Fix-brightness-setting-when-setting-delay_off-0.patch @@ -0,0 +1,18 @@ +The purpose of the patch is to fix ledtrig-timer functionality that is used to indicate the firmware upgrade is in progress. +The fix is based on https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b6af2c53192f1766892ef40c8f48a413509ed72 + +diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c +index d70d4a5..454ed4d 100644 +--- a/drivers/leds/led-core.c ++++ b/drivers/leds/led-core.c +@@ -186,8 +186,9 @@ void led_blink_set(struct led_classdev *led_cdev, + unsigned long *delay_on, + unsigned long *delay_off) + { +- led_stop_software_blink(led_cdev); ++ del_timer_sync(&led_cdev->blink_timer); + ++ led_cdev->flags &= ~LED_BLINK_SW; + led_cdev->flags &= ~LED_BLINK_ONESHOT; + led_cdev->flags &= ~LED_BLINK_ONESHOT_STOP; + diff --git a/recipes-kernel/linux/linux-at91_4.9.87.bb b/recipes-kernel/linux/linux-at91_4.9.87.bb index f2d601a..cc7186d 100644 --- a/recipes-kernel/linux/linux-at91_4.9.87.bb +++ b/recipes-kernel/linux/linux-at91_4.9.87.bb @@ -18,7 +18,7 @@ RDEPENDS_kernel-base="" FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:" KERNEL_EXTRA_ARGS ="LOADADDR=0x20008000" -PR = "r5" +PR = "r6" KERNEL_VERSION = "${PV}" EXTRAVERSION = "" @@ -45,6 +45,7 @@ COMMON_PATCHES = " \ file://linux-4.9-telit_print_qmi_wwan.patch \ file://linux-4.9-addl-time-for-pmeccerrloc.patch \ file://950-0090-OF-DT-Overlay-configfs-interface.patch \ + file://led-core-Fix-brightness-setting-when-setting-delay_off-0.patch \ " -- cgit v1.2.3