summaryrefslogtreecommitdiff
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2011-07-20 15:04:06 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:47:49 -0800
commit727df62ef3a7e0c53d32ba9b7a361a68defa00fc (patch)
tree5dbc43dd58d5ce8e047de136759437a48ee71e98 /include/linux/regulator
parent6e9b68133112f094d1b82b9ce854853b84480895 (diff)
regulator: Expand regulator notifier events
Add regulator enable notifications (not sent by the current code). Add voltage notifications sent only if regulator output is actually changed (keep intact existing voltage change notification that is sent unconditionally - even if voltage change was not allowed by constraints, or no actual change since regulator is disabled): PRE_ENABLE Regulator is to be enabled POST_ENABLE Regulator was enabled OUT_PRECHANGE Regulator is enabled and its voltage is to be changed OUT_POSTCHANGE Regulator is enabled and its voltage was changed Bug 853132 Original-Change-Id: I2759ada1c5d1e43f746f6c866f9b3c203b68aed6 Reviewed-on: http://git-master/r/42262 Tested-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Karan Jhavar <kjhavar@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Rebase-Id: Rdac9b19d1f999e889aae8e2eb72f9b60057dd05a
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/consumer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index b47771aa5718..24aae2104c08 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -92,6 +92,10 @@
* FORCE_DISABLE Regulator forcibly shut down by software.
* VOLTAGE_CHANGE Regulator voltage changed.
* DISABLE Regulator was disabled.
+ * PRE_ENABLE Regulator is to be enabled
+ * POST_ENABLE Regulator was enabled
+ * OUT_PRECHANGE Regulator is enabled and its voltage is to be changed
+ * OUT_POSTCHANGE Regulator is enabled and its voltage was changed
*
* NOTE: These events can be OR'ed together when passed into handler.
*/
@@ -104,6 +108,10 @@
#define REGULATOR_EVENT_FORCE_DISABLE 0x20
#define REGULATOR_EVENT_VOLTAGE_CHANGE 0x40
#define REGULATOR_EVENT_DISABLE 0x80
+#define REGULATOR_EVENT_PRE_ENABLE 0x100
+#define REGULATOR_EVENT_POST_ENABLE 0x200
+#define REGULATOR_EVENT_OUT_PRECHANGE 0x400
+#define REGULATOR_EVENT_OUT_POSTCHANGE 0x800
struct regulator;