summaryrefslogtreecommitdiff
path: root/include/linux/leds.h
diff options
context:
space:
mode:
authorFabio Baltieri <fabio.baltieri@gmail.com>2012-08-15 21:44:34 +0800
committerBryan Wu <bryan.wu@canonical.com>2012-09-11 18:32:40 +0800
commitd23a22a74fded23a12434c9463fe66cec2b0afcd (patch)
tree65b61353a251d780a7b5f854d1b56cb8d8ca4764 /include/linux/leds.h
parent490dcee9b433302da4ec5325c3e69a0be1201473 (diff)
leds: delay led_set_brightness if stopping soft-blink
Delay execution of led_set_brightness() if need to stop soft-blink timer. This allows led_set_brightness to be called in hard-irq context even if soft-blink was activated on that LED. Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com> Cc: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Diffstat (limited to 'include/linux/leds.h')
-rw-r--r--include/linux/leds.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 3aade1d8f410..56761974f282 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -16,6 +16,7 @@
#include <linux/spinlock.h>
#include <linux/rwsem.h>
#include <linux/timer.h>
+#include <linux/workqueue.h>
struct device;
/*
@@ -69,6 +70,9 @@ struct led_classdev {
struct timer_list blink_timer;
int blink_brightness;
+ struct work_struct set_brightness_work;
+ int delayed_set_value;
+
#ifdef CONFIG_LEDS_TRIGGERS
/* Protects the trigger data below */
struct rw_semaphore trigger_lock;