diff options
author | Mark Brown <broonie@linaro.org> | 2014-07-28 07:32:04 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-28 08:19:23 -0400 |
commit | 404d4df260bc7b224ba51c704d24b7e452d8b68c (patch) | |
tree | 0e63e86d821944017f548cf17f6cfaf549021efd | |
parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) |
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: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/regulator/lp872x.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c index 2e022aabd951..021d64d856bb 100644 --- a/drivers/regulator/lp872x.c +++ b/drivers/regulator/lp872x.c | |||
@@ -845,7 +845,6 @@ static struct lp872x_platform_data | |||
845 | struct device_node *np = dev->of_node; | 845 | struct device_node *np = dev->of_node; |
846 | struct lp872x_platform_data *pdata; | 846 | struct lp872x_platform_data *pdata; |
847 | struct of_regulator_match *match; | 847 | struct of_regulator_match *match; |
848 | struct regulator_init_data *d; | ||
849 | int num_matches; | 848 | int num_matches; |
850 | int count; | 849 | int count; |
851 | int i; | 850 | int i; |
@@ -892,14 +891,6 @@ static struct lp872x_platform_data | |||
892 | pdata->regulator_data[i].id = | 891 | pdata->regulator_data[i].id = |
893 | (enum lp872x_regulator_id)match[i].driver_data; | 892 | (enum lp872x_regulator_id)match[i].driver_data; |
894 | pdata->regulator_data[i].init_data = match[i].init_data; | 893 | pdata->regulator_data[i].init_data = match[i].init_data; |
895 | |||
896 | /* Operation mode configuration for buck/buck1/buck2 */ | ||
897 | if (strncmp(match[i].name, "buck", 4)) | ||
898 | continue; | ||
899 | |||
900 | d = pdata->regulator_data[i].init_data; | ||
901 | d->constraints.valid_modes_mask |= LP872X_VALID_OPMODE; | ||
902 | d->constraints.valid_ops_mask |= REGULATOR_CHANGE_MODE; | ||
903 | } | 894 | } |
904 | out: | 895 | out: |
905 | return pdata; | 896 | return pdata; |