From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] regulator: core: Use map_voltage_linear_range by default for list_voltage_linear_range
Date: Sat, 24 May 2014 11:10:43 +0800 [thread overview]
Message-ID: <1400901043.11911.2.camel@phoenix> (raw)
Use map_voltage_linear_range() if list_voltage_linear_range() is in use and
nothing is set.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index b97ffd2..7399cbf 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2321,6 +2321,10 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
regulator_list_voltage_linear)
ret = regulator_map_voltage_linear(rdev,
min_uV, max_uV);
+ else if (rdev->desc->ops->list_voltage ==
+ regulator_list_voltage_linear_range)
+ ret = regulator_map_voltage_linear_range(rdev,
+ min_uV, max_uV);
else
ret = regulator_map_voltage_iterate(rdev,
min_uV, max_uV);
--
1.8.3.2
next reply other threads:[~2014-05-24 3:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-24 3:10 Axel Lin [this message]
2014-05-26 13:37 ` [PATCH] regulator: core: Use map_voltage_linear_range by default for list_voltage_linear_range Mark Brown
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=1400901043.11911.2.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.