mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] regulator: lp872x: Don't set constraints within the regulator driver
@ 2014-07-28 11:33 Mark Brown
  0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2014-07-28 11:33 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: linux-kernel, linaro-kernel, Mark Brown

From: Mark Brown <broonie@linaro.org>

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>
---
 drivers/regulator/lp872x.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c
index 2e022aabd951..954616f16c81 100644
--- a/drivers/regulator/lp872x.c
+++ b/drivers/regulator/lp872x.c
@@ -892,14 +892,6 @@ static struct lp872x_platform_data
 		pdata->regulator_data[i].id =
 				(enum lp872x_regulator_id)match[i].driver_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:
 	return pdata;
-- 
2.0.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-28 11:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-28 11:33 [PATCH] regulator: lp872x: Don't set constraints within the regulator driver Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome