diff options
-rw-r--r-- | drivers/regulator/rk808-regulator.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index 0da8867bdf4c..e3720085b4ce 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c | |||
@@ -108,6 +108,7 @@ static struct regulator_ops rk808_switch_ops = { | |||
108 | static const struct regulator_desc rk808_reg[] = { | 108 | static const struct regulator_desc rk808_reg[] = { |
109 | { | 109 | { |
110 | .name = "DCDC_REG1", | 110 | .name = "DCDC_REG1", |
111 | .supply_name = "vcc1", | ||
111 | .id = RK808_ID_DCDC1, | 112 | .id = RK808_ID_DCDC1, |
112 | .ops = &rk808_reg_ops, | 113 | .ops = &rk808_reg_ops, |
113 | .type = REGULATOR_VOLTAGE, | 114 | .type = REGULATOR_VOLTAGE, |
@@ -121,6 +122,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
121 | .owner = THIS_MODULE, | 122 | .owner = THIS_MODULE, |
122 | }, { | 123 | }, { |
123 | .name = "DCDC_REG2", | 124 | .name = "DCDC_REG2", |
125 | .supply_name = "vcc2", | ||
124 | .id = RK808_ID_DCDC2, | 126 | .id = RK808_ID_DCDC2, |
125 | .ops = &rk808_reg_ops, | 127 | .ops = &rk808_reg_ops, |
126 | .type = REGULATOR_VOLTAGE, | 128 | .type = REGULATOR_VOLTAGE, |
@@ -134,6 +136,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
134 | .owner = THIS_MODULE, | 136 | .owner = THIS_MODULE, |
135 | }, { | 137 | }, { |
136 | .name = "DCDC_REG3", | 138 | .name = "DCDC_REG3", |
139 | .supply_name = "vcc3", | ||
137 | .id = RK808_ID_DCDC3, | 140 | .id = RK808_ID_DCDC3, |
138 | .ops = &rk808_switch_ops, | 141 | .ops = &rk808_switch_ops, |
139 | .type = REGULATOR_VOLTAGE, | 142 | .type = REGULATOR_VOLTAGE, |
@@ -143,6 +146,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
143 | .owner = THIS_MODULE, | 146 | .owner = THIS_MODULE, |
144 | }, { | 147 | }, { |
145 | .name = "DCDC_REG4", | 148 | .name = "DCDC_REG4", |
149 | .supply_name = "vcc4", | ||
146 | .id = RK808_ID_DCDC4, | 150 | .id = RK808_ID_DCDC4, |
147 | .ops = &rk808_reg_ops, | 151 | .ops = &rk808_reg_ops, |
148 | .type = REGULATOR_VOLTAGE, | 152 | .type = REGULATOR_VOLTAGE, |
@@ -156,6 +160,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
156 | .owner = THIS_MODULE, | 160 | .owner = THIS_MODULE, |
157 | }, { | 161 | }, { |
158 | .name = "LDO_REG1", | 162 | .name = "LDO_REG1", |
163 | .supply_name = "vcc6", | ||
159 | .id = RK808_ID_LDO1, | 164 | .id = RK808_ID_LDO1, |
160 | .ops = &rk808_reg_ops, | 165 | .ops = &rk808_reg_ops, |
161 | .type = REGULATOR_VOLTAGE, | 166 | .type = REGULATOR_VOLTAGE, |
@@ -169,6 +174,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
169 | .owner = THIS_MODULE, | 174 | .owner = THIS_MODULE, |
170 | }, { | 175 | }, { |
171 | .name = "LDO_REG2", | 176 | .name = "LDO_REG2", |
177 | .supply_name = "vcc6", | ||
172 | .id = RK808_ID_LDO2, | 178 | .id = RK808_ID_LDO2, |
173 | .ops = &rk808_reg_ops, | 179 | .ops = &rk808_reg_ops, |
174 | .type = REGULATOR_VOLTAGE, | 180 | .type = REGULATOR_VOLTAGE, |
@@ -182,6 +188,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
182 | .owner = THIS_MODULE, | 188 | .owner = THIS_MODULE, |
183 | }, { | 189 | }, { |
184 | .name = "LDO_REG3", | 190 | .name = "LDO_REG3", |
191 | .supply_name = "vcc7", | ||
185 | .id = RK808_ID_LDO3, | 192 | .id = RK808_ID_LDO3, |
186 | .ops = &rk808_reg_ops, | 193 | .ops = &rk808_reg_ops, |
187 | .type = REGULATOR_VOLTAGE, | 194 | .type = REGULATOR_VOLTAGE, |
@@ -195,6 +202,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
195 | .owner = THIS_MODULE, | 202 | .owner = THIS_MODULE, |
196 | }, { | 203 | }, { |
197 | .name = "LDO_REG4", | 204 | .name = "LDO_REG4", |
205 | .supply_name = "vcc9", | ||
198 | .id = RK808_ID_LDO4, | 206 | .id = RK808_ID_LDO4, |
199 | .ops = &rk808_reg_ops, | 207 | .ops = &rk808_reg_ops, |
200 | .type = REGULATOR_VOLTAGE, | 208 | .type = REGULATOR_VOLTAGE, |
@@ -208,6 +216,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
208 | .owner = THIS_MODULE, | 216 | .owner = THIS_MODULE, |
209 | }, { | 217 | }, { |
210 | .name = "LDO_REG5", | 218 | .name = "LDO_REG5", |
219 | .supply_name = "vcc9", | ||
211 | .id = RK808_ID_LDO5, | 220 | .id = RK808_ID_LDO5, |
212 | .ops = &rk808_reg_ops, | 221 | .ops = &rk808_reg_ops, |
213 | .type = REGULATOR_VOLTAGE, | 222 | .type = REGULATOR_VOLTAGE, |
@@ -221,6 +230,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
221 | .owner = THIS_MODULE, | 230 | .owner = THIS_MODULE, |
222 | }, { | 231 | }, { |
223 | .name = "LDO_REG6", | 232 | .name = "LDO_REG6", |
233 | .supply_name = "vcc10", | ||
224 | .id = RK808_ID_LDO6, | 234 | .id = RK808_ID_LDO6, |
225 | .ops = &rk808_reg_ops, | 235 | .ops = &rk808_reg_ops, |
226 | .type = REGULATOR_VOLTAGE, | 236 | .type = REGULATOR_VOLTAGE, |
@@ -234,6 +244,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
234 | .owner = THIS_MODULE, | 244 | .owner = THIS_MODULE, |
235 | }, { | 245 | }, { |
236 | .name = "LDO_REG7", | 246 | .name = "LDO_REG7", |
247 | .supply_name = "vcc7", | ||
237 | .id = RK808_ID_LDO7, | 248 | .id = RK808_ID_LDO7, |
238 | .ops = &rk808_reg_ops, | 249 | .ops = &rk808_reg_ops, |
239 | .type = REGULATOR_VOLTAGE, | 250 | .type = REGULATOR_VOLTAGE, |
@@ -247,6 +258,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
247 | .owner = THIS_MODULE, | 258 | .owner = THIS_MODULE, |
248 | }, { | 259 | }, { |
249 | .name = "LDO_REG8", | 260 | .name = "LDO_REG8", |
261 | .supply_name = "vcc11", | ||
250 | .id = RK808_ID_LDO8, | 262 | .id = RK808_ID_LDO8, |
251 | .ops = &rk808_reg_ops, | 263 | .ops = &rk808_reg_ops, |
252 | .type = REGULATOR_VOLTAGE, | 264 | .type = REGULATOR_VOLTAGE, |
@@ -260,6 +272,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
260 | .owner = THIS_MODULE, | 272 | .owner = THIS_MODULE, |
261 | }, { | 273 | }, { |
262 | .name = "SWITCH_REG1", | 274 | .name = "SWITCH_REG1", |
275 | .supply_name = "vcc8", | ||
263 | .id = RK808_ID_SWITCH1, | 276 | .id = RK808_ID_SWITCH1, |
264 | .ops = &rk808_switch_ops, | 277 | .ops = &rk808_switch_ops, |
265 | .type = REGULATOR_VOLTAGE, | 278 | .type = REGULATOR_VOLTAGE, |
@@ -268,6 +281,7 @@ static const struct regulator_desc rk808_reg[] = { | |||
268 | .owner = THIS_MODULE, | 281 | .owner = THIS_MODULE, |
269 | }, { | 282 | }, { |
270 | .name = "SWITCH_REG2", | 283 | .name = "SWITCH_REG2", |
284 | .supply_name = "vcc12", | ||
271 | .id = RK808_ID_SWITCH2, | 285 | .id = RK808_ID_SWITCH2, |
272 | .ops = &rk808_switch_ops, | 286 | .ops = &rk808_switch_ops, |
273 | .type = REGULATOR_VOLTAGE, | 287 | .type = REGULATOR_VOLTAGE, |
@@ -364,7 +378,6 @@ static int rk808_regulator_probe(struct platform_device *pdev) | |||
364 | if (client->dev.of_node) | 378 | if (client->dev.of_node) |
365 | config.of_node = pdata->of_node[i]; | 379 | config.of_node = pdata->of_node[i]; |
366 | 380 | ||
367 | reg_data->supply_regulator = rk808_reg[i].name; | ||
368 | config.init_data = reg_data; | 381 | config.init_data = reg_data; |
369 | 382 | ||
370 | rk808_rdev = devm_regulator_register(&pdev->dev, | 383 | rk808_rdev = devm_regulator_register(&pdev->dev, |