summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDevesh Jhunjhunwala <deveshj@codeaurora.org>2016-06-02 11:59:58 -0700
committerKyle Yan <kyan@codeaurora.org>2016-07-11 18:56:23 -0700
commit94d2a9fd5dc8a51a4b43e82bd2271d209bd132c2 (patch)
tree9cafaade29e7d3659ccca0154781987d9fa511bb /include/linux
parent01d202d756900e3f0f88bf9b184dbcad6874b41b (diff)
leds: qpnp-flash-v2: add regulator support
Add support to control regulators required for flash-led. The pmicobalt_bob regulator is one such regulator required by the flash-led device. CRs-Fixed: 1024187 Change-Id: I1515fba2fb04c0b4d21828af3cea6d322262ab14 Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/leds-qpnp-flash-v2.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/leds-qpnp-flash-v2.h b/include/linux/leds-qpnp-flash-v2.h
index 38d3c9887354..1ff8781d3837 100644
--- a/include/linux/leds-qpnp-flash-v2.h
+++ b/include/linux/leds-qpnp-flash-v2.h
@@ -19,6 +19,12 @@
#define ENABLE_REGULATOR BIT(0)
#define QUERY_MAX_CURRENT BIT(1)
+struct flash_regulator_data {
+ struct regulator *vreg;
+ const char *reg_name;
+ u32 max_volt_uv;
+};
+
/*
* Configurations for each individual LED
*/
@@ -47,6 +53,9 @@ struct flash_node_data {
struct flash_switch_data {
struct platform_device *pdev;
struct led_classdev cdev;
+ struct flash_regulator_data *reg_data;
+ u8 num_regulators;
+ bool regulator_on;
};
int qpnp_flash_led_prepare(struct led_classdev *led_cdev, int options);