diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-01-16 20:57:46 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-17 02:08:08 -0500 |
commit | e69995d3bfbdc8d30ae3548c69f669139791b739 (patch) | |
tree | f39cb4f2e939ed9de9e89f5fe904f2c3efe46bcb /drivers/regulator | |
parent | eb758de6a00f2c1f5694efc503b94d162db99734 (diff) |
regulator: lp8788-buck: Remove buck[1|2]_vout_addr array
The vout address for buck[1|2] can be easily calculated,
thus remote these 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-buck.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c index ef845c7ac69f..97891a7ea7b2 100644 --- a/drivers/regulator/lp8788-buck.c +++ b/drivers/regulator/lp8788-buck.c | |||
@@ -103,16 +103,6 @@ static const int lp8788_buck_vtbl[] = { | |||
103 | 1950000, 2000000, | 103 | 1950000, 2000000, |
104 | }; | 104 | }; |
105 | 105 | ||
106 | static const u8 buck1_vout_addr[] = { | ||
107 | LP8788_BUCK1_VOUT0, LP8788_BUCK1_VOUT1, | ||
108 | LP8788_BUCK1_VOUT2, LP8788_BUCK1_VOUT3, | ||
109 | }; | ||
110 | |||
111 | static const u8 buck2_vout_addr[] = { | ||
112 | LP8788_BUCK2_VOUT0, LP8788_BUCK2_VOUT1, | ||
113 | LP8788_BUCK2_VOUT2, LP8788_BUCK2_VOUT3, | ||
114 | }; | ||
115 | |||
116 | static void lp8788_buck1_set_dvs(struct lp8788_buck *buck) | 106 | static void lp8788_buck1_set_dvs(struct lp8788_buck *buck) |
117 | { | 107 | { |
118 | struct lp8788_buck1_dvs *dvs = (struct lp8788_buck1_dvs *)buck->dvs; | 108 | struct lp8788_buck1_dvs *dvs = (struct lp8788_buck1_dvs *)buck->dvs; |
@@ -235,7 +225,7 @@ static u8 lp8788_select_buck_vout_addr(struct lp8788_buck *buck, | |||
235 | lp8788_read_byte(buck->lp, LP8788_BUCK_DVS_SEL, &val); | 225 | lp8788_read_byte(buck->lp, LP8788_BUCK_DVS_SEL, &val); |
236 | idx = (val & LP8788_BUCK1_DVS_M) >> LP8788_BUCK1_DVS_S; | 226 | idx = (val & LP8788_BUCK1_DVS_M) >> LP8788_BUCK1_DVS_S; |
237 | } | 227 | } |
238 | addr = buck1_vout_addr[idx]; | 228 | addr = LP8788_BUCK1_VOUT0 + idx; |
239 | break; | 229 | break; |
240 | case BUCK2: | 230 | case BUCK2: |
241 | if (mode == EXTPIN) { | 231 | if (mode == EXTPIN) { |
@@ -258,7 +248,7 @@ static u8 lp8788_select_buck_vout_addr(struct lp8788_buck *buck, | |||
258 | lp8788_read_byte(buck->lp, LP8788_BUCK_DVS_SEL, &val); | 248 | lp8788_read_byte(buck->lp, LP8788_BUCK_DVS_SEL, &val); |
259 | idx = (val & LP8788_BUCK2_DVS_M) >> LP8788_BUCK2_DVS_S; | 249 | idx = (val & LP8788_BUCK2_DVS_M) >> LP8788_BUCK2_DVS_S; |
260 | } | 250 | } |
261 | addr = buck2_vout_addr[idx]; | 251 | addr = LP8788_BUCK2_VOUT0 + idx; |
262 | break; | 252 | break; |
263 | default: | 253 | default: |
264 | goto err; | 254 | goto err; |