summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2013-02-18 20:07:37 +0530
committerSimone Willett <swillett@nvidia.com>2013-03-11 14:59:26 -0700
commit70c53dc7d45828f52902fc6654a58a41676ff8cb (patch)
tree9debca634f10e16aff4b3d254131934af226cd62 /include
parent776ddb6691c30e76a55daf48380a54083cc0a9b6 (diff)
regulator: add support for sleep mode configuration
Some of PMIC like Palma support different bits for configuring rail's mode which is used in sleep mode of device. Add support for configuring this mode bits. Change-Id: Ib1bbc5164bf71c75c727dc759436e8dcf206f511 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> (cherry picked from commit 2fec630607b397475a54c7395558ba55203c0ca9) Reviewed-on: http://git-master/r/207832 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Wen Yi <wyi@nvidia.com> Tested-by: Wen Yi <wyi@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/regulator/consumer.h2
-rw-r--r--include/linux/regulator/driver.h4
-rw-r--r--include/linux/regulator/machine.h3
3 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 109ac78a0d2b..2a6be3f34dc6 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -71,6 +71,7 @@ struct notifier_block;
* in a sleep/standby state. This mode is likely to be
* the most noisy and may not be able to handle fast load
* switching.
+ * OFF Regulator turn off completely.
*
* NOTE: Most regulators will only support a subset of these modes. Some
* will only just support NORMAL.
@@ -82,6 +83,7 @@ struct notifier_block;
#define REGULATOR_MODE_NORMAL 0x2
#define REGULATOR_MODE_IDLE 0x4
#define REGULATOR_MODE_STANDBY 0x8
+#define REGULATOR_MODE_OFF 0x10
/*
* Regulator control modes.
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 2ecf1248112b..46f1f3decc5a 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -113,6 +113,10 @@ struct regulator_ops {
int (*set_mode) (struct regulator_dev *, unsigned int mode);
unsigned int (*get_mode) (struct regulator_dev *);
+ /* get/set regulator sleep mode (defined in consumer.h) */
+ int (*set_sleep_mode) (struct regulator_dev *, unsigned int sleep_mode);
+ unsigned int (*get_sleep_mode) (struct regulator_dev *);
+
/* get/set regulator control mode (defined in consumer.h) */
int (*set_control_mode) (struct regulator_dev *, unsigned int mode);
unsigned int (*get_control_mode) (struct regulator_dev *);
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h
index 1cbe6fe9e05f..3f441cd1f17b 100644
--- a/include/linux/regulator/machine.h
+++ b/include/linux/regulator/machine.h
@@ -128,6 +128,9 @@ struct regulation_constraints {
/* mode to set on startup */
unsigned int initial_mode;
+ /* mode to be set on sleep mode */
+ unsigned int sleep_mode;
+
unsigned int ramp_delay;
/* constraint flags */