Skip to contentSkip to conversation

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

PATCH New Mark Brown 1 participant 1 message Jul 28, 2014 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 regulator: lp872x: Don't set constraints within the regulator driver

From: Mark Brown <[email protected]>

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.

---
 drivers/regulator/lp872x.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/regulator/lp872x.c +0 -8
index 2e022aabd951..954616f16c81 100644
@@ -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;
Signature · 1 line
2.0.1