aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-04-01 11:26:24 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-03 13:46:14 -0400
commit80abd60d9891fb1ba8cd93ef4df9320ac5569d70 (patch)
tree16af90a6bdc68ad292d1cfa1a68d724aede7b116 /drivers/regulator
parent407945fd78c3fddef83ba17bf2250112c07dc7c1 (diff)
regulator: lp8788: Remove lp8788_dldo_id and lp8788_aldo_id arrays
The id for DLDOx matches the entries in enum lp8788_ldo_id and it's easy to calculate the id for ALDOx. Thus remove lp8788_dldo_id and lp8788_aldo_id arrays. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/lp8788-ldo.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/drivers/regulator/lp8788-ldo.c b/drivers/regulator/lp8788-ldo.c
index fcba90a4c26c..c29aeae3c121 100644
--- a/drivers/regulator/lp8788-ldo.c
+++ b/drivers/regulator/lp8788-ldo.c
@@ -156,34 +156,6 @@ static const int lp8788_aldo7_vtbl[] = {
156 1200000, 1300000, 1400000, 1500000, 1600000, 1700000, 1800000, 1800000, 156 1200000, 1300000, 1400000, 1500000, 1600000, 1700000, 1800000, 1800000,
157}; 157};
158 158
159static enum lp8788_ldo_id lp8788_dldo_id[] = {
160 DLDO1,
161 DLDO2,
162 DLDO3,
163 DLDO4,
164 DLDO5,
165 DLDO6,
166 DLDO7,
167 DLDO8,
168 DLDO9,
169 DLDO10,
170 DLDO11,
171 DLDO12,
172};
173
174static enum lp8788_ldo_id lp8788_aldo_id[] = {
175 ALDO1,
176 ALDO2,
177 ALDO3,
178 ALDO4,
179 ALDO5,
180 ALDO6,
181 ALDO7,
182 ALDO8,
183 ALDO9,
184 ALDO10,
185};
186
187static int lp8788_ldo_enable_time(struct regulator_dev *rdev) 159static int lp8788_ldo_enable_time(struct regulator_dev *rdev)
188{ 160{
189 struct lp8788_ldo *ldo = rdev_get_drvdata(rdev); 161 struct lp8788_ldo *ldo = rdev_get_drvdata(rdev);
@@ -566,7 +538,7 @@ static int lp8788_dldo_probe(struct platform_device *pdev)
566 return -ENOMEM; 538 return -ENOMEM;
567 539
568 ldo->lp = lp; 540 ldo->lp = lp;
569 ret = lp8788_config_ldo_enable_mode(pdev, ldo, lp8788_dldo_id[id]); 541 ret = lp8788_config_ldo_enable_mode(pdev, ldo, id);
570 if (ret) 542 if (ret)
571 return ret; 543 return ret;
572 544
@@ -627,7 +599,7 @@ static int lp8788_aldo_probe(struct platform_device *pdev)
627 return -ENOMEM; 599 return -ENOMEM;
628 600
629 ldo->lp = lp; 601 ldo->lp = lp;
630 ret = lp8788_config_ldo_enable_mode(pdev, ldo, lp8788_aldo_id[id]); 602 ret = lp8788_config_ldo_enable_mode(pdev, ldo, id + ALDO1);
631 if (ret) 603 if (ret)
632 return ret; 604 return ret;
633 605