* Re: [PATCH RFT v2] regulator: palmas: Don't update tstep register for SMPS3 and SMPS7
2013-04-19 6:18 [PATCH RFT v2] regulator: palmas: Don't update tstep register for SMPS3 and SMPS7 Axel Lin
@ 2013-04-19 6:16 ` Laxman Dewangan
0 siblings, 0 replies; 2+ messages in thread
From: Laxman Dewangan @ 2013-04-19 6:16 UTC (permalink / raw)
To: Axel Lin
Cc: Mark Brown, Graeme Gregory, Liam Girdwood,
linux-kernel@vger.kernel.org
On Friday 19 April 2013 11:48 AM, Axel Lin wrote:
> SMPS3 and SMPS7 do not have tstep_addr setting, so current code actually
> writes 0 to smps12_ctl (offset is 0) register when set_ramp_delay callback
> is called for SMPS3 and SMPS7.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH RFT v2] regulator: palmas: Don't update tstep register for SMPS3 and SMPS7
@ 2013-04-19 6:18 Axel Lin
2013-04-19 6:16 ` Laxman Dewangan
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-04-19 6:18 UTC (permalink / raw)
To: Mark Brown; +Cc: Laxman Dewangan, Graeme Gregory, Liam Girdwood, linux-kernel
SMPS3 and SMPS7 do not have tstep_addr setting, so current code actually
writes 0 to smps12_ctl (offset is 0) register when set_ramp_delay callback
is called for SMPS3 and SMPS7.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/palmas-regulator.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index f26344e..b253bd4 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -438,6 +438,13 @@ 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 */
+ switch (id) {
+ case PALMAS_REG_SMPS3:
+ case PALMAS_REG_SMPS7:
+ return 0;
+ }
+
if (ramp_delay <= 0)
reg = 0;
else if (ramp_delay < 2500)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-19 6:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-19 6:18 [PATCH RFT v2] regulator: palmas: Don't update tstep register for SMPS3 and SMPS7 Axel Lin
2013-04-19 6:16 ` Laxman Dewangan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).