Skip to content

Commit

Permalink
Merge remote-tracking branch 'regulator/fix/palmas' into regulator-pa…
Browse files Browse the repository at this point in the history
…lmas

Conflicts:
	drivers/regulator/palmas-regulator.c
  • Loading branch information
Mark Brown committed Jun 24, 2014
2 parents d6f8337 + 5b01bd1 commit 4c0c9ca
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/regulator/palmas-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,10 @@ static int palmas_set_mode_smps(struct regulator_dev *dev, unsigned int mode)
if (rail_enable)
palmas_smps_write(pmic->palmas,
ddata->palmas_regs_info[id].ctrl_addr, reg);

/* Switch the enable value to ensure this is used for enable */
pmic->desc[id].enable_val = pmic->current_reg_mode[id];

return 0;
}

Expand Down Expand Up @@ -1216,6 +1220,14 @@ static int palmas_smps_registration(struct palmas_pmic *pmic,
return ret;
pmic->current_reg_mode[id] = reg &
PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK;

pmic->desc[id].enable_reg =
PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE,
palmas_regs_info[id].ctrl_addr);
pmic->desc[id].enable_mask =
PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK;
/* set_mode overrides this value */
pmic->desc[id].enable_val = SMPS_CTRL_MODE_ON;
}

pmic->desc[id].type = REGULATOR_VOLTAGE;
Expand Down

0 comments on commit 4c0c9ca

Please sign in to comment.