Skip to content

Commit b8903eb

Browse files
AxelLinbroonie
authored andcommitted
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>
1 parent 03746dc commit b8903eb

2 files changed

Lines changed: 1 addition & 17 deletions

File tree

‎drivers/regulator/tps65910-regulator.c‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,21 +1207,7 @@ static int tps65910_probe(struct platform_device *pdev)
12071207
pmic->desc[i].type = REGULATOR_VOLTAGE;
12081208
pmic->desc[i].owner = THIS_MODULE;
12091209
pmic->desc[i].enable_reg = pmic->get_ctrl_reg(i);
1210-
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-
}
1210+
pmic->desc[i].enable_mask = TPS65910_SUPPLY_STATE_ENABLED;
12251211

12261212
config.dev = tps65910->dev;
12271213
config.init_data = reg_data;

‎include/linux/mfd/tps65910.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,6 @@
358358
/*Register BBCH (0x80) register.RegisterDescription */
359359
#define BBCH_BBSEL_MASK 0x06
360360
#define BBCH_BBSEL_SHIFT 1
361-
#define BBCH_BBCHEN_MASK 0x01
362-
#define BBCH_BBCHEN_SHIFT 0
363361

364362

365363
/*Register DCDCCTRL (0x80) register.RegisterDescription */

0 commit comments

Comments
 (0)