diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 08:58:47 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 08:58:47 -0700 |
| commit | aae6f989c6e97ff8197717fa4d032ad4eba091a7 (patch) | |
| tree | 3908e2748a91045688a4778872785b8b0660d073 /include/linux/regulator/consumer.h | |
| parent | b34e5f55a1e6667a800280fc4045632c139b4e4e (diff) | |
| parent | 6a2027abd2048f7f7fdcc6e11ff10b3d9b0d0899 (diff) | |
| download | linux-aae6f989c6e97ff8197717fa4d032ad4eba091a7.tar.gz linux-aae6f989c6e97ff8197717fa4d032ad4eba091a7.tar.bz2 linux-aae6f989c6e97ff8197717fa4d032ad4eba091a7.zip | |
Merge tag 'regulator-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown:
- Support for putting regulators into bypass mode where they simply
switch their input to the output (mainly used for low power
retention).
- A new API for setting voltages based on a voltage plus tolerance
rather than an explicit voltage range.
- Lots of cleanups and API updates from Axel Lin.
- New driver for MAX8907.
* tag 'regulator-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (71 commits)
regulator: arizona-ldo: Remove top voltage
regulator: tps6586x: remove regulator-compatible from DT docs
regulator: tps65217.txt: remove regulator-compatible from DT docs
regulator: deprecate regulator-compatible DT property
regulator: fan53555: remove vsel_max not used
regulator: aat2870: Don't explicitly initialise the first field
extcon: arizona: Use bypass mode for MICVDD
regulator: wm831x-ldo: Add bypass support
regulator: arizona-micsupp: Support get/set bypass
regulator: arizona-ldo: Support get/set bypass
regulator: core: Provide regmap get/set bypass operations
regulator: core: Support bypass mode
regulator: Fairchild fan53555 support
regulator: twl: Remove another unused variable warning
regulator: core: Try using the parent device for the default regmap
regulator: core: Fast path non-deferred disables
regulator: core: Report microvolts in sysfs even with only list_voltage()
regulator: tps6586x: add support for SYS rail
regulator: lp872x: remove unnecessary function
regulator: lp872x: fix NULL pointer access problem
...
Diffstat (limited to 'include/linux/regulator/consumer.h')
| -rw-r--r-- | include/linux/regulator/consumer.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index da339fd8c755..c43cd3556b1f 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -177,6 +177,8 @@ int regulator_set_mode(struct regulator *regulator, unsigned int mode); unsigned int regulator_get_mode(struct regulator *regulator); int regulator_set_optimum_mode(struct regulator *regulator, int load_uA); +int regulator_allow_bypass(struct regulator *regulator, bool allow); + /* regulator notifier block */ int regulator_register_notifier(struct regulator *regulator, struct notifier_block *nb); @@ -328,6 +330,12 @@ static inline int regulator_set_optimum_mode(struct regulator *regulator, return REGULATOR_MODE_NORMAL; } +static inline int regulator_allow_bypass(struct regulator *regulator, + bool allow) +{ + return 0; +} + static inline int regulator_register_notifier(struct regulator *regulator, struct notifier_block *nb) { @@ -352,4 +360,11 @@ static inline void regulator_set_drvdata(struct regulator *regulator, #endif +static inline int regulator_set_voltage_tol(struct regulator *regulator, + int new_uV, int tol_uV) +{ + return regulator_set_voltage(regulator, + new_uV - tol_uV, new_uV + tol_uV); +} + #endif |
