summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-05-07 13:39:56 +0200
committerDenys Dmytriyenko <denys@ti.com>2012-05-10 15:34:25 -0400
commitab70600459a12087a98676dd54c6b03469664fbc (patch)
tree97fe6a2db54101531e0aea768b354e55fc283547
parentcd3ef0bf0c03e4e5fdfcea12d8798571012858ae (diff)
downloadmeta-ti-ab70600459a12087a98676dd54c6b03469664fbc.tar.gz
linux-ti335x-psp 3.2: add patch to disable heartbeat LED trigger on shutdown
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch67
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp_3.2.bb3
2 files changed, 69 insertions, 1 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch
new file mode 100644
index 00000000..009f8fa6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch
@@ -0,0 +1,67 @@
1From fa1fff60e0f18032378fa97a6951c6f79e24507d Mon Sep 17 00:00:00 2001
2From: Alexander Holler <hol...@ahsoftware.de>
3Date: Wed, 25 Apr 2012 00:50:03 +0200
4Subject: [PATCH] leds: heartbeat: stop on shutdown, reboot or panic
5
6A halted kernel should not show a heartbeat.
7
8Signed-off-by: Alexander Holler <hol...@ahsoftware.de>
9Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
10---
11 drivers/leds/ledtrig-heartbeat.c | 27 ++++++++++++++++++++++++++-
12 1 file changed, 26 insertions(+), 1 deletion(-)
13
14diff --git a/drivers/leds/ledtrig-heartbeat.c b/drivers/leds/ledtrig-heartbeat.c
15index 759c0bb..31c234c 100644
16--- a/drivers/leds/ledtrig-heartbeat.c
17+++ b/drivers/leds/ledtrig-heartbeat.c
18@@ -18,6 +18,7 @@
19 #include <linux/timer.h>
20 #include <linux/sched.h>
21 #include <linux/leds.h>
22+#include <linux/reboot.h>
23 #include "leds.h"
24
25 struct heartbeat_trig_data {
26@@ -101,13 +102,37 @@ static struct led_trigger heartbeat_led_trigger = {
27 .deactivate = heartbeat_trig_deactivate,
28 };
29
30+static int heartbeat_reboot_notifier(struct notifier_block *nb,
31+ unsigned long code, void *unused)
32+{
33+ led_trigger_unregister(&heartbeat_led_trigger);
34+ return NOTIFY_DONE;
35+}
36+
37+static struct notifier_block heartbeat_reboot_nb = {
38+ .notifier_call = heartbeat_reboot_notifier,
39+};
40+
41+static struct notifier_block heartbeat_panic_nb = {
42+ .notifier_call = heartbeat_reboot_notifier,
43+};
44+
45 static int __init heartbeat_trig_init(void)
46 {
47- return led_trigger_register(&heartbeat_led_trigger);
48+ int rc = led_trigger_register(&heartbeat_led_trigger);
49+ if (!rc) {
50+ atomic_notifier_chain_register(&panic_notifier_list,
51+ &heartbeat_panic_nb);
52+ register_reboot_notifier(&heartbeat_reboot_nb);
53+ }
54+ return rc;
55 }
56
57 static void __exit heartbeat_trig_exit(void)
58 {
59+ unregister_reboot_notifier(&heartbeat_reboot_nb);
60+ atomic_notifier_chain_unregister(&panic_notifier_list,
61+ &heartbeat_panic_nb);
62 led_trigger_unregister(&heartbeat_led_trigger);
63 }
64
65--
661.7.9.5
67
diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
index 2e75cc28..de3129d0 100644
--- a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
+++ b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
@@ -12,7 +12,7 @@ MULTI_CONFIG_BASE_SUFFIX = ""
12 12
13BRANCH = "v3.2-staging" 13BRANCH = "v3.2-staging"
14SRCREV = "31944a82681a0e7ab6cc3e069c30eddc5042e3e8" 14SRCREV = "31944a82681a0e7ab6cc3e069c30eddc5042e3e8"
15MACHINE_KERNEL_PR_append = "d+gitr${SRCREV}" 15MACHINE_KERNEL_PR_append = "e+gitr${SRCREV}"
16 16
17COMPATIBLE_MACHINE = "(ti33x)" 17COMPATIBLE_MACHINE = "(ti33x)"
18 18
@@ -924,6 +924,7 @@ PATCHES_OVER_PSP = " \
924 file://3.2.16/0067-drm-radeon-disable-MSI-on-RV515.patch \ 924 file://3.2.16/0067-drm-radeon-disable-MSI-on-RV515.patch \
925 file://3.2.16/0068-drm-radeon-fix-load-detect-on-rn50-with-hardcoded-ED.patch \ 925 file://3.2.16/0068-drm-radeon-fix-load-detect-on-rn50-with-hardcoded-ED.patch \
926 file://3.2.16/0069-Linux-3.2.16.patch \ 926 file://3.2.16/0069-Linux-3.2.16.patch \
927 file://led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch \
927 file://beaglebone/0001-f_rndis-HACK-around-undefined-variables.patch \ 928 file://beaglebone/0001-f_rndis-HACK-around-undefined-variables.patch \
928 file://beaglebone/0002-da8xx-fb-add-DVI-support-for-beaglebone.patch \ 929 file://beaglebone/0002-da8xx-fb-add-DVI-support-for-beaglebone.patch \
929 file://beaglebone/0003-beaglebone-rebase-everything-onto-3.2-WARNING-MEGAPA.patch \ 930 file://beaglebone/0003-beaglebone-rebase-everything-onto-3.2-WARNING-MEGAPA.patch \