[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1356154279.21963.2.camel@phoenix>
Date: Sat, 22 Dec 2012 13:31:19 +0800
From: Axel Lin <axel.lin@...ics.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: Rajendra Nayak <rnayak@...com>,
Peter Ujfalusi <peter.ujfalusi@...com>,
Liam Girdwood <lrg@...com>, linux-kernel@...r.kernel.org
Subject: [PATCH] regulator: twl: Convert twl[6030|4030]fixed_ops to
regulator_list_voltage_linear
Signed-off-by: Axel Lin <axel.lin@...ics.com>
---
drivers/regulator/twl-regulator.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 493c8c6..87c55d0 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -616,18 +616,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,
@@ -639,7 +629,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,
@@ -945,6 +935,7 @@ static const struct twlreg_info TWLFIXED_INFO_##label = { \
.ops = &operations, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
+ .min_uV = mVolts * 1000, \
.enable_time = turnon_delay, \
}, \
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists