diff options
author | Mark Brown <broonie@linaro.org> | 2013-07-01 06:17:08 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-07-01 06:17:08 -0400 |
commit | 0a192cc8600bede44a0425402758631d410a7c6f (patch) | |
tree | 7aeb844ebe2002ba6e05482f674e0c989be9061e | |
parent | 39c9f80f43d754dadb2cd1adbc365840b5e99cca (diff) | |
parent | 2a668a8bc2cbe7a464ab1212475a3efb23a94b1e (diff) |
Merge remote-tracking branch 'regulator/topic/linar' into regulator-next
-rw-r--r-- | drivers/regulator/core.c | 15 | ||||
-rw-r--r-- | include/linux/regulator/consumer.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 815d6df8bd5f..288c75abc190 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -2138,6 +2138,21 @@ int regulator_list_voltage(struct regulator *regulator, unsigned selector) | |||
2138 | EXPORT_SYMBOL_GPL(regulator_list_voltage); | 2138 | EXPORT_SYMBOL_GPL(regulator_list_voltage); |
2139 | 2139 | ||
2140 | /** | 2140 | /** |
2141 | * regulator_get_linear_step - return the voltage step size between VSEL values | ||
2142 | * @regulator: regulator source | ||
2143 | * | ||
2144 | * Returns the voltage step size between VSEL values for linear | ||
2145 | * regulators, or return 0 if the regulator isn't a linear regulator. | ||
2146 | */ | ||
2147 | unsigned int regulator_get_linear_step(struct regulator *regulator) | ||
2148 | { | ||
2149 | struct regulator_dev *rdev = regulator->rdev; | ||
2150 | |||
2151 | return rdev->desc->uV_step; | ||
2152 | } | ||
2153 | EXPORT_SYMBOL_GPL(regulator_get_linear_step); | ||
2154 | |||
2155 | /** | ||
2141 | * regulator_is_supported_voltage - check if a voltage range can be supported | 2156 | * regulator_is_supported_voltage - check if a voltage range can be supported |
2142 | * | 2157 | * |
2143 | * @regulator: Regulator to check. | 2158 | * @regulator: Regulator to check. |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 145022a83085..3a76389c6aaa 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -165,6 +165,7 @@ int regulator_count_voltages(struct regulator *regulator); | |||
165 | int regulator_list_voltage(struct regulator *regulator, unsigned selector); | 165 | int regulator_list_voltage(struct regulator *regulator, unsigned selector); |
166 | int regulator_is_supported_voltage(struct regulator *regulator, | 166 | int regulator_is_supported_voltage(struct regulator *regulator, |
167 | int min_uV, int max_uV); | 167 | int min_uV, int max_uV); |
168 | unsigned int regulator_get_linear_step(struct regulator *regulator); | ||
168 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); | 169 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); |
169 | int regulator_set_voltage_time(struct regulator *regulator, | 170 | int regulator_set_voltage_time(struct regulator *regulator, |
170 | int old_uV, int new_uV); | 171 | int old_uV, int new_uV); |