aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator/driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/regulator/driver.h')
-rw-r--r--include/linux/regulator/driver.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index bac4c871f3bd..7274a469e8d9 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -32,6 +32,8 @@ enum regulator_status {
32 REGULATOR_STATUS_NORMAL, 32 REGULATOR_STATUS_NORMAL,
33 REGULATOR_STATUS_IDLE, 33 REGULATOR_STATUS_IDLE,
34 REGULATOR_STATUS_STANDBY, 34 REGULATOR_STATUS_STANDBY,
35 /* The regulator is enabled but not regulating */
36 REGULATOR_STATUS_BYPASS,
35 /* in case that any other status doesn't apply */ 37 /* in case that any other status doesn't apply */
36 REGULATOR_STATUS_UNDEFINED, 38 REGULATOR_STATUS_UNDEFINED,
37}; 39};
@@ -67,6 +69,9 @@ enum regulator_status {
67 * @get_optimum_mode: Get the most efficient operating mode for the regulator 69 * @get_optimum_mode: Get the most efficient operating mode for the regulator
68 * when running with the specified parameters. 70 * when running with the specified parameters.
69 * 71 *
72 * @set_bypass: Set the regulator in bypass mode.
73 * @get_bypass: Get the regulator bypass mode state.
74 *
70 * @enable_time: Time taken for the regulator voltage output voltage to 75 * @enable_time: Time taken for the regulator voltage output voltage to
71 * stabilise after being enabled, in microseconds. 76 * stabilise after being enabled, in microseconds.
72 * @set_ramp_delay: Set the ramp delay for the regulator. The driver should 77 * @set_ramp_delay: Set the ramp delay for the regulator. The driver should
@@ -133,6 +138,10 @@ struct regulator_ops {
133 unsigned int (*get_optimum_mode) (struct regulator_dev *, int input_uV, 138 unsigned int (*get_optimum_mode) (struct regulator_dev *, int input_uV,
134 int output_uV, int load_uA); 139 int output_uV, int load_uA);
135 140
141 /* control and report on bypass mode */
142 int (*set_bypass)(struct regulator_dev *dev, bool enable);
143 int (*get_bypass)(struct regulator_dev *dev, bool *enable);
144
136 /* the operations below are for configuration of regulator state when 145 /* the operations below are for configuration of regulator state when
137 * its parent PMIC enters a global STANDBY/HIBERNATE state */ 146 * its parent PMIC enters a global STANDBY/HIBERNATE state */
138 147
@@ -205,6 +214,8 @@ struct regulator_desc {
205 unsigned int vsel_mask; 214 unsigned int vsel_mask;
206 unsigned int enable_reg; 215 unsigned int enable_reg;
207 unsigned int enable_mask; 216 unsigned int enable_mask;
217 unsigned int bypass_reg;
218 unsigned int bypass_mask;
208 219
209 unsigned int enable_time; 220 unsigned int enable_time;
210}; 221};
@@ -253,6 +264,7 @@ struct regulator_dev {
253 int exclusive; 264 int exclusive;
254 u32 use_count; 265 u32 use_count;
255 u32 open_count; 266 u32 open_count;
267 u32 bypass_count;
256 268
257 /* lists we belong to */ 269 /* lists we belong to */
258 struct list_head list; /* list of all regulators */ 270 struct list_head list; /* list of all regulators */
@@ -310,6 +322,8 @@ int regulator_disable_regmap(struct regulator_dev *rdev);
310int regulator_set_voltage_time_sel(struct regulator_dev *rdev, 322int regulator_set_voltage_time_sel(struct regulator_dev *rdev,
311 unsigned int old_selector, 323 unsigned int old_selector,
312 unsigned int new_selector); 324 unsigned int new_selector);
325int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable);
326int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable);
313 327
314void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); 328void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data);
315 329