summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx5/pm_da9053.c
diff options
context:
space:
mode:
authorAlex Gonzalez <alex.gonzalez@digi.com>2012-01-11 10:10:10 +0100
committerAlex Gonzalez <alex.gonzalez@digi.com>2012-01-11 16:09:14 +0100
commitf19491efdd049238a985cbcee0691c751dac1726 (patch)
tree2097d09b223772624b4b61c25e33e4bb087bf180 /arch/arm/mach-mx5/pm_da9053.c
parentc4020f37cbe491fd241b47084e2688574949f14d (diff)
ccxmx53: Workaround for suspend halt.
Strangely, if we don't enable and disable the I2C clock before suspend the target halts while suspending. This needs to be investigated although this commit is a workaround that allows to continue working. Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'arch/arm/mach-mx5/pm_da9053.c')
-rw-r--r--arch/arm/mach-mx5/pm_da9053.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/pm_da9053.c b/arch/arm/mach-mx5/pm_da9053.c
index 4a07b1680813..259ab8dad098 100644
--- a/arch/arm/mach-mx5/pm_da9053.c
+++ b/arch/arm/mach-mx5/pm_da9053.c
@@ -383,6 +383,20 @@ int da9053_suspend_cmd_sw(void)
return 0;
}
+int da9053_ccxmx53_suspend_workaround(void)
+{
+ struct clk *i2c_clk;
+
+ i2c_clk = clk_get(NULL, "i2c_clk");
+ if (IS_ERR(i2c_clk)) {
+ pr_err("unable to get i2c clk\n");
+ return PTR_ERR(i2c_clk);
+ }
+ clk_enable(i2c_clk);
+ clk_disable(i2c_clk);
+ clk_put(i2c_clk);
+ return 0;
+}
int da9053_suspend_cmd_hw(void)
{