summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/isl6271a-regulator.c
diff options
context:
space:
mode:
authorAxel Lin2012-05-16 04:09:27 +0200
committerMark Brown2012-05-16 10:46:57 +0200
commit2b7a7a4e837269a8a157a19ac93ddb207f2bd0b6 (patch)
treef50764b6552fcfe5e21cee9a6702629ef3829733 /drivers/regulator/isl6271a-regulator.c
parentregulator: max8660: Convert to set_voltage_sel and regulator_map_voltage_linear (diff)
downloadkernel-qcow2-linux-2b7a7a4e837269a8a157a19ac93ddb207f2bd0b6.tar.gz
kernel-qcow2-linux-2b7a7a4e837269a8a157a19ac93ddb207f2bd0b6.tar.xz
kernel-qcow2-linux-2b7a7a4e837269a8a157a19ac93ddb207f2bd0b6.zip
regulator: isl6271a: Use regulator_list_voltage_linear()
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/isl6271a-regulator.c')
-rw-r--r--drivers/regulator/isl6271a-regulator.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/regulator/isl6271a-regulator.c b/drivers/regulator/isl6271a-regulator.c
index 5caaf1f77541..78cdc90e0a7e 100644
--- a/drivers/regulator/isl6271a-regulator.c
+++ b/drivers/regulator/isl6271a-regulator.c
@@ -83,15 +83,10 @@ static int isl6271a_set_voltage(struct regulator_dev *dev,
return err;
}
-static int isl6271a_list_voltage(struct regulator_dev *dev, unsigned selector)
-{
- return ISL6271A_VOLTAGE_MIN + (ISL6271A_VOLTAGE_STEP * selector);
-}
-
static struct regulator_ops isl_core_ops = {
.get_voltage = isl6271a_get_voltage,
.set_voltage = isl6271a_set_voltage,
- .list_voltage = isl6271a_list_voltage,
+ .list_voltage = regulator_list_voltage_linear,
};
static int isl6271a_get_fixed_voltage(struct regulator_dev *dev)
@@ -119,6 +114,8 @@ static const struct regulator_desc isl_rd[] = {
.ops = &isl_core_ops,
.type = REGULATOR_VOLTAGE,
.owner = THIS_MODULE,
+ .min_uV = ISL6271A_VOLTAGE_MIN,
+ .uV_step = ISL6271A_VOLTAGE_STEP,
}, {
.name = "LDO1",
.id = 1,