summaryrefslogtreecommitdiff
path: root/include/linux/regulator/driver.h
diff options
context:
space:
mode:
authorSumit Semwal <sumit.semwal@linaro.org>2020-05-28 12:30:15 +0530
committerSumit Semwal <sumit.semwal@linaro.org>2020-07-30 17:59:40 +0530
commit0cb367b0bbbe29ef4e68f8d14070d27f42a6a0b6 (patch)
tree55c7758901b927afa0db3fe0b24f601bfd2a5ff0 /include/linux/regulator/driver.h
parent00a3a397540a892d16ee53ea0343b36f4a67534a (diff)
regulator: Allow regulators to verify enabled during enable()
Some regulators might need to verify that they have indeed been enabled after the enable() call is made and enable_time delay has passed. This is implemented by repeatedly checking is_enabled() upto poll_enabled_time, waiting for the already calculated enable delay in each iteration. Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> Change-Id: I8f0c9f6aaa1be5373628b1bcd77dbd6a53c65d0e
Diffstat (limited to 'include/linux/regulator/driver.h')
-rw-r--r--include/linux/regulator/driver.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 7eb9fea8e482..436df3ba0b2a 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -305,6 +305,9 @@ enum regulator_type {
* @enable_time: Time taken for initial enable of regulator (in uS).
* @off_on_delay: guard time (in uS), before re-enabling a regulator
*
+ * @poll_enabled_time: The polling interval (in uS) to use while checking that
+ * the regulator was actually enabled. Max upto enable_time.
+ *
* @of_map_mode: Maps a hardware mode defined in a DeviceTree to a standard mode
*/
struct regulator_desc {
@@ -372,6 +375,8 @@ struct regulator_desc {
unsigned int off_on_delay;
+ unsigned int poll_enabled_time;
+
unsigned int (*of_map_mode)(unsigned int mode);
};