aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-06-08 03:41:48 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-17 16:01:21 -0400
commit34e74f39fa9a2c1489444266cc9e973dc1b3a419 (patch)
treebfa49ea87b6779fb19be3673b28f8bb191e11865 /drivers/regulator
parentee5e6253ac22210da892435711890fa2272daa41 (diff)
regulator: mc13xxx: Convert to regulator_list_voltage_table
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/mc13783-regulator.c38
-rw-r--r--drivers/regulator/mc13892-regulator.c42
-rw-r--r--drivers/regulator/mc13xxx-regulator-core.c30
-rw-r--r--drivers/regulator/mc13xxx.h9
4 files changed, 49 insertions, 70 deletions
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c
index 7dcdfa283e93..4932e3449fe1 100644
--- a/drivers/regulator/mc13783-regulator.c
+++ b/drivers/regulator/mc13783-regulator.c
@@ -93,78 +93,78 @@
93 93
94 94
95/* Voltage Values */ 95/* Voltage Values */
96static const int mc13783_sw3_val[] = { 96static const unsigned int mc13783_sw3_val[] = {
97 5000000, 5000000, 5000000, 5500000, 97 5000000, 5000000, 5000000, 5500000,
98}; 98};
99 99
100static const int mc13783_vaudio_val[] = { 100static const unsigned int mc13783_vaudio_val[] = {
101 2775000, 101 2775000,
102}; 102};
103 103
104static const int mc13783_viohi_val[] = { 104static const unsigned int mc13783_viohi_val[] = {
105 2775000, 105 2775000,
106}; 106};
107 107
108static const int mc13783_violo_val[] = { 108static const unsigned int mc13783_violo_val[] = {
109 1200000, 1300000, 1500000, 1800000, 109 1200000, 1300000, 1500000, 1800000,
110}; 110};
111 111
112static const int mc13783_vdig_val[] = { 112static const unsigned int mc13783_vdig_val[] = {
113 1200000, 1300000, 1500000, 1800000, 113 1200000, 1300000, 1500000, 1800000,
114}; 114};
115 115
116static const int mc13783_vgen_val[] = { 116static const unsigned int mc13783_vgen_val[] = {
117 1200000, 1300000, 1500000, 1800000, 117 1200000, 1300000, 1500000, 1800000,
118 1100000, 2000000, 2775000, 2400000, 118 1100000, 2000000, 2775000, 2400000,
119}; 119};
120 120
121static const int mc13783_vrfdig_val[] = { 121static const unsigned int mc13783_vrfdig_val[] = {
122 1200000, 1500000, 1800000, 1875000, 122 1200000, 1500000, 1800000, 1875000,
123}; 123};
124 124
125static const int mc13783_vrfref_val[] = { 125static const unsigned int mc13783_vrfref_val[] = {
126 2475000, 2600000, 2700000, 2775000, 126 2475000, 2600000, 2700000, 2775000,
127}; 127};
128 128
129static const int mc13783_vrfcp_val[] = { 129static const unsigned int mc13783_vrfcp_val[] = {
130 2700000, 2775000, 130 2700000, 2775000,
131}; 131};
132 132
133static const int mc13783_vsim_val[] = { 133static const unsigned int mc13783_vsim_val[] = {
134 1800000, 2900000, 3000000, 134 1800000, 2900000, 3000000,
135}; 135};
136 136
137static const int mc13783_vesim_val[] = { 137static const unsigned int mc13783_vesim_val[] = {
138 1800000, 2900000, 138 1800000, 2900000,
139}; 139};
140 140
141static const int mc13783_vcam_val[] = { 141static const unsigned int mc13783_vcam_val[] = {
142 1500000, 1800000, 2500000, 2550000, 142 1500000, 1800000, 2500000, 2550000,
143 2600000, 2750000, 2800000, 3000000, 143 2600000, 2750000, 2800000, 3000000,
144}; 144};
145 145
146static const int mc13783_vrfbg_val[] = { 146static const unsigned int mc13783_vrfbg_val[] = {
147 1250000, 147 1250000,
148}; 148};
149 149
150static const int mc13783_vvib_val[] = { 150static const unsigned int mc13783_vvib_val[] = {
151 1300000, 1800000, 2000000, 3000000, 151 1300000, 1800000, 2000000, 3000000,
152}; 152};
153 153
154static const int mc13783_vmmc_val[] = { 154static const unsigned int mc13783_vmmc_val[] = {
155 1600000, 1800000, 2000000, 2600000, 155 1600000, 1800000, 2000000, 2600000,
156 2700000, 2800000, 2900000, 3000000, 156 2700000, 2800000, 2900000, 3000000,
157}; 157};
158 158
159static const int mc13783_vrf_val[] = { 159static const unsigned int mc13783_vrf_val[] = {
160 1500000, 1875000, 2700000, 2775000, 160 1500000, 1875000, 2700000, 2775000,
161}; 161};
162 162
163static const int mc13783_gpo_val[] = { 163static const unsigned int mc13783_gpo_val[] = {
164 3100000, 164 3100000,
165}; 165};
166 166
167static const int mc13783_pwgtdrv_val[] = { 167static const unsigned int mc13783_pwgtdrv_val[] = {
168 5500000, 168 5500000,
169}; 169};
170 170
@@ -328,7 +328,7 @@ static struct regulator_ops mc13783_gpo_regulator_ops = {
328 .enable = mc13783_gpo_regulator_enable, 328 .enable = mc13783_gpo_regulator_enable,
329 .disable = mc13783_gpo_regulator_disable, 329 .disable = mc13783_gpo_regulator_disable,
330 .is_enabled = mc13783_gpo_regulator_is_enabled, 330 .is_enabled = mc13783_gpo_regulator_is_enabled,
331 .list_voltage = mc13xxx_regulator_list_voltage, 331 .list_voltage = regulator_list_voltage_table,
332 .set_voltage = mc13xxx_fixed_regulator_set_voltage, 332 .set_voltage = mc13xxx_fixed_regulator_set_voltage,
333 .get_voltage = mc13xxx_fixed_regulator_get_voltage, 333 .get_voltage = mc13xxx_fixed_regulator_get_voltage,
334}; 334};
diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
index 970a233dbe46..6329723b5372 100644
--- a/drivers/regulator/mc13892-regulator.c
+++ b/drivers/regulator/mc13892-regulator.c
@@ -150,12 +150,12 @@
150#define MC13892_USB1 50 150#define MC13892_USB1 50
151#define MC13892_USB1_VUSBEN (1<<3) 151#define MC13892_USB1_VUSBEN (1<<3)
152 152
153static const int mc13892_vcoincell[] = { 153static const unsigned int mc13892_vcoincell[] = {
154 2500000, 2700000, 2800000, 2900000, 3000000, 3100000, 154 2500000, 2700000, 2800000, 2900000, 3000000, 3100000,
155 3200000, 3300000, 155 3200000, 3300000,
156}; 156};
157 157
158static const int mc13892_sw1[] = { 158static const unsigned int mc13892_sw1[] = {
159 600000, 625000, 650000, 675000, 700000, 725000, 159 600000, 625000, 650000, 675000, 700000, 725000,
160 750000, 775000, 800000, 825000, 850000, 875000, 160 750000, 775000, 800000, 825000, 850000, 875000,
161 900000, 925000, 950000, 975000, 1000000, 1025000, 161 900000, 925000, 950000, 975000, 1000000, 1025000,
@@ -164,7 +164,7 @@ static const int mc13892_sw1[] = {
164 1350000, 1375000 164 1350000, 1375000
165}; 165};
166 166
167static const int mc13892_sw[] = { 167static const unsigned int mc13892_sw[] = {
168 600000, 625000, 650000, 675000, 700000, 725000, 168 600000, 625000, 650000, 675000, 700000, 725000,
169 750000, 775000, 800000, 825000, 850000, 875000, 169 750000, 775000, 800000, 825000, 850000, 875000,
170 900000, 925000, 950000, 975000, 1000000, 1025000, 170 900000, 925000, 950000, 975000, 1000000, 1025000,
@@ -176,65 +176,65 @@ static const int mc13892_sw[] = {
176 1800000, 1825000, 1850000, 1875000 176 1800000, 1825000, 1850000, 1875000
177}; 177};
178 178
179static const int mc13892_swbst[] = { 179static const unsigned int mc13892_swbst[] = {
180 5000000, 180 5000000,
181}; 181};
182 182
183static const int mc13892_viohi[] = { 183static const unsigned int mc13892_viohi[] = {
184 2775000, 184 2775000,
185}; 185};
186 186
187static const int mc13892_vpll[] = { 187static const unsigned int mc13892_vpll[] = {
188 1050000, 1250000, 1650000, 1800000, 188 1050000, 1250000, 1650000, 1800000,
189}; 189};
190 190
191static const int mc13892_vdig[] = { 191static const unsigned int mc13892_vdig[] = {
192 1050000, 1250000, 1650000, 1800000, 192 1050000, 1250000, 1650000, 1800000,
193}; 193};
194 194
195static const int mc13892_vsd[] = { 195static const unsigned int mc13892_vsd[] = {
196 1800000, 2000000, 2600000, 2700000, 196 1800000, 2000000, 2600000, 2700000,
197 2800000, 2900000, 3000000, 3150000, 197 2800000, 2900000, 3000000, 3150000,
198}; 198};
199 199
200static const int mc13892_vusb2[] = { 200static const unsigned int mc13892_vusb2[] = {
201 2400000, 2600000, 2700000, 2775000, 201 2400000, 2600000, 2700000, 2775000,
202}; 202};
203 203
204static const int mc13892_vvideo[] = { 204static const unsigned int mc13892_vvideo[] = {
205 2700000, 2775000, 2500000, 2600000, 205 2700000, 2775000, 2500000, 2600000,
206}; 206};
207 207
208static const int mc13892_vaudio[] = { 208static const unsigned int mc13892_vaudio[] = {
209 2300000, 2500000, 2775000, 3000000, 209 2300000, 2500000, 2775000, 3000000,
210}; 210};
211 211
212static const int mc13892_vcam[] = { 212static const unsigned int mc13892_vcam[] = {
213 2500000, 2600000, 2750000, 3000000, 213 2500000, 2600000, 2750000, 3000000,
214}; 214};
215 215
216static const int mc13892_vgen1[] = { 216static const unsigned int mc13892_vgen1[] = {
217 1200000, 1500000, 2775000, 3150000, 217 1200000, 1500000, 2775000, 3150000,
218}; 218};
219 219
220static const int mc13892_vgen2[] = { 220static const unsigned int mc13892_vgen2[] = {
221 1200000, 1500000, 1600000, 1800000, 221 1200000, 1500000, 1600000, 1800000,
222 2700000, 2800000, 3000000, 3150000, 222 2700000, 2800000, 3000000, 3150000,
223}; 223};
224 224
225static const int mc13892_vgen3[] = { 225static const unsigned int mc13892_vgen3[] = {
226 1800000, 2900000, 226 1800000, 2900000,
227}; 227};
228 228
229static const int mc13892_vusb[] = { 229static const unsigned int mc13892_vusb[] = {
230 3300000, 230 3300000,
231}; 231};
232 232
233static const int mc13892_gpo[] = { 233static const unsigned int mc13892_gpo[] = {
234 2750000, 234 2750000,
235}; 235};
236 236
237static const int mc13892_pwgtdrv[] = { 237static const unsigned int mc13892_pwgtdrv[] = {
238 5000000, 238 5000000,
239}; 239};
240 240
@@ -394,7 +394,7 @@ static struct regulator_ops mc13892_gpo_regulator_ops = {
394 .enable = mc13892_gpo_regulator_enable, 394 .enable = mc13892_gpo_regulator_enable,
395 .disable = mc13892_gpo_regulator_disable, 395 .disable = mc13892_gpo_regulator_disable,
396 .is_enabled = mc13892_gpo_regulator_is_enabled, 396 .is_enabled = mc13892_gpo_regulator_is_enabled,
397 .list_voltage = mc13xxx_regulator_list_voltage, 397 .list_voltage = regulator_list_voltage_table,
398 .set_voltage = mc13xxx_fixed_regulator_set_voltage, 398 .set_voltage = mc13xxx_fixed_regulator_set_voltage,
399 .get_voltage = mc13xxx_fixed_regulator_get_voltage, 399 .get_voltage = mc13xxx_fixed_regulator_get_voltage,
400}; 400};
@@ -436,7 +436,7 @@ static int mc13892_sw_regulator_set_voltage_sel(struct regulator_dev *rdev,
436 u32 valread; 436 u32 valread;
437 int ret; 437 int ret;
438 438
439 value = mc13892_regulators[id].voltages[selector]; 439 value = rdev->desc->volt_table[selector];
440 440
441 mc13xxx_lock(priv->mc13xxx); 441 mc13xxx_lock(priv->mc13xxx);
442 ret = mc13xxx_reg_read(priv->mc13xxx, 442 ret = mc13xxx_reg_read(priv->mc13xxx,
@@ -470,7 +470,7 @@ err:
470 470
471static struct regulator_ops mc13892_sw_regulator_ops = { 471static struct regulator_ops mc13892_sw_regulator_ops = {
472 .is_enabled = mc13xxx_sw_regulator_is_enabled, 472 .is_enabled = mc13xxx_sw_regulator_is_enabled,
473 .list_voltage = mc13xxx_regulator_list_voltage, 473 .list_voltage = regulator_list_voltage_table,
474 .set_voltage_sel = mc13892_sw_regulator_set_voltage_sel, 474 .set_voltage_sel = mc13892_sw_regulator_set_voltage_sel,
475 .get_voltage = mc13892_sw_regulator_get_voltage, 475 .get_voltage = mc13892_sw_regulator_get_voltage,
476}; 476};
diff --git a/drivers/regulator/mc13xxx-regulator-core.c b/drivers/regulator/mc13xxx-regulator-core.c
index 3e191715fb25..8a6b050ff5aa 100644
--- a/drivers/regulator/mc13xxx-regulator-core.c
+++ b/drivers/regulator/mc13xxx-regulator-core.c
@@ -80,20 +80,6 @@ static int mc13xxx_regulator_is_enabled(struct regulator_dev *rdev)
80 return (val & mc13xxx_regulators[id].enable_bit) != 0; 80 return (val & mc13xxx_regulators[id].enable_bit) != 0;
81} 81}
82 82
83int mc13xxx_regulator_list_voltage(struct regulator_dev *rdev,
84 unsigned selector)
85{
86 int id = rdev_get_id(rdev);
87 struct mc13xxx_regulator_priv *priv = rdev_get_drvdata(rdev);
88 struct mc13xxx_regulator *mc13xxx_regulators = priv->mc13xxx_regulators;
89
90 if (selector >= mc13xxx_regulators[id].desc.n_voltages)
91 return -EINVAL;
92
93 return mc13xxx_regulators[id].voltages[selector];
94}
95EXPORT_SYMBOL_GPL(mc13xxx_regulator_list_voltage);
96
97static int mc13xxx_regulator_set_voltage_sel(struct regulator_dev *rdev, 83static int mc13xxx_regulator_set_voltage_sel(struct regulator_dev *rdev,
98 unsigned selector) 84 unsigned selector)
99{ 85{
@@ -135,14 +121,14 @@ static int mc13xxx_regulator_get_voltage(struct regulator_dev *rdev)
135 121
136 BUG_ON(val >= mc13xxx_regulators[id].desc.n_voltages); 122 BUG_ON(val >= mc13xxx_regulators[id].desc.n_voltages);
137 123
138 return mc13xxx_regulators[id].voltages[val]; 124 return rdev->desc->volt_table[val];
139} 125}
140 126
141struct regulator_ops mc13xxx_regulator_ops = { 127struct regulator_ops mc13xxx_regulator_ops = {
142 .enable = mc13xxx_regulator_enable, 128 .enable = mc13xxx_regulator_enable,
143 .disable = mc13xxx_regulator_disable, 129 .disable = mc13xxx_regulator_disable,
144 .is_enabled = mc13xxx_regulator_is_enabled, 130 .is_enabled = mc13xxx_regulator_is_enabled,
145 .list_voltage = mc13xxx_regulator_list_voltage, 131 .list_voltage = regulator_list_voltage_table,
146 .set_voltage_sel = mc13xxx_regulator_set_voltage_sel, 132 .set_voltage_sel = mc13xxx_regulator_set_voltage_sel,
147 .get_voltage = mc13xxx_regulator_get_voltage, 133 .get_voltage = mc13xxx_regulator_get_voltage,
148}; 134};
@@ -151,15 +137,13 @@ EXPORT_SYMBOL_GPL(mc13xxx_regulator_ops);
151int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev, int min_uV, 137int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev, int min_uV,
152 int max_uV, unsigned *selector) 138 int max_uV, unsigned *selector)
153{ 139{
154 struct mc13xxx_regulator_priv *priv = rdev_get_drvdata(rdev);
155 struct mc13xxx_regulator *mc13xxx_regulators = priv->mc13xxx_regulators;
156 int id = rdev_get_id(rdev); 140 int id = rdev_get_id(rdev);
157 141
158 dev_dbg(rdev_get_dev(rdev), "%s id: %d min_uV: %d max_uV: %d\n", 142 dev_dbg(rdev_get_dev(rdev), "%s id: %d min_uV: %d max_uV: %d\n",
159 __func__, id, min_uV, max_uV); 143 __func__, id, min_uV, max_uV);
160 144
161 if (min_uV <= mc13xxx_regulators[id].voltages[0] && 145 if (min_uV <= rdev->desc->volt_table[0] &&
162 mc13xxx_regulators[id].voltages[0] <= max_uV) 146 rdev->desc->volt_table[0] <= max_uV)
163 return 0; 147 return 0;
164 else 148 else
165 return -EINVAL; 149 return -EINVAL;
@@ -168,13 +152,11 @@ EXPORT_SYMBOL_GPL(mc13xxx_fixed_regulator_set_voltage);
168 152
169int mc13xxx_fixed_regulator_get_voltage(struct regulator_dev *rdev) 153int mc13xxx_fixed_regulator_get_voltage(struct regulator_dev *rdev)
170{ 154{
171 struct mc13xxx_regulator_priv *priv = rdev_get_drvdata(rdev);
172 struct mc13xxx_regulator *mc13xxx_regulators = priv->mc13xxx_regulators;
173 int id = rdev_get_id(rdev); 155 int id = rdev_get_id(rdev);
174 156
175 dev_dbg(rdev_get_dev(rdev), "%s id: %d\n", __func__, id); 157 dev_dbg(rdev_get_dev(rdev), "%s id: %d\n", __func__, id);
176 158
177 return mc13xxx_regulators[id].voltages[0]; 159 return rdev->desc->volt_table[0];
178} 160}
179EXPORT_SYMBOL_GPL(mc13xxx_fixed_regulator_get_voltage); 161EXPORT_SYMBOL_GPL(mc13xxx_fixed_regulator_get_voltage);
180 162
@@ -182,7 +164,7 @@ struct regulator_ops mc13xxx_fixed_regulator_ops = {
182 .enable = mc13xxx_regulator_enable, 164 .enable = mc13xxx_regulator_enable,
183 .disable = mc13xxx_regulator_disable, 165 .disable = mc13xxx_regulator_disable,
184 .is_enabled = mc13xxx_regulator_is_enabled, 166 .is_enabled = mc13xxx_regulator_is_enabled,
185 .list_voltage = mc13xxx_regulator_list_voltage, 167 .list_voltage = regulator_list_voltage_table,
186 .set_voltage = mc13xxx_fixed_regulator_set_voltage, 168 .set_voltage = mc13xxx_fixed_regulator_set_voltage,
187 .get_voltage = mc13xxx_fixed_regulator_get_voltage, 169 .get_voltage = mc13xxx_fixed_regulator_get_voltage,
188}; 170};
diff --git a/drivers/regulator/mc13xxx.h b/drivers/regulator/mc13xxx.h
index 044aba4d28ec..9a8f72ce718e 100644
--- a/drivers/regulator/mc13xxx.h
+++ b/drivers/regulator/mc13xxx.h
@@ -22,7 +22,6 @@ struct mc13xxx_regulator {
22 int vsel_shift; 22 int vsel_shift;
23 int vsel_mask; 23 int vsel_mask;
24 int hi_bit; 24 int hi_bit;
25 int const *voltages;
26}; 25};
27 26
28struct mc13xxx_regulator_priv { 27struct mc13xxx_regulator_priv {
@@ -35,8 +34,6 @@ struct mc13xxx_regulator_priv {
35 34
36extern int mc13xxx_sw_regulator(struct regulator_dev *rdev); 35extern int mc13xxx_sw_regulator(struct regulator_dev *rdev);
37extern int mc13xxx_sw_regulator_is_enabled(struct regulator_dev *rdev); 36extern int mc13xxx_sw_regulator_is_enabled(struct regulator_dev *rdev);
38extern int mc13xxx_regulator_list_voltage(struct regulator_dev *rdev,
39 unsigned selector);
40extern int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev, 37extern int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev,
41 int min_uV, int max_uV, unsigned *selector); 38 int min_uV, int max_uV, unsigned *selector);
42extern int mc13xxx_fixed_regulator_get_voltage(struct regulator_dev *rdev); 39extern int mc13xxx_fixed_regulator_get_voltage(struct regulator_dev *rdev);
@@ -68,6 +65,7 @@ extern struct regulator_ops mc13xxx_fixed_regulator_ops;
68 .desc = { \ 65 .desc = { \
69 .name = #_name, \ 66 .name = #_name, \
70 .n_voltages = ARRAY_SIZE(_voltages), \ 67 .n_voltages = ARRAY_SIZE(_voltages), \
68 .volt_table = _voltages, \
71 .ops = &_ops, \ 69 .ops = &_ops, \
72 .type = REGULATOR_VOLTAGE, \ 70 .type = REGULATOR_VOLTAGE, \
73 .id = prefix ## _name, \ 71 .id = prefix ## _name, \
@@ -78,7 +76,6 @@ extern struct regulator_ops mc13xxx_fixed_regulator_ops;
78 .vsel_reg = prefix ## _vsel_reg, \ 76 .vsel_reg = prefix ## _vsel_reg, \
79 .vsel_shift = prefix ## _vsel_reg ## _ ## _name ## VSEL,\ 77 .vsel_shift = prefix ## _vsel_reg ## _ ## _name ## VSEL,\
80 .vsel_mask = prefix ## _vsel_reg ## _ ## _name ## VSEL_M,\ 78 .vsel_mask = prefix ## _vsel_reg ## _ ## _name ## VSEL_M,\
81 .voltages = _voltages, \
82 } 79 }
83 80
84#define MC13xxx_FIXED_DEFINE(prefix, _name, _reg, _voltages, _ops) \ 81#define MC13xxx_FIXED_DEFINE(prefix, _name, _reg, _voltages, _ops) \
@@ -86,6 +83,7 @@ extern struct regulator_ops mc13xxx_fixed_regulator_ops;
86 .desc = { \ 83 .desc = { \
87 .name = #_name, \ 84 .name = #_name, \
88 .n_voltages = ARRAY_SIZE(_voltages), \ 85 .n_voltages = ARRAY_SIZE(_voltages), \
86 .volt_table = _voltages, \
89 .ops = &_ops, \ 87 .ops = &_ops, \
90 .type = REGULATOR_VOLTAGE, \ 88 .type = REGULATOR_VOLTAGE, \
91 .id = prefix ## _name, \ 89 .id = prefix ## _name, \
@@ -93,7 +91,6 @@ extern struct regulator_ops mc13xxx_fixed_regulator_ops;
93 }, \ 91 }, \
94 .reg = prefix ## _reg, \ 92 .reg = prefix ## _reg, \
95 .enable_bit = prefix ## _reg ## _ ## _name ## EN, \ 93 .enable_bit = prefix ## _reg ## _ ## _name ## EN, \
96 .voltages = _voltages, \
97 } 94 }
98 95
99#define MC13xxx_GPO_DEFINE(prefix, _name, _reg, _voltages, _ops) \ 96#define MC13xxx_GPO_DEFINE(prefix, _name, _reg, _voltages, _ops) \
@@ -101,6 +98,7 @@ extern struct regulator_ops mc13xxx_fixed_regulator_ops;
101 .desc = { \ 98 .desc = { \
102 .name = #_name, \ 99 .name = #_name, \
103 .n_voltages = ARRAY_SIZE(_voltages), \ 100 .n_voltages = ARRAY_SIZE(_voltages), \
101 .volt_table = _voltages, \
104 .ops = &_ops, \ 102 .ops = &_ops, \
105 .type = REGULATOR_VOLTAGE, \ 103 .type = REGULATOR_VOLTAGE, \
106 .id = prefix ## _name, \ 104 .id = prefix ## _name, \
@@ -108,7 +106,6 @@ extern struct regulator_ops mc13xxx_fixed_regulator_ops;
108 }, \ 106 }, \
109 .reg = prefix ## _reg, \ 107 .reg = prefix ## _reg, \
110 .enable_bit = prefix ## _reg ## _ ## _name ## EN, \ 108 .enable_bit = prefix ## _reg ## _ ## _name ## EN, \
111 .voltages = _voltages, \
112 } 109 }
113 110
114#define MC13xxx_DEFINE_SW(_name, _reg, _vsel_reg, _voltages, ops) \ 111#define MC13xxx_DEFINE_SW(_name, _reg, _vsel_reg, _voltages, ops) \