diff options
author | Amit Daniel Kachhap <amit.daniel@samsung.com> | 2014-07-15 07:02:51 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-08-16 17:51:16 -0400 |
commit | 0e4f417857083f399769491f6e7773d111debd0f (patch) | |
tree | 65bfad849d60347445e3142dab5ae20381707a76 | |
parent | 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff) |
regulator: s2mpxxx: Move regulator min/step voltages in common place
This is a cleanup patch and moves min/step voltages in a common samsung
header file so that they can be used by other s2mpxxx PMIC drivers. Only
few required macros are added currently and others can be added if needed.
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/regulator/s2mpa01.c | 32 | ||||
-rw-r--r-- | drivers/regulator/s2mps11.c | 50 | ||||
-rw-r--r-- | include/linux/mfd/samsung/core.h | 21 | ||||
-rw-r--r-- | include/linux/mfd/samsung/s2mpa01.h | 12 | ||||
-rw-r--r-- | include/linux/mfd/samsung/s2mps11.h | 9 | ||||
-rw-r--r-- | include/linux/mfd/samsung/s2mps14.h | 10 |
6 files changed, 62 insertions, 72 deletions
diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c index ee83b4876420..962c5f192f7c 100644 --- a/drivers/regulator/s2mpa01.c +++ b/drivers/regulator/s2mpa01.c | |||
@@ -241,8 +241,8 @@ static struct regulator_ops s2mpa01_buck_ops = { | |||
241 | .ops = &s2mpa01_ldo_ops, \ | 241 | .ops = &s2mpa01_ldo_ops, \ |
242 | .type = REGULATOR_VOLTAGE, \ | 242 | .type = REGULATOR_VOLTAGE, \ |
243 | .owner = THIS_MODULE, \ | 243 | .owner = THIS_MODULE, \ |
244 | .min_uV = S2MPA01_LDO_MIN, \ | 244 | .min_uV = MIN_800_MV, \ |
245 | .uV_step = S2MPA01_LDO_STEP1, \ | 245 | .uV_step = STEP_50_MV, \ |
246 | .n_voltages = S2MPA01_LDO_N_VOLTAGES, \ | 246 | .n_voltages = S2MPA01_LDO_N_VOLTAGES, \ |
247 | .vsel_reg = S2MPA01_REG_L1CTRL + num - 1, \ | 247 | .vsel_reg = S2MPA01_REG_L1CTRL + num - 1, \ |
248 | .vsel_mask = S2MPA01_LDO_VSEL_MASK, \ | 248 | .vsel_mask = S2MPA01_LDO_VSEL_MASK, \ |
@@ -255,8 +255,8 @@ static struct regulator_ops s2mpa01_buck_ops = { | |||
255 | .ops = &s2mpa01_ldo_ops, \ | 255 | .ops = &s2mpa01_ldo_ops, \ |
256 | .type = REGULATOR_VOLTAGE, \ | 256 | .type = REGULATOR_VOLTAGE, \ |
257 | .owner = THIS_MODULE, \ | 257 | .owner = THIS_MODULE, \ |
258 | .min_uV = S2MPA01_LDO_MIN, \ | 258 | .min_uV = MIN_800_MV, \ |
259 | .uV_step = S2MPA01_LDO_STEP2, \ | 259 | .uV_step = STEP_25_MV, \ |
260 | .n_voltages = S2MPA01_LDO_N_VOLTAGES, \ | 260 | .n_voltages = S2MPA01_LDO_N_VOLTAGES, \ |
261 | .vsel_reg = S2MPA01_REG_L1CTRL + num - 1, \ | 261 | .vsel_reg = S2MPA01_REG_L1CTRL + num - 1, \ |
262 | .vsel_mask = S2MPA01_LDO_VSEL_MASK, \ | 262 | .vsel_mask = S2MPA01_LDO_VSEL_MASK, \ |
@@ -270,8 +270,8 @@ static struct regulator_ops s2mpa01_buck_ops = { | |||
270 | .ops = &s2mpa01_buck_ops, \ | 270 | .ops = &s2mpa01_buck_ops, \ |
271 | .type = REGULATOR_VOLTAGE, \ | 271 | .type = REGULATOR_VOLTAGE, \ |
272 | .owner = THIS_MODULE, \ | 272 | .owner = THIS_MODULE, \ |
273 | .min_uV = S2MPA01_BUCK_MIN1, \ | 273 | .min_uV = MIN_600_MV, \ |
274 | .uV_step = S2MPA01_BUCK_STEP1, \ | 274 | .uV_step = STEP_6_25_MV, \ |
275 | .n_voltages = S2MPA01_BUCK_N_VOLTAGES, \ | 275 | .n_voltages = S2MPA01_BUCK_N_VOLTAGES, \ |
276 | .ramp_delay = S2MPA01_RAMP_DELAY, \ | 276 | .ramp_delay = S2MPA01_RAMP_DELAY, \ |
277 | .vsel_reg = S2MPA01_REG_B1CTRL2 + (num - 1) * 2, \ | 277 | .vsel_reg = S2MPA01_REG_B1CTRL2 + (num - 1) * 2, \ |
@@ -286,8 +286,8 @@ static struct regulator_ops s2mpa01_buck_ops = { | |||
286 | .ops = &s2mpa01_buck_ops, \ | 286 | .ops = &s2mpa01_buck_ops, \ |
287 | .type = REGULATOR_VOLTAGE, \ | 287 | .type = REGULATOR_VOLTAGE, \ |
288 | .owner = THIS_MODULE, \ | 288 | .owner = THIS_MODULE, \ |
289 | .min_uV = S2MPA01_BUCK_MIN2, \ | 289 | .min_uV = MIN_800_MV, \ |
290 | .uV_step = S2MPA01_BUCK_STEP1, \ | 290 | .uV_step = STEP_6_25_MV, \ |
291 | .n_voltages = S2MPA01_BUCK_N_VOLTAGES, \ | 291 | .n_voltages = S2MPA01_BUCK_N_VOLTAGES, \ |
292 | .ramp_delay = S2MPA01_RAMP_DELAY, \ | 292 | .ramp_delay = S2MPA01_RAMP_DELAY, \ |
293 | .vsel_reg = S2MPA01_REG_B5CTRL2, \ | 293 | .vsel_reg = S2MPA01_REG_B5CTRL2, \ |
@@ -302,8 +302,8 @@ static struct regulator_ops s2mpa01_buck_ops = { | |||
302 | .ops = &s2mpa01_buck_ops, \ | 302 | .ops = &s2mpa01_buck_ops, \ |
303 | .type = REGULATOR_VOLTAGE, \ | 303 | .type = REGULATOR_VOLTAGE, \ |
304 | .owner = THIS_MODULE, \ | 304 | .owner = THIS_MODULE, \ |
305 | .min_uV = S2MPA01_BUCK_MIN1, \ | 305 | .min_uV = MIN_600_MV, \ |
306 | .uV_step = S2MPA01_BUCK_STEP1, \ | 306 | .uV_step = STEP_6_25_MV, \ |
307 | .n_voltages = S2MPA01_BUCK_N_VOLTAGES, \ | 307 | .n_voltages = S2MPA01_BUCK_N_VOLTAGES, \ |
308 | .ramp_delay = S2MPA01_RAMP_DELAY, \ | 308 | .ramp_delay = S2MPA01_RAMP_DELAY, \ |
309 | .vsel_reg = S2MPA01_REG_B6CTRL2 + (num - 6) * 2, \ | 309 | .vsel_reg = S2MPA01_REG_B6CTRL2 + (num - 6) * 2, \ |
@@ -318,8 +318,8 @@ static struct regulator_ops s2mpa01_buck_ops = { | |||
318 | .ops = &s2mpa01_buck_ops, \ | 318 | .ops = &s2mpa01_buck_ops, \ |
319 | .type = REGULATOR_VOLTAGE, \ | 319 | .type = REGULATOR_VOLTAGE, \ |
320 | .owner = THIS_MODULE, \ | 320 | .owner = THIS_MODULE, \ |
321 | .min_uV = S2MPA01_BUCK_MIN2, \ | 321 | .min_uV = MIN_800_MV, \ |
322 | .uV_step = S2MPA01_BUCK_STEP2, \ | 322 | .uV_step = STEP_12_5_MV, \ |
323 | .n_voltages = S2MPA01_BUCK_N_VOLTAGES, \ | 323 | .n_voltages = S2MPA01_BUCK_N_VOLTAGES, \ |
324 | .ramp_delay = S2MPA01_RAMP_DELAY, \ | 324 | .ramp_delay = S2MPA01_RAMP_DELAY, \ |
325 | .vsel_reg = S2MPA01_REG_B8CTRL2, \ | 325 | .vsel_reg = S2MPA01_REG_B8CTRL2, \ |
@@ -334,8 +334,8 @@ static struct regulator_ops s2mpa01_buck_ops = { | |||
334 | .ops = &s2mpa01_buck_ops, \ | 334 | .ops = &s2mpa01_buck_ops, \ |
335 | .type = REGULATOR_VOLTAGE, \ | 335 | .type = REGULATOR_VOLTAGE, \ |
336 | .owner = THIS_MODULE, \ | 336 | .owner = THIS_MODULE, \ |
337 | .min_uV = S2MPA01_BUCK_MIN4, \ | 337 | .min_uV = MIN_1500_MV, \ |
338 | .uV_step = S2MPA01_BUCK_STEP2, \ | 338 | .uV_step = STEP_12_5_MV, \ |
339 | .n_voltages = S2MPA01_BUCK_N_VOLTAGES, \ | 339 | .n_voltages = S2MPA01_BUCK_N_VOLTAGES, \ |
340 | .ramp_delay = S2MPA01_RAMP_DELAY, \ | 340 | .ramp_delay = S2MPA01_RAMP_DELAY, \ |
341 | .vsel_reg = S2MPA01_REG_B9CTRL2, \ | 341 | .vsel_reg = S2MPA01_REG_B9CTRL2, \ |
@@ -350,8 +350,8 @@ static struct regulator_ops s2mpa01_buck_ops = { | |||
350 | .ops = &s2mpa01_buck_ops, \ | 350 | .ops = &s2mpa01_buck_ops, \ |
351 | .type = REGULATOR_VOLTAGE, \ | 351 | .type = REGULATOR_VOLTAGE, \ |
352 | .owner = THIS_MODULE, \ | 352 | .owner = THIS_MODULE, \ |
353 | .min_uV = S2MPA01_BUCK_MIN3, \ | 353 | .min_uV = MIN_1000_MV, \ |
354 | .uV_step = S2MPA01_BUCK_STEP2, \ | 354 | .uV_step = STEP_12_5_MV, \ |
355 | .n_voltages = S2MPA01_BUCK_N_VOLTAGES, \ | 355 | .n_voltages = S2MPA01_BUCK_N_VOLTAGES, \ |
356 | .ramp_delay = S2MPA01_RAMP_DELAY, \ | 356 | .ramp_delay = S2MPA01_RAMP_DELAY, \ |
357 | .vsel_reg = S2MPA01_REG_B10CTRL2, \ | 357 | .vsel_reg = S2MPA01_REG_B10CTRL2, \ |
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index b16c53a8272f..3dede776a837 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c | |||
@@ -255,14 +255,14 @@ static struct regulator_ops s2mps11_buck_ops = { | |||
255 | .set_ramp_delay = s2mps11_set_ramp_delay, | 255 | .set_ramp_delay = s2mps11_set_ramp_delay, |
256 | }; | 256 | }; |
257 | 257 | ||
258 | #define regulator_desc_s2mps11_ldo1(num) { \ | 258 | #define regulator_desc_s2mps11_ldo1(num) { \ |
259 | .name = "LDO"#num, \ | 259 | .name = "LDO"#num, \ |
260 | .id = S2MPS11_LDO##num, \ | 260 | .id = S2MPS11_LDO##num, \ |
261 | .ops = &s2mps11_ldo_ops, \ | 261 | .ops = &s2mps11_ldo_ops, \ |
262 | .type = REGULATOR_VOLTAGE, \ | 262 | .type = REGULATOR_VOLTAGE, \ |
263 | .owner = THIS_MODULE, \ | 263 | .owner = THIS_MODULE, \ |
264 | .min_uV = S2MPS11_LDO_MIN, \ | 264 | .min_uV = MIN_800_MV, \ |
265 | .uV_step = S2MPS11_LDO_STEP1, \ | 265 | .uV_step = STEP_50_MV, \ |
266 | .n_voltages = S2MPS11_LDO_N_VOLTAGES, \ | 266 | .n_voltages = S2MPS11_LDO_N_VOLTAGES, \ |
267 | .vsel_reg = S2MPS11_REG_L1CTRL + num - 1, \ | 267 | .vsel_reg = S2MPS11_REG_L1CTRL + num - 1, \ |
268 | .vsel_mask = S2MPS11_LDO_VSEL_MASK, \ | 268 | .vsel_mask = S2MPS11_LDO_VSEL_MASK, \ |
@@ -275,8 +275,8 @@ static struct regulator_ops s2mps11_buck_ops = { | |||
275 | .ops = &s2mps11_ldo_ops, \ | 275 | .ops = &s2mps11_ldo_ops, \ |
276 | .type = REGULATOR_VOLTAGE, \ | 276 | .type = REGULATOR_VOLTAGE, \ |
277 | .owner = THIS_MODULE, \ | 277 | .owner = THIS_MODULE, \ |
278 | .min_uV = S2MPS11_LDO_MIN, \ | 278 | .min_uV = MIN_800_MV, \ |
279 | .uV_step = S2MPS11_LDO_STEP2, \ | 279 | .uV_step = STEP_25_MV, \ |
280 | .n_voltages = S2MPS11_LDO_N_VOLTAGES, \ | 280 | .n_voltages = S2MPS11_LDO_N_VOLTAGES, \ |
281 | .vsel_reg = S2MPS11_REG_L1CTRL + num - 1, \ | 281 | .vsel_reg = S2MPS11_REG_L1CTRL + num - 1, \ |
282 | .vsel_mask = S2MPS11_LDO_VSEL_MASK, \ | 282 | .vsel_mask = S2MPS11_LDO_VSEL_MASK, \ |
@@ -290,8 +290,8 @@ static struct regulator_ops s2mps11_buck_ops = { | |||
290 | .ops = &s2mps11_buck_ops, \ | 290 | .ops = &s2mps11_buck_ops, \ |
291 | .type = REGULATOR_VOLTAGE, \ | 291 | .type = REGULATOR_VOLTAGE, \ |
292 | .owner = THIS_MODULE, \ | 292 | .owner = THIS_MODULE, \ |
293 | .min_uV = S2MPS11_BUCK_MIN1, \ | 293 | .min_uV = MIN_600_MV, \ |
294 | .uV_step = S2MPS11_BUCK_STEP1, \ | 294 | .uV_step = STEP_6_25_MV, \ |
295 | .n_voltages = S2MPS11_BUCK_N_VOLTAGES, \ | 295 | .n_voltages = S2MPS11_BUCK_N_VOLTAGES, \ |
296 | .ramp_delay = S2MPS11_RAMP_DELAY, \ | 296 | .ramp_delay = S2MPS11_RAMP_DELAY, \ |
297 | .vsel_reg = S2MPS11_REG_B1CTRL2 + (num - 1) * 2, \ | 297 | .vsel_reg = S2MPS11_REG_B1CTRL2 + (num - 1) * 2, \ |
@@ -306,8 +306,8 @@ static struct regulator_ops s2mps11_buck_ops = { | |||
306 | .ops = &s2mps11_buck_ops, \ | 306 | .ops = &s2mps11_buck_ops, \ |
307 | .type = REGULATOR_VOLTAGE, \ | 307 | .type = REGULATOR_VOLTAGE, \ |
308 | .owner = THIS_MODULE, \ | 308 | .owner = THIS_MODULE, \ |
309 | .min_uV = S2MPS11_BUCK_MIN1, \ | 309 | .min_uV = MIN_600_MV, \ |
310 | .uV_step = S2MPS11_BUCK_STEP1, \ | 310 | .uV_step = STEP_6_25_MV, \ |
311 | .n_voltages = S2MPS11_BUCK_N_VOLTAGES, \ | 311 | .n_voltages = S2MPS11_BUCK_N_VOLTAGES, \ |
312 | .ramp_delay = S2MPS11_RAMP_DELAY, \ | 312 | .ramp_delay = S2MPS11_RAMP_DELAY, \ |
313 | .vsel_reg = S2MPS11_REG_B5CTRL2, \ | 313 | .vsel_reg = S2MPS11_REG_B5CTRL2, \ |
@@ -322,8 +322,8 @@ static struct regulator_ops s2mps11_buck_ops = { | |||
322 | .ops = &s2mps11_buck_ops, \ | 322 | .ops = &s2mps11_buck_ops, \ |
323 | .type = REGULATOR_VOLTAGE, \ | 323 | .type = REGULATOR_VOLTAGE, \ |
324 | .owner = THIS_MODULE, \ | 324 | .owner = THIS_MODULE, \ |
325 | .min_uV = S2MPS11_BUCK_MIN1, \ | 325 | .min_uV = MIN_600_MV, \ |
326 | .uV_step = S2MPS11_BUCK_STEP1, \ | 326 | .uV_step = STEP_6_25_MV, \ |
327 | .n_voltages = S2MPS11_BUCK_N_VOLTAGES, \ | 327 | .n_voltages = S2MPS11_BUCK_N_VOLTAGES, \ |
328 | .ramp_delay = S2MPS11_RAMP_DELAY, \ | 328 | .ramp_delay = S2MPS11_RAMP_DELAY, \ |
329 | .vsel_reg = S2MPS11_REG_B6CTRL2 + (num - 6) * 2, \ | 329 | .vsel_reg = S2MPS11_REG_B6CTRL2 + (num - 6) * 2, \ |
@@ -338,8 +338,8 @@ static struct regulator_ops s2mps11_buck_ops = { | |||
338 | .ops = &s2mps11_buck_ops, \ | 338 | .ops = &s2mps11_buck_ops, \ |
339 | .type = REGULATOR_VOLTAGE, \ | 339 | .type = REGULATOR_VOLTAGE, \ |
340 | .owner = THIS_MODULE, \ | 340 | .owner = THIS_MODULE, \ |
341 | .min_uV = S2MPS11_BUCK_MIN3, \ | 341 | .min_uV = MIN_3000_MV, \ |
342 | .uV_step = S2MPS11_BUCK_STEP3, \ | 342 | .uV_step = STEP_25_MV, \ |
343 | .n_voltages = S2MPS11_BUCK_N_VOLTAGES, \ | 343 | .n_voltages = S2MPS11_BUCK_N_VOLTAGES, \ |
344 | .ramp_delay = S2MPS11_RAMP_DELAY, \ | 344 | .ramp_delay = S2MPS11_RAMP_DELAY, \ |
345 | .vsel_reg = S2MPS11_REG_B9CTRL2, \ | 345 | .vsel_reg = S2MPS11_REG_B9CTRL2, \ |
@@ -354,8 +354,8 @@ static struct regulator_ops s2mps11_buck_ops = { | |||
354 | .ops = &s2mps11_buck_ops, \ | 354 | .ops = &s2mps11_buck_ops, \ |
355 | .type = REGULATOR_VOLTAGE, \ | 355 | .type = REGULATOR_VOLTAGE, \ |
356 | .owner = THIS_MODULE, \ | 356 | .owner = THIS_MODULE, \ |
357 | .min_uV = S2MPS11_BUCK_MIN2, \ | 357 | .min_uV = MIN_750_MV, \ |
358 | .uV_step = S2MPS11_BUCK_STEP2, \ | 358 | .uV_step = STEP_12_5_MV, \ |
359 | .n_voltages = S2MPS11_BUCK_N_VOLTAGES, \ | 359 | .n_voltages = S2MPS11_BUCK_N_VOLTAGES, \ |
360 | .ramp_delay = S2MPS11_RAMP_DELAY, \ | 360 | .ramp_delay = S2MPS11_RAMP_DELAY, \ |
361 | .vsel_reg = S2MPS11_REG_B10CTRL2, \ | 361 | .vsel_reg = S2MPS11_REG_B10CTRL2, \ |
@@ -516,8 +516,8 @@ static struct regulator_ops s2mps14_reg_ops = { | |||
516 | .ops = &s2mps14_reg_ops, \ | 516 | .ops = &s2mps14_reg_ops, \ |
517 | .type = REGULATOR_VOLTAGE, \ | 517 | .type = REGULATOR_VOLTAGE, \ |
518 | .owner = THIS_MODULE, \ | 518 | .owner = THIS_MODULE, \ |
519 | .min_uV = S2MPS14_LDO_MIN_800MV, \ | 519 | .min_uV = MIN_800_MV, \ |
520 | .uV_step = S2MPS14_LDO_STEP_25MV, \ | 520 | .uV_step = STEP_25_MV, \ |
521 | .n_voltages = S2MPS14_LDO_N_VOLTAGES, \ | 521 | .n_voltages = S2MPS14_LDO_N_VOLTAGES, \ |
522 | .vsel_reg = S2MPS14_REG_L1CTRL + num - 1, \ | 522 | .vsel_reg = S2MPS14_REG_L1CTRL + num - 1, \ |
523 | .vsel_mask = S2MPS14_LDO_VSEL_MASK, \ | 523 | .vsel_mask = S2MPS14_LDO_VSEL_MASK, \ |
@@ -530,8 +530,8 @@ static struct regulator_ops s2mps14_reg_ops = { | |||
530 | .ops = &s2mps14_reg_ops, \ | 530 | .ops = &s2mps14_reg_ops, \ |
531 | .type = REGULATOR_VOLTAGE, \ | 531 | .type = REGULATOR_VOLTAGE, \ |
532 | .owner = THIS_MODULE, \ | 532 | .owner = THIS_MODULE, \ |
533 | .min_uV = S2MPS14_LDO_MIN_1800MV, \ | 533 | .min_uV = MIN_1800_MV, \ |
534 | .uV_step = S2MPS14_LDO_STEP_25MV, \ | 534 | .uV_step = STEP_25_MV, \ |
535 | .n_voltages = S2MPS14_LDO_N_VOLTAGES, \ | 535 | .n_voltages = S2MPS14_LDO_N_VOLTAGES, \ |
536 | .vsel_reg = S2MPS14_REG_L1CTRL + num - 1, \ | 536 | .vsel_reg = S2MPS14_REG_L1CTRL + num - 1, \ |
537 | .vsel_mask = S2MPS14_LDO_VSEL_MASK, \ | 537 | .vsel_mask = S2MPS14_LDO_VSEL_MASK, \ |
@@ -544,8 +544,8 @@ static struct regulator_ops s2mps14_reg_ops = { | |||
544 | .ops = &s2mps14_reg_ops, \ | 544 | .ops = &s2mps14_reg_ops, \ |
545 | .type = REGULATOR_VOLTAGE, \ | 545 | .type = REGULATOR_VOLTAGE, \ |
546 | .owner = THIS_MODULE, \ | 546 | .owner = THIS_MODULE, \ |
547 | .min_uV = S2MPS14_LDO_MIN_800MV, \ | 547 | .min_uV = MIN_800_MV, \ |
548 | .uV_step = S2MPS14_LDO_STEP_12_5MV, \ | 548 | .uV_step = STEP_12_5_MV, \ |
549 | .n_voltages = S2MPS14_LDO_N_VOLTAGES, \ | 549 | .n_voltages = S2MPS14_LDO_N_VOLTAGES, \ |
550 | .vsel_reg = S2MPS14_REG_L1CTRL + num - 1, \ | 550 | .vsel_reg = S2MPS14_REG_L1CTRL + num - 1, \ |
551 | .vsel_mask = S2MPS14_LDO_VSEL_MASK, \ | 551 | .vsel_mask = S2MPS14_LDO_VSEL_MASK, \ |
@@ -558,8 +558,8 @@ static struct regulator_ops s2mps14_reg_ops = { | |||
558 | .ops = &s2mps14_reg_ops, \ | 558 | .ops = &s2mps14_reg_ops, \ |
559 | .type = REGULATOR_VOLTAGE, \ | 559 | .type = REGULATOR_VOLTAGE, \ |
560 | .owner = THIS_MODULE, \ | 560 | .owner = THIS_MODULE, \ |
561 | .min_uV = S2MPS14_BUCK1235_MIN_600MV, \ | 561 | .min_uV = MIN_600_MV, \ |
562 | .uV_step = S2MPS14_BUCK1235_STEP_6_25MV, \ | 562 | .uV_step = STEP_6_25_MV, \ |
563 | .n_voltages = S2MPS14_BUCK_N_VOLTAGES, \ | 563 | .n_voltages = S2MPS14_BUCK_N_VOLTAGES, \ |
564 | .linear_min_sel = S2MPS14_BUCK1235_START_SEL, \ | 564 | .linear_min_sel = S2MPS14_BUCK1235_START_SEL, \ |
565 | .ramp_delay = S2MPS14_BUCK_RAMP_DELAY, \ | 565 | .ramp_delay = S2MPS14_BUCK_RAMP_DELAY, \ |
@@ -574,8 +574,8 @@ static struct regulator_ops s2mps14_reg_ops = { | |||
574 | .ops = &s2mps14_reg_ops, \ | 574 | .ops = &s2mps14_reg_ops, \ |
575 | .type = REGULATOR_VOLTAGE, \ | 575 | .type = REGULATOR_VOLTAGE, \ |
576 | .owner = THIS_MODULE, \ | 576 | .owner = THIS_MODULE, \ |
577 | .min_uV = S2MPS14_BUCK4_MIN_1400MV, \ | 577 | .min_uV = MIN_1400_MV, \ |
578 | .uV_step = S2MPS14_BUCK4_STEP_12_5MV, \ | 578 | .uV_step = STEP_12_5_MV, \ |
579 | .n_voltages = S2MPS14_BUCK_N_VOLTAGES, \ | 579 | .n_voltages = S2MPS14_BUCK_N_VOLTAGES, \ |
580 | .linear_min_sel = S2MPS14_BUCK4_START_SEL, \ | 580 | .linear_min_sel = S2MPS14_BUCK4_START_SEL, \ |
581 | .ramp_delay = S2MPS14_BUCK_RAMP_DELAY, \ | 581 | .ramp_delay = S2MPS14_BUCK_RAMP_DELAY, \ |
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index b5f73de81aad..1825edacbda7 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
@@ -14,6 +14,27 @@ | |||
14 | #ifndef __LINUX_MFD_SEC_CORE_H | 14 | #ifndef __LINUX_MFD_SEC_CORE_H |
15 | #define __LINUX_MFD_SEC_CORE_H | 15 | #define __LINUX_MFD_SEC_CORE_H |
16 | 16 | ||
17 | /* Macros to represent minimum voltages for LDO/BUCK */ | ||
18 | #define MIN_3000_MV 3000000 | ||
19 | #define MIN_2500_MV 2500000 | ||
20 | #define MIN_2000_MV 2000000 | ||
21 | #define MIN_1800_MV 1800000 | ||
22 | #define MIN_1500_MV 1500000 | ||
23 | #define MIN_1400_MV 1400000 | ||
24 | #define MIN_1000_MV 1000000 | ||
25 | |||
26 | #define MIN_900_MV 900000 | ||
27 | #define MIN_850_MV 850000 | ||
28 | #define MIN_800_MV 800000 | ||
29 | #define MIN_750_MV 750000 | ||
30 | #define MIN_600_MV 600000 | ||
31 | |||
32 | /* Macros to represent steps for LDO/BUCK */ | ||
33 | #define STEP_50_MV 50000 | ||
34 | #define STEP_25_MV 25000 | ||
35 | #define STEP_12_5_MV 12500 | ||
36 | #define STEP_6_25_MV 6250 | ||
37 | |||
17 | enum sec_device_type { | 38 | enum sec_device_type { |
18 | S5M8751X, | 39 | S5M8751X, |
19 | S5M8763X, | 40 | S5M8763X, |
diff --git a/include/linux/mfd/samsung/s2mpa01.h b/include/linux/mfd/samsung/s2mpa01.h index fbc63bc0d6a2..2766108bca2f 100644 --- a/include/linux/mfd/samsung/s2mpa01.h +++ b/include/linux/mfd/samsung/s2mpa01.h | |||
@@ -155,18 +155,6 @@ enum s2mpa01_regulators { | |||
155 | S2MPA01_REGULATOR_MAX, | 155 | S2MPA01_REGULATOR_MAX, |
156 | }; | 156 | }; |
157 | 157 | ||
158 | #define S2MPA01_BUCK_MIN1 600000 | ||
159 | #define S2MPA01_BUCK_MIN2 800000 | ||
160 | #define S2MPA01_BUCK_MIN3 1000000 | ||
161 | #define S2MPA01_BUCK_MIN4 1500000 | ||
162 | #define S2MPA01_LDO_MIN 800000 | ||
163 | |||
164 | #define S2MPA01_BUCK_STEP1 6250 | ||
165 | #define S2MPA01_BUCK_STEP2 12500 | ||
166 | |||
167 | #define S2MPA01_LDO_STEP1 50000 | ||
168 | #define S2MPA01_LDO_STEP2 25000 | ||
169 | |||
170 | #define S2MPA01_LDO_VSEL_MASK 0x3F | 158 | #define S2MPA01_LDO_VSEL_MASK 0x3F |
171 | #define S2MPA01_BUCK_VSEL_MASK 0xFF | 159 | #define S2MPA01_BUCK_VSEL_MASK 0xFF |
172 | #define S2MPA01_ENABLE_MASK (0x03 << S2MPA01_ENABLE_SHIFT) | 160 | #define S2MPA01_ENABLE_MASK (0x03 << S2MPA01_ENABLE_SHIFT) |
diff --git a/include/linux/mfd/samsung/s2mps11.h b/include/linux/mfd/samsung/s2mps11.h index b3ddf98dec37..7981a9d77d3f 100644 --- a/include/linux/mfd/samsung/s2mps11.h +++ b/include/linux/mfd/samsung/s2mps11.h | |||
@@ -171,15 +171,6 @@ enum s2mps11_regulators { | |||
171 | S2MPS11_REGULATOR_MAX, | 171 | S2MPS11_REGULATOR_MAX, |
172 | }; | 172 | }; |
173 | 173 | ||
174 | #define S2MPS11_BUCK_MIN1 600000 | ||
175 | #define S2MPS11_BUCK_MIN2 750000 | ||
176 | #define S2MPS11_BUCK_MIN3 3000000 | ||
177 | #define S2MPS11_LDO_MIN 800000 | ||
178 | #define S2MPS11_BUCK_STEP1 6250 | ||
179 | #define S2MPS11_BUCK_STEP2 12500 | ||
180 | #define S2MPS11_BUCK_STEP3 25000 | ||
181 | #define S2MPS11_LDO_STEP1 50000 | ||
182 | #define S2MPS11_LDO_STEP2 25000 | ||
183 | #define S2MPS11_LDO_VSEL_MASK 0x3F | 174 | #define S2MPS11_LDO_VSEL_MASK 0x3F |
184 | #define S2MPS11_BUCK_VSEL_MASK 0xFF | 175 | #define S2MPS11_BUCK_VSEL_MASK 0xFF |
185 | #define S2MPS11_ENABLE_MASK (0x03 << S2MPS11_ENABLE_SHIFT) | 176 | #define S2MPS11_ENABLE_MASK (0x03 << S2MPS11_ENABLE_SHIFT) |
diff --git a/include/linux/mfd/samsung/s2mps14.h b/include/linux/mfd/samsung/s2mps14.h index 900cd7a04314..c92f4782afb5 100644 --- a/include/linux/mfd/samsung/s2mps14.h +++ b/include/linux/mfd/samsung/s2mps14.h | |||
@@ -123,10 +123,6 @@ enum s2mps14_regulators { | |||
123 | }; | 123 | }; |
124 | 124 | ||
125 | /* Regulator constraints for BUCKx */ | 125 | /* Regulator constraints for BUCKx */ |
126 | #define S2MPS14_BUCK1235_MIN_600MV 600000 | ||
127 | #define S2MPS14_BUCK4_MIN_1400MV 1400000 | ||
128 | #define S2MPS14_BUCK1235_STEP_6_25MV 6250 | ||
129 | #define S2MPS14_BUCK4_STEP_12_5MV 12500 | ||
130 | #define S2MPS14_BUCK1235_START_SEL 0x20 | 126 | #define S2MPS14_BUCK1235_START_SEL 0x20 |
131 | #define S2MPS14_BUCK4_START_SEL 0x40 | 127 | #define S2MPS14_BUCK4_START_SEL 0x40 |
132 | /* | 128 | /* |
@@ -136,12 +132,6 @@ enum s2mps14_regulators { | |||
136 | */ | 132 | */ |
137 | #define S2MPS14_BUCK_RAMP_DELAY 12500 | 133 | #define S2MPS14_BUCK_RAMP_DELAY 12500 |
138 | 134 | ||
139 | /* Regulator constraints for different types of LDOx */ | ||
140 | #define S2MPS14_LDO_MIN_800MV 800000 | ||
141 | #define S2MPS14_LDO_MIN_1800MV 1800000 | ||
142 | #define S2MPS14_LDO_STEP_12_5MV 12500 | ||
143 | #define S2MPS14_LDO_STEP_25MV 25000 | ||
144 | |||
145 | #define S2MPS14_LDO_VSEL_MASK 0x3F | 135 | #define S2MPS14_LDO_VSEL_MASK 0x3F |
146 | #define S2MPS14_BUCK_VSEL_MASK 0xFF | 136 | #define S2MPS14_BUCK_VSEL_MASK 0xFF |
147 | #define S2MPS14_ENABLE_MASK (0x03 << S2MPS14_ENABLE_SHIFT) | 137 | #define S2MPS14_ENABLE_MASK (0x03 << S2MPS14_ENABLE_SHIFT) |