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>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 19 Apr 2013 11:41:33 +0800
From:	Axel Lin <axel.lin@...ics.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Laxman Dewangan <ldewangan@...dia.com>,
	Graeme Gregory <gg@...mlogic.co.uk>,
	Liam Girdwood <lgirdwood@...il.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH RFT] regulator: palmas: Don't update tstep register for
 SMPS3 and SMPS7

SMPS3 and SMPS7 do not have tstep_addr setting, so current code actually 
writes 0 to PALMAS_SMPS12_CTRL(0x0) register when set_ramp_delay callback
is called for SMPS3 and SMPS7.

Signed-off-by: Axel Lin <axel.lin@...ics.com>
---
 drivers/regulator/palmas-regulator.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index f26344e..cfa143a 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -438,6 +438,10 @@ static int palmas_smps_set_ramp_delay(struct regulator_dev *rdev,
 	unsigned int addr = palmas_regs_info[id].tstep_addr;
 	int ret;
 
+	/* SMPS3 and SMPS7 do not have tstep_addr setting */
+	if (!addr)
+		return 0;
+
 	if (ramp_delay <= 0)
 		reg = 0;
 	else if (ramp_delay < 2500)
-- 
1.7.10.4



--
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