mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-12 04:19:08 +00:00
Merge remote-tracking branch 'regulator/topic/tps516312' into regulator-next
This commit is contained in:
commit
f8c85fe186
@ -236,6 +236,21 @@ static int tps51632_probe(struct i2c_client *client,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pdata->enable_pwm_dvfs) {
|
||||||
|
if ((pdata->base_voltage_uV < TPS51632_MIN_VOLATGE) ||
|
||||||
|
(pdata->base_voltage_uV > TPS51632_MAX_VOLATGE)) {
|
||||||
|
dev_err(&client->dev, "Invalid base_voltage_uV setting\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((pdata->max_voltage_uV) &&
|
||||||
|
((pdata->max_voltage_uV < TPS51632_MIN_VOLATGE) ||
|
||||||
|
(pdata->max_voltage_uV > TPS51632_MAX_VOLATGE))) {
|
||||||
|
dev_err(&client->dev, "Invalid max_voltage_uV setting\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
|
tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
|
||||||
if (!tps) {
|
if (!tps) {
|
||||||
dev_err(&client->dev, "Memory allocation failed\n");
|
dev_err(&client->dev, "Memory allocation failed\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user