diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-12-29 04:00:20 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-30 06:48:43 -0500 |
commit | b8903eb9836e4e968d1bf9758b501de2c38cfb83 (patch) | |
tree | af05705292b5c44ee785e0a048524585b7a274ea | |
parent | 03746dcbde75fc2b0ee8a9d65e3fb3efee8deb4a (diff) |
regulator: tps65910: Simplify setting enable_mask for regulators
BBCH_BBCHEN_MASK is equivalent to TPS65910_SUPPLY_STATE_ENABLED.
So all regulators have the same enable_mask setting.
BBCH_BBCHEN_MASK and BBCH_BBCHEN_SHIFT are not used now, remove them.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/regulator/tps65910-regulator.c | 16 | ||||
-rw-r--r-- | include/linux/mfd/tps65910.h | 2 |
2 files changed, 1 insertions, 17 deletions
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index 979ea0a99a79..f50dd847eebc 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c | |||
@@ -1207,21 +1207,7 @@ static int tps65910_probe(struct platform_device *pdev) | |||
1207 | pmic->desc[i].type = REGULATOR_VOLTAGE; | 1207 | pmic->desc[i].type = REGULATOR_VOLTAGE; |
1208 | pmic->desc[i].owner = THIS_MODULE; | 1208 | pmic->desc[i].owner = THIS_MODULE; |
1209 | pmic->desc[i].enable_reg = pmic->get_ctrl_reg(i); | 1209 | pmic->desc[i].enable_reg = pmic->get_ctrl_reg(i); |
1210 | 1210 | pmic->desc[i].enable_mask = TPS65910_SUPPLY_STATE_ENABLED; | |
1211 | switch (i) { | ||
1212 | case TPS65910_REG_VBB: | ||
1213 | if (tps65910_chip_id(tps65910) == TPS65910) | ||
1214 | pmic->desc[i].enable_mask = BBCH_BBCHEN_MASK; | ||
1215 | else | ||
1216 | pmic->desc[i].enable_mask = | ||
1217 | TPS65910_SUPPLY_STATE_ENABLED; | ||
1218 | break; | ||
1219 | |||
1220 | default: | ||
1221 | pmic->desc[i].enable_mask = | ||
1222 | TPS65910_SUPPLY_STATE_ENABLED; | ||
1223 | break; | ||
1224 | } | ||
1225 | 1211 | ||
1226 | config.dev = tps65910->dev; | 1212 | config.dev = tps65910->dev; |
1227 | config.init_data = reg_data; | 1213 | config.init_data = reg_data; |
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h index 1adeee186194..16c2335c2856 100644 --- a/include/linux/mfd/tps65910.h +++ b/include/linux/mfd/tps65910.h | |||
@@ -358,8 +358,6 @@ | |||
358 | /*Register BBCH (0x80) register.RegisterDescription */ | 358 | /*Register BBCH (0x80) register.RegisterDescription */ |
359 | #define BBCH_BBSEL_MASK 0x06 | 359 | #define BBCH_BBSEL_MASK 0x06 |
360 | #define BBCH_BBSEL_SHIFT 1 | 360 | #define BBCH_BBSEL_SHIFT 1 |
361 | #define BBCH_BBCHEN_MASK 0x01 | ||
362 | #define BBCH_BBCHEN_SHIFT 0 | ||
363 | 361 | ||
364 | 362 | ||
365 | /*Register DCDCCTRL (0x80) register.RegisterDescription */ | 363 | /*Register DCDCCTRL (0x80) register.RegisterDescription */ |