From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>,
Graeme Gregory <gg@slimlogic.co.uk>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH RFT] regulator: palmas: Don't update tstep register for SMPS3 and SMPS7
Date: Fri, 19 Apr 2013 11:41:33 +0800 [thread overview]
Message-ID: <1366342893.20735.0.camel@phoenix> (raw)
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@ingics.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
next reply other threads:[~2013-04-19 3:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 3:41 Axel Lin [this message]
2013-04-19 4:57 ` [PATCH RFT] regulator: palmas: Don't update tstep register for SMPS3 and SMPS7 Laxman Dewangan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1366342893.20735.0.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=gg@slimlogic.co.uk \
--cc=ldewangan@nvidia.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox