diff options
author | Alex Gonzalez <alex.gonzalez@digi.com> | 2012-02-09 15:17:21 +0100 |
---|---|---|
committer | Alex Gonzalez <alex.gonzalez@digi.com> | 2012-02-09 15:17:21 +0100 |
commit | b601d63f95edc0e607482ccfc128b49f56232a33 (patch) | |
tree | 9c4d86081fdd22653d117be176ff47fcd93f46bb | |
parent | 50ff0f6ec254eb44859934ea3ca515b6268d155d (diff) |
da9052: Perform a last PMIC access on poweroff.
Even though it should not be needed as the write_many on the same function
also "parks" the PMIC, meaning it does a last access to a safe register
to avoid a PMIC I2C bug, some modules need this last access to work.
Also, change the parking access to the STATUSA safe register, as the one
we had does not seem to be safe in all cases. That is the same register
used in WCE.
Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
-rw-r--r-- | drivers/mfd/da9052-core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c index 7f0873068dc9..d4acdf1790d6 100644 --- a/drivers/mfd/da9052-core.c +++ b/drivers/mfd/da9052-core.c @@ -575,7 +575,7 @@ int da9053_last_access(void) BUG_ON( !mutex_is_locked(&da9052_data->ssc_lock) ); // Dummy read - msg_test.addr = DA9052_GPIO0809_REG; + msg_test.addr = DA9052_STATUSA_REG; msg_test.data = 0; ret = da9052_data->read(da9052_data, &msg_test); if( ret < 0 ){ @@ -618,6 +618,8 @@ void da9053_power_off(void) if (ret != 0) printk(KERN_WARNING "DA9052: %s failure\n", __func__); + da9053_last_access(); + // No more accesses while(1); #else |