Message ID | 1366372554-20866-2-git-send-email-taras@ti.com (mailing list archive) |
---|---|
State | RFC, archived |
Headers | show |
On Fri, Apr 19, 2013 at 02:55:53PM +0300, Taras Kondratiuk wrote: > Sometimes it is a need to constrain only a minimum voltage > and let system constraints to limit maximum. > Add a new function regulator_set_voltage_min() for this. I don't believe you on this one. It is going to be a very unusual system which has a maximum supply voltage specified at over 4kV (or more) which is what INT_MAX will come out as - there will be some electrical specs for what voltages can be tolerated sustainably.
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 7bc732c..d40d909 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -380,4 +380,10 @@ static inline int regulator_is_supported_voltage_tol(struct regulator *regulator target_uV + tol_uV); } +static inline int regulator_set_voltage_min(struct regulator *regulator, + int new_uV) +{ + return regulator_set_voltage(regulator, new_uV, INT_MAX); +} + #endif
Sometimes it is a need to constrain only a minimum voltage and let system constraints to limit maximum. Add a new function regulator_set_voltage_min() for this. Signed-off-by: Taras Kondratiuk <taras@ti.com> --- include/linux/regulator/consumer.h | 6 ++++++ 1 file changed, 6 insertions(+)