summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChun Zhang <chunz@codeaurora.org>2016-04-05 23:36:54 -0700
committerKyle Yan <kyan@codeaurora.org>2016-07-11 18:56:22 -0700
commit01d202d756900e3f0f88bf9b184dbcad6874b41b (patch)
tree137cbf095c8dd5ed864458284d73622a7d7f02d9 /include/linux
parent9eb8b67fe9eef65412d630e0ab3d90300a601450 (diff)
leds: qpnp-flash-v2: add callback for max current query
Flash LED is a high energy aggregator from system as it is capable to provide current up to 3750mA for illumination. Therefore, it should be used with caution especially when battery state of charge is low. Therefore, add a function which can be used by clients like camera to query the flash current limit before using flash LED. This protects the system from a possible UVLO condition. CRs-Fixed: 964855 Change-Id: I17fa4f28cc151e3a3ad89d284995a3fa770bec68 Signed-off-by: Chun Zhang <chunz@codeaurora.org> Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/leds-qpnp-flash-v2.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/leds-qpnp-flash-v2.h b/include/linux/leds-qpnp-flash-v2.h
index c1e841689b55..38d3c9887354 100644
--- a/include/linux/leds-qpnp-flash-v2.h
+++ b/include/linux/leds-qpnp-flash-v2.h
@@ -16,6 +16,9 @@
#include <linux/leds.h>
#include "leds.h"
+#define ENABLE_REGULATOR BIT(0)
+#define QUERY_MAX_CURRENT BIT(1)
+
/*
* Configurations for each individual LED
*/
@@ -46,4 +49,6 @@ struct flash_switch_data {
struct led_classdev cdev;
};
+int qpnp_flash_led_prepare(struct led_classdev *led_cdev, int options);
+
#endif