All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: twl: Convert fixed voltage to use regulator_list_voltage_linear
@ 2013-02-16  2:37 Axel Lin
  2013-03-01  8:11 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-02-16  2:37 UTC (permalink / raw)
  To: Mark Brown; +Cc: Tero Kristo, Aaro Koskinen, Liam Girdwood, linux-kernel

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/twl-regulator.c |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index d62604c0..2b3dc5b 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -612,15 +612,8 @@ static struct regulator_ops twl6030ldo_ops = {
 /*
  * Fixed voltage LDOs don't have a VSEL field to update.
  */
-static int twlfixed_list_voltage(struct regulator_dev *rdev, unsigned index)
-{
-	struct twlreg_info	*info = rdev_get_drvdata(rdev);
-
-	return info->min_mV * 1000;
-}
-
 static struct regulator_ops twl4030fixed_ops = {
-	.list_voltage	= twlfixed_list_voltage,
+	.list_voltage	= regulator_list_voltage_linear,
 
 	.enable		= twl4030reg_enable,
 	.disable	= twl4030reg_disable,
@@ -632,7 +625,7 @@ static struct regulator_ops twl4030fixed_ops = {
 };
 
 static struct regulator_ops twl6030fixed_ops = {
-	.list_voltage	= twlfixed_list_voltage,
+	.list_voltage	= regulator_list_voltage_linear,
 
 	.enable		= twl6030reg_enable,
 	.disable	= twl6030reg_disable,
@@ -935,6 +928,7 @@ static const struct twlreg_info TWLFIXED_INFO_##label = { \
 		.name = #label, \
 		.id = family##_REG_##label, \
 		.n_voltages = 1, \
+		.min_uV = mVolts * 1000, \
 		.ops = &operations, \
 		.type = REGULATOR_VOLTAGE, \
 		.owner = THIS_MODULE, \
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regulator: twl: Convert fixed voltage to use regulator_list_voltage_linear
  2013-02-16  2:37 [PATCH] regulator: twl: Convert fixed voltage to use regulator_list_voltage_linear Axel Lin
@ 2013-03-01  8:11 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-03-01  8:11 UTC (permalink / raw)
  To: Axel Lin; +Cc: Tero Kristo, Aaro Koskinen, Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]

On Sat, Feb 16, 2013 at 10:37:33AM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

I didn't apply this as there was an earlier version sitting in my tree
which for some reason had never been pushed out and merged.  Sorry about
that.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-01  8:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-16  2:37 [PATCH] regulator: twl: Convert fixed voltage to use regulator_list_voltage_linear Axel Lin
2013-03-01  8:11 ` Mark Brown

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.