Skip to contentSkip to conversation

regulator: lp8755: Fix mask for pchip->mphase

PATCH New Axel Lin 1 participant 1 message Dec 26, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH v2 1/1 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.

---
v2. the mask should be 0x0f rather than 0x17.

 drivers/regulator/lp8755.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/lp8755.c +1 -1
index 06a82e2..6d5a11d 100644
@@ -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++) {
Signature · 1 line
1.7.9.5