aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-06-06 22:06:40 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-07 19:29:46 -0400
commit985f769c89aedcae2981080051fc85b4ed035a9b (patch)
tree8ed2e4a9e939c9f63ddfcf32608c989d9eeeff3b
parent5a6881e8e134ea636bbc8423049e84638dbb7106 (diff)
regulator: isl6271a: Use regulator_[list|map]_voltage_linear for isl_fixed_ops
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--drivers/regulator/isl6271a-regulator.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/regulator/isl6271a-regulator.c b/drivers/regulator/isl6271a-regulator.c
index 56d273f25603..4a11b82a6d57 100644
--- a/drivers/regulator/isl6271a-regulator.c
+++ b/drivers/regulator/isl6271a-regulator.c
@@ -75,19 +75,13 @@ static struct regulator_ops isl_core_ops = {
75 75
76static int isl6271a_get_fixed_voltage(struct regulator_dev *dev) 76static int isl6271a_get_fixed_voltage(struct regulator_dev *dev)
77{ 77{
78 int id = rdev_get_id(dev); 78 return dev->desc->min_uV;
79 return (id == 1) ? 1100000 : 1300000;
80}
81
82static int isl6271a_list_fixed_voltage(struct regulator_dev *dev, unsigned selector)
83{
84 int id = rdev_get_id(dev);
85 return (id == 1) ? 1100000 : 1300000;
86} 79}
87 80
88static struct regulator_ops isl_fixed_ops = { 81static struct regulator_ops isl_fixed_ops = {
89 .get_voltage = isl6271a_get_fixed_voltage, 82 .get_voltage = isl6271a_get_fixed_voltage,
90 .list_voltage = isl6271a_list_fixed_voltage, 83 .list_voltage = regulator_list_voltage_linear,
84 .map_voltage = regulator_map_voltage_linear,
91}; 85};
92 86
93static const struct regulator_desc isl_rd[] = { 87static const struct regulator_desc isl_rd[] = {
@@ -107,6 +101,7 @@ static const struct regulator_desc isl_rd[] = {
107 .ops = &isl_fixed_ops, 101 .ops = &isl_fixed_ops,
108 .type = REGULATOR_VOLTAGE, 102 .type = REGULATOR_VOLTAGE,
109 .owner = THIS_MODULE, 103 .owner = THIS_MODULE,
104 .min_uV = 1100000,
110 }, { 105 }, {
111 .name = "LDO2", 106 .name = "LDO2",
112 .id = 2, 107 .id = 2,
@@ -114,6 +109,7 @@ static const struct regulator_desc isl_rd[] = {
114 .ops = &isl_fixed_ops, 109 .ops = &isl_fixed_ops,
115 .type = REGULATOR_VOLTAGE, 110 .type = REGULATOR_VOLTAGE,
116 .owner = THIS_MODULE, 111 .owner = THIS_MODULE,
112 .min_uV = 1300000,
117 }, 113 },
118}; 114};
119 115