Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b19c1959 authored by Vincent Palatin's avatar Vincent Palatin Committed by Wolfram Sang
Browse files

i2c: s3c2410: resume the I2C controller earlier



When the wake-up is triggered by the PMIC RTC, the RTC driver is trying
to read the PMIC interrupt status over I2C and fails because the I2C
controller is not resumed yet.
Let's resume the I2C controller earlier in the _noirq phase
(as other hardwares are doing), so we can properly get the wake-up
condition.

[tomasz: Also fixes certain issues on Exynos4-based boards.]

Signed-off-by: default avatarVincent Palatin <vpalatin@chromium.org>
Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
Reviewed-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: default avatarTomasz Figa <t.figa@samsung.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 0f6ba0d1
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1267,7 +1267,7 @@ static int s3c24xx_i2c_suspend_noirq(struct device *dev)
	return 0;
}

static int s3c24xx_i2c_resume(struct device *dev)
static int s3c24xx_i2c_resume_noirq(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
@@ -1285,7 +1285,11 @@ static int s3c24xx_i2c_resume(struct device *dev)
static const struct dev_pm_ops s3c24xx_i2c_dev_pm_ops = {
#ifdef CONFIG_PM_SLEEP
	.suspend_noirq = s3c24xx_i2c_suspend_noirq,
	.resume = s3c24xx_i2c_resume,
	.resume_noirq = s3c24xx_i2c_resume_noirq,
	.freeze_noirq = s3c24xx_i2c_suspend_noirq,
	.thaw_noirq = s3c24xx_i2c_resume_noirq,
	.poweroff_noirq = s3c24xx_i2c_suspend_noirq,
	.restore_noirq = s3c24xx_i2c_resume_noirq,
#endif
};