diff options
author | Christian Hemp <c.hemp@phytec.de> | 2013-09-03 10:10:10 +0200 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2014-05-14 14:13:28 -0400 |
commit | c8a1512bce82709d2b13faad86f9297e825e2548 (patch) | |
tree | 73719f89f71dd12849a93c554c374392933a5d01 /drivers | |
parent | 746755c4d0951601f614d0fcda269804dbae9b89 (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>
Diffstat (limited to 'drivers')
-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 5ee8e695b734..a1aee2d1cd20 100644 --- a/drivers/regulator/da9063-regulator.c +++ b/drivers/regulator/da9063-regulator.c @@ -1106,6 +1106,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, @@ -1113,6 +1134,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) |