summaryrefslogtreecommitdiffstats
path: root/include/linux/leds.h
diff options
context:
space:
mode:
authorKim, Milo2013-03-14 12:29:24 +0100
committerBryan Wu2013-04-01 20:04:50 +0200
commit48a1d032c954b9b06c3adbf35ef4735dd70ab757 (patch)
tree1565df19ce741f9332e0a53cc9ef4881a389c002 /include/linux/leds.h
parentleds: trigger: use inline functions instead of macros (diff)
downloadkernel-qcow2-linux-48a1d032c954b9b06c3adbf35ef4735dd70ab757.tar.gz
kernel-qcow2-linux-48a1d032c954b9b06c3adbf35ef4735dd70ab757.tar.xz
kernel-qcow2-linux-48a1d032c954b9b06c3adbf35ef4735dd70ab757.zip
leds: add camera LED triggers
Some LED devices support flash/torch functionality through the LED subsystem. This patch enables direct LED trigger controls by the driver. Flash on/off and torch on/off can be done simply by other driver space. Two trigger APIs are added, ledtrig_flash_ctrl() and ledtrig_torch_ctrl(). Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'include/linux/leds.h')
-rw-r--r--include/linux/leds.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 2d8c0b4f2f76..0287ab296689 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -218,6 +218,14 @@ extern void ledtrig_ide_activity(void);
static inline void ledtrig_ide_activity(void) {}
#endif
+#if defined(CONFIG_LEDS_TRIGGER_CAMERA) || defined(CONFIG_LEDS_TRIGGER_CAMERA_MODULE)
+extern void ledtrig_flash_ctrl(bool on);
+extern void ledtrig_torch_ctrl(bool on);
+#else
+static inline void ledtrig_flash_ctrl(bool on) {}
+static inline void ledtrig_torch_ctrl(bool on) {}
+#endif
+
/*
* Generic LED platform data for describing LED names and default triggers.
*/