Commit 404d4df2 authored by Mark Brown's avatar Mark Brown

regulator: lp872x: Don't set constraints within the regulator driver

Regulator drivers should not be specifying constraints since the valid
configurations depend on how the device is used in a given system, there
is no way to know if a configuration is safe for a given board.
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 7171511e
...@@ -845,7 +845,6 @@ static struct lp872x_platform_data ...@@ -845,7 +845,6 @@ static struct lp872x_platform_data
struct device_node *np = dev->of_node; struct device_node *np = dev->of_node;
struct lp872x_platform_data *pdata; struct lp872x_platform_data *pdata;
struct of_regulator_match *match; struct of_regulator_match *match;
struct regulator_init_data *d;
int num_matches; int num_matches;
int count; int count;
int i; int i;
...@@ -892,14 +891,6 @@ static struct lp872x_platform_data ...@@ -892,14 +891,6 @@ static struct lp872x_platform_data
pdata->regulator_data[i].id = pdata->regulator_data[i].id =
(enum lp872x_regulator_id)match[i].driver_data; (enum lp872x_regulator_id)match[i].driver_data;
pdata->regulator_data[i].init_data = match[i].init_data; pdata->regulator_data[i].init_data = match[i].init_data;
/* Operation mode configuration for buck/buck1/buck2 */
if (strncmp(match[i].name, "buck", 4))
continue;
d = pdata->regulator_data[i].init_data;
d->constraints.valid_modes_mask |= LP872X_VALID_OPMODE;
d->constraints.valid_ops_mask |= REGULATOR_CHANGE_MODE;
} }
out: out:
return pdata; return pdata;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment