summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlex Gonzalez <alex.gonzalez@digi.com>2012-01-12 18:42:43 +0100
committerAlex Gonzalez <alex.gonzalez@digi.com>2012-01-16 12:53:12 +0100
commit945ab9c33ffbffa35461c07ece997bfb544ea1dd (patch)
tree882b28c229961e1da6ce383c0b5e9e1cba1a4001 /drivers
parent3792121568b43a20644005876e2886f5ea48f2be (diff)
da9053: Finish shoutdown with an I2C read.
A reported Dialog bug that will make the PMIC not power up again on some cases is worked around in this way. Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/da9052-core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c
index 6ef039ea6aa2..4babd287e9c5 100644
--- a/drivers/mfd/da9052-core.c
+++ b/drivers/mfd/da9052-core.c
@@ -559,6 +559,7 @@ void da9053_power_off(void)
{
#if defined(CONFIG_MODULE_CCXMX53)
struct da9052_ssc_msg msgs[5];
+ struct da9052_ssc_msg msg_test;
int ret;
if (!da9052_data)
@@ -587,6 +588,17 @@ void da9053_power_off(void)
if (ret != 0)
printk(KERN_WARNING "DA9052: %s failure\n", __func__);
+ // Dummy read
+ msg_test.addr = DA9052_GPIO0809_REG;
+ msg_test.data = 0;
+ da9052_data->read(da9052_data, &msg_test);
+
+ // Do not unlock to disallow any other I2C access.
+
+ // A Dialog reported PMIC I2C bug needs to finish with an I2C read
+ // or the PMIC won't power up again in some cases.
+ while(1);
+
da9052_unlock(da9052_data);
#else
struct da9052_ssc_msg ssc_msg;