From: axel lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Regulators: lp3971 - Fix setting val for LDO2 and LDO4
Date: Tue, 9 Mar 2010 17:14:53 +0800 [thread overview]
Message-ID: <427d64721003090114u5419e36dl23616cfa0afd3cde@mail.gmail.com> (raw)
>From 4e4c5f8267a4fbf651b4cc26c5f72465514f6224 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@gmail.com>
Date: Tue, 9 Mar 2010 16:53:59 +0800
Subject: [PATCH] lp3971: Fix setting val for LDO2 and LDO4
In lp3971_ldo_set_voltage function, it requires val to left shift 4
bits for LDO2 and LDO4.
This patch fix this issue.
---
drivers/regulator/lp3971.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index f5532ed..a28ae37 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -187,7 +187,8 @@ static int lp3971_ldo_set_voltage(struct regulator_dev *dev,
return -EINVAL;
return lp3971_set_bits(lp3971, LP3971_LDO_VOL_CONTR_REG(ldo),
- LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo), val);
+ LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo),
+ val << LDO_VOL_CONTR_SHIFT(ldo));
}
static struct regulator_ops lp3971_ldo_ops = {
--
1.5.4.3
next reply other threads:[~2010-03-09 9:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-09 9:14 axel lin [this message]
2010-03-09 14:27 ` [PATCH] Regulators: lp3971 - Fix setting val for LDO2 and LDO4 Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2010-03-10 0:29 axel lin
2010-03-10 17:07 ` Mark Brown
2010-03-15 6:44 ` Marek Szyprowski
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=427d64721003090114u5419e36dl23616cfa0afd3cde@mail.gmail.com \
--to=axel.lin@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;
as well as URLs for NNTP newsgroup(s).