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:   Sat,  5 Jan 2019 11:28:17 +0800
From:   Axel Lin <axel.lin@...ics.com>
To:     Mark Brown <broonie@...nel.org>
Cc:     Matt Porter <mporter@...aro.org>,
        Tim Kryger <tim.kryger@...aro.org>,
        Markus Mayer <markus.mayer@...aro.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        linux-kernel@...r.kernel.org, Axel Lin <axel.lin@...ics.com>
Subject: [RFT][PATCH] regulator: bcm590xx: Fix .enable_reg for BCM590XX_REG_VSR

Current implementation missed the case BCM590XX_REG_VSR, so
bcm590xx_get_enable_register() returns 0 when id is BCM590XX_REG_VSR.

Signed-off-by: Axel Lin <axel.lin@...ics.com>
---
Hi Matt,
Current code looks strange becasue bcm590xx_get_enable_register() returns 0
for BCM590XX_REG_VSR but there is a BCM590XX_VSRPMCTRL1 defined in the code.
I don't have the h/w, and I even cannot find the datasheet on the internet.
I might be wrong, but just in case this might fix a real bug.
Please help to review and test this patch.

Thanks,
Axel
 drivers/regulator/bcm590xx-regulator.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/regulator/bcm590xx-regulator.c b/drivers/regulator/bcm590xx-regulator.c
index 92d6d7b10cf7..e49c0a7d5dd5 100644
--- a/drivers/regulator/bcm590xx-regulator.c
+++ b/drivers/regulator/bcm590xx-regulator.c
@@ -242,8 +242,12 @@ static int bcm590xx_get_enable_register(int id)
 		case BCM590XX_REG_SDSR2:
 			reg = BCM590XX_SDSR2PMCTRL1;
 			break;
+		case BCM590XX_REG_VSR:
+			reg = BCM590XX_VSRPMCTRL1;
+			break;
 		case BCM590XX_REG_VBUS:
 			reg = BCM590XX_OTG_CTRL;
+			break;
 		}
 
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ