aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-05-27 02:05:09 -0400
committerMark Brown <broonie@linaro.org>2014-05-27 07:06:35 -0400
commitc0c14e6af9ec89479f3ee3895961ef51e97aadd4 (patch)
treea2b1a9ebeabe3c6d96164432b439c49feb6c3b8f
parentac1d686846d23b2665e9d4791e32af70e251da90 (diff)
regulator: ltc3589: Remove ltc3589_list_voltage_fixed function
When fixed_uV is set and n_voltage is 1, regulator core will return rdev->desc->fixed_uV in regulator_get_voltage() and regulator_list_voltage(). Rename ltc3589_standby_regulator_ops to ltc3589_fixed_standby_regulator_ops, this makes the code clear that the ops is for fixed voltage regulator. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--drivers/regulator/ltc3589.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c
index fef64ee31185..110a99ee1162 100644
--- a/drivers/regulator/ltc3589.c
+++ b/drivers/regulator/ltc3589.c
@@ -160,15 +160,6 @@ static int ltc3589_set_suspend_mode(struct regulator_dev *rdev,
160 return regmap_update_bits(ltc3589->regmap, LTC3589_VCCR, mask, bit); 160 return regmap_update_bits(ltc3589->regmap, LTC3589_VCCR, mask, bit);
161} 161}
162 162
163static int ltc3589_list_voltage_fixed(struct regulator_dev *rdev,
164 unsigned int selector)
165{
166 if (selector)
167 return -EINVAL;
168
169 return rdev->desc->fixed_uV;
170}
171
172/* SW1, SW2, SW3, LDO2 */ 163/* SW1, SW2, SW3, LDO2 */
173static struct regulator_ops ltc3589_linear_regulator_ops = { 164static struct regulator_ops ltc3589_linear_regulator_ops = {
174 .enable = regulator_enable_regmap, 165 .enable = regulator_enable_regmap,
@@ -188,12 +179,10 @@ static struct regulator_ops ltc3589_fixed_regulator_ops = {
188 .enable = regulator_enable_regmap, 179 .enable = regulator_enable_regmap,
189 .disable = regulator_disable_regmap, 180 .disable = regulator_disable_regmap,
190 .is_enabled = regulator_is_enabled_regmap, 181 .is_enabled = regulator_is_enabled_regmap,
191 .list_voltage = ltc3589_list_voltage_fixed,
192}; 182};
193 183
194/* LDO1 */ 184/* LDO1 */
195static struct regulator_ops ltc3589_standby_regulator_ops = { 185static struct regulator_ops ltc3589_fixed_standby_regulator_ops = {
196 .list_voltage = ltc3589_list_voltage_fixed,
197}; 186};
198 187
199/* LDO4 */ 188/* LDO4 */
@@ -242,7 +231,7 @@ static struct ltc3589_regulator ltc3589_regulators[LTC3589_NUM_REGULATORS] = {
242 LTC3589_LINEAR_REG(SW2, B2DTV1), 231 LTC3589_LINEAR_REG(SW2, B2DTV1),
243 LTC3589_LINEAR_REG(SW3, B3DTV1), 232 LTC3589_LINEAR_REG(SW3, B3DTV1),
244 LTC3589_FIXED_REG(BB_OUT), 233 LTC3589_FIXED_REG(BB_OUT),
245 LTC3589_REG(LDO1, standby, 0, 0, 0, 0), 234 LTC3589_REG(LDO1, fixed_standby, 0, 0, 0, 0),
246 LTC3589_LINEAR_REG(LDO2, L2DTV1), 235 LTC3589_LINEAR_REG(LDO2, L2DTV1),
247 LTC3589_FIXED_REG(LDO3), 236 LTC3589_FIXED_REG(LDO3),
248 LTC3589_REG(LDO4, table, LTC3589_OVEN_LDO4, LTC3589_L2DTV2, 0x60, 0), 237 LTC3589_REG(LDO4, table, LTC3589_OVEN_LDO4, LTC3589_L2DTV2, 0x60, 0),