Skip to content

Commit

Permalink
regulator: lp8755: Fix mask for pchip->mphase
Browse files Browse the repository at this point in the history
According to the datasheet, it has 9 multi-phase mode from 0 to 8 and it takes
4 bits in the register.
The mask for pchip->mphase should be 0x0F.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Jan 8, 2013
1 parent a1a41ab commit cad877e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/lp8755.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ static int lp8755_init_data(struct lp8755_chip *pchip)
ret = lp8755_read(pchip, 0x3D, &regval);
if (ret < 0)
goto out_i2c_error;
pchip->mphase = regval & 0x07;
pchip->mphase = regval & 0x0F;

/* set default data based on multi-phase config */
for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++) {
Expand Down

0 comments on commit cad877e

Please sign in to comment.