Commit cad877ef authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: lp8755: Fix mask for pchip->mphase

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: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent a1a41ab4
......@@ -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++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment