aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds.h
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-03-31 05:31:05 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-31 15:18:56 -0500
commitc3bc9956ec52fb2c70f29aa894d8eec766116584 (patch)
treec93aa56e6793cfa283d13a28cfa6c02a30f6c794 /drivers/leds/leds.h
parentc72a1d608dd0eb3d553a08bfdf1c0041bebaa8a0 (diff)
[PATCH] LED: add LED trigger tupport
Add support for LED triggers to the LED subsystem. "Triggers" are events which change the state of an LED. Two kinds of trigger are available, simple ones which can be added to exising code with minimum disruption and complex ones for implementing new or more complex functionality. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/leds/leds.h')
-rw-r--r--drivers/leds/leds.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h
index d26ca2f7e722..a715c4ed93ff 100644
--- a/drivers/leds/leds.h
+++ b/drivers/leds/leds.h
@@ -28,4 +28,17 @@ static inline void led_set_brightness(struct led_classdev *led_cdev,
28extern rwlock_t leds_list_lock; 28extern rwlock_t leds_list_lock;
29extern struct list_head leds_list; 29extern struct list_head leds_list;
30 30
31#ifdef CONFIG_LEDS_TRIGGERS
32void led_trigger_set_default(struct led_classdev *led_cdev);
33void led_trigger_set(struct led_classdev *led_cdev,
34 struct led_trigger *trigger);
35#else
36#define led_trigger_set_default(x) do {} while(0)
37#define led_trigger_set(x, y) do {} while(0)
38#endif
39
40ssize_t led_trigger_store(struct class_device *dev, const char *buf,
41 size_t count);
42ssize_t led_trigger_show(struct class_device *dev, char *buf);
43
31#endif /* __LEDS_H_INCLUDED */ 44#endif /* __LEDS_H_INCLUDED */