diff options
author | Christian Hemp <c.hemp@phytec.de> | 2013-09-03 10:10:10 +0200 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2013-11-07 12:19:37 -0500 |
commit | 5748721b79a5c56b40a489422e954c1b09936ddc (patch) | |
tree | 41f2a4d04210441d917bf29298df89baf6da67f2 | |
parent | 5d4ace7119b2382b17f9eaff8fc89a22aafd6aee (diff) |
drivers:regulator da9063 reset volates on reboot
The PMIC DA9063 has no reset. We need to reset the voltages
themselves on reboot.
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
-rw-r--r-- | drivers/regulator/da9063-regulator.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c index 3eba4488c4fd..2683f41bd968 100644 --- a/drivers/regulator/da9063-regulator.c +++ b/drivers/regulator/da9063-regulator.c @@ -1007,6 +1007,27 @@ static int __devexit da9063_regulator_remove(struct platform_device *pdev) return 0; } +static void da9063_shutdown(struct platform_device *pdev) +{ + struct da9063 *da9063 = dev_get_drvdata(pdev->dev.parent); + int ret; + + /* VDDARM_IN 1.38V */ + ret = da9063_reg_write(da9063,DA9063_REG_VBCORE1_A,0x6C); + if (ret) + goto err; + + /* VDDSOC_IN 1.38V */ + ret = da9063_reg_write(da9063,DA9063_REG_VBCORE2_A,0x6C); + if (ret) + goto err; + + return; +err: + printk(KERN_ERR "%s Could not reset voltages!!!!\n", __func__); + +} + static struct platform_driver da9063_regulator_driver = { .driver = { .name = DA9063_DRVNAME_REGULATORS, @@ -1014,6 +1035,7 @@ static struct platform_driver da9063_regulator_driver = { }, .probe = da9063_regulator_probe, .remove = __devexit_p(da9063_regulator_remove), + .shutdown = da9063_shutdown, }; static int __init da9063_regulator_init(void) |