aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps51632-regulator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-09 22:43:24 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-09 22:43:24 -0500
commitf8c85fe186029b142be5e5f365089875b2d2d64c (patch)
treefcff116b0ba149f9a5d632f4becad5263dff270a /drivers/regulator/tps51632-regulator.c
parentf4244c68fff39b28235c862d7533c825390e9020 (diff)
parentdbc705183a41f8ae209673fbc555d9923b0ebb7f (diff)
Merge remote-tracking branch 'regulator/topic/tps516312' into regulator-next
Diffstat (limited to 'drivers/regulator/tps51632-regulator.c')
-rw-r--r--drivers/regulator/tps51632-regulator.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c
index 523b1e5e0b4c..ab21133e6784 100644
--- a/drivers/regulator/tps51632-regulator.c
+++ b/drivers/regulator/tps51632-regulator.c
@@ -236,6 +236,21 @@ static int tps51632_probe(struct i2c_client *client,
236 return -EINVAL; 236 return -EINVAL;
237 } 237 }
238 238
239 if (pdata->enable_pwm_dvfs) {
240 if ((pdata->base_voltage_uV < TPS51632_MIN_VOLATGE) ||
241 (pdata->base_voltage_uV > TPS51632_MAX_VOLATGE)) {
242 dev_err(&client->dev, "Invalid base_voltage_uV setting\n");
243 return -EINVAL;
244 }
245
246 if ((pdata->max_voltage_uV) &&
247 ((pdata->max_voltage_uV < TPS51632_MIN_VOLATGE) ||
248 (pdata->max_voltage_uV > TPS51632_MAX_VOLATGE))) {
249 dev_err(&client->dev, "Invalid max_voltage_uV setting\n");
250 return -EINVAL;
251 }
252 }
253
239 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); 254 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
240 if (!tps) { 255 if (!tps) {
241 dev_err(&client->dev, "Memory allocation failed\n"); 256 dev_err(&client->dev, "Memory allocation failed\n");