diff options
| -rw-r--r-- | drivers/regulator/ab3100.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c index 5da127bbe1f2..b349db4504b7 100644 --- a/drivers/regulator/ab3100.c +++ b/drivers/regulator/ab3100.c | |||
| @@ -241,24 +241,12 @@ static int ab3100_disable_regulator(struct regulator_dev *reg) | |||
| 241 | * LDO D is a special regulator. When it is disabled, the entire | 241 | * LDO D is a special regulator. When it is disabled, the entire |
| 242 | * system is shut down. So this is handled specially. | 242 | * system is shut down. So this is handled specially. |
| 243 | */ | 243 | */ |
| 244 | pr_info("Called ab3100_disable_regulator\n"); | ||
| 244 | if (abreg->regreg == AB3100_LDO_D) { | 245 | if (abreg->regreg == AB3100_LDO_D) { |
| 245 | int i; | ||
| 246 | |||
| 247 | dev_info(®->dev, "disabling LDO D - shut down system\n"); | 246 | dev_info(®->dev, "disabling LDO D - shut down system\n"); |
| 248 | /* | ||
| 249 | * Set regulators to default values, ignore any errors, | ||
| 250 | * we're going DOWN | ||
| 251 | */ | ||
| 252 | for (i = 0; i < ARRAY_SIZE(ab3100_reg_init_order); i++) { | ||
| 253 | (void) ab3100_set_register_interruptible(abreg->ab3100, | ||
| 254 | ab3100_reg_init_order[i], | ||
| 255 | abreg->plfdata->reg_initvals[i]); | ||
| 256 | } | ||
| 257 | |||
| 258 | /* Setting LDO D to 0x00 cuts the power to the SoC */ | 247 | /* Setting LDO D to 0x00 cuts the power to the SoC */ |
| 259 | return ab3100_set_register_interruptible(abreg->ab3100, | 248 | return ab3100_set_register_interruptible(abreg->ab3100, |
| 260 | AB3100_LDO_D, 0x00U); | 249 | AB3100_LDO_D, 0x00U); |
| 261 | |||
| 262 | } | 250 | } |
| 263 | 251 | ||
| 264 | /* | 252 | /* |
| @@ -607,13 +595,6 @@ static int __init ab3100_regulators_probe(struct platform_device *pdev) | |||
| 607 | } | 595 | } |
| 608 | } | 596 | } |
| 609 | 597 | ||
| 610 | if (err) { | ||
| 611 | dev_err(&pdev->dev, | ||
| 612 | "LDO D regulator initialization failed with error %d\n", | ||
| 613 | err); | ||
| 614 | return err; | ||
| 615 | } | ||
| 616 | |||
| 617 | /* Register the regulators */ | 598 | /* Register the regulators */ |
| 618 | for (i = 0; i < AB3100_NUM_REGULATORS; i++) { | 599 | for (i = 0; i < AB3100_NUM_REGULATORS; i++) { |
| 619 | struct ab3100_regulator *reg = &ab3100_regulators[i]; | 600 | struct ab3100_regulator *reg = &ab3100_regulators[i]; |
| @@ -688,7 +669,7 @@ static __init int ab3100_regulators_init(void) | |||
| 688 | 669 | ||
| 689 | static __exit void ab3100_regulators_exit(void) | 670 | static __exit void ab3100_regulators_exit(void) |
| 690 | { | 671 | { |
| 691 | platform_driver_register(&ab3100_regulators_driver); | 672 | platform_driver_unregister(&ab3100_regulators_driver); |
| 692 | } | 673 | } |
| 693 | 674 | ||
| 694 | subsys_initcall(ab3100_regulators_init); | 675 | subsys_initcall(ab3100_regulators_init); |
