lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 26 Dec 2012 11:56:37 +0800
From:	Axel Lin <axel.lin@...ics.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Daniel Jeong <gshark.jeong@...il.com>, Liam Girdwood <lrg@...com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH v2] 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: Axel Lin <axel.lin@...ics.com>
---
v2. the mask should be 0x0f rather than 0x17.

 drivers/regulator/lp8755.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c
index 06a82e2..6d5a11d 100644
--- a/drivers/regulator/lp8755.c
+++ b/drivers/regulator/lp8755.c
@@ -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++) {
-- 
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ