From: Youngmin Nam Date: Mon, 6 Feb 2017 03:27:13 +0000 (+0900) Subject: [COMMON] i2c: exynos5: add runtime pm callback status flag X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=320569618c678afc0f628741cfb0d35b457d4dca;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] i2c: exynos5: add runtime pm callback status flag Adds runtime pm suspend / resume callback status flag to check whether runtime pm callback was called or not. Change-Id: I603d33f730b8b778fbfeb17e827f602416f66524 Signed-off-by: Youngmin Nam --- diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c index 65e6e781c7cf..7e297cea3e42 100644 --- a/drivers/i2c/busses/i2c-exynos5.c +++ b/drivers/i2c/busses/i2c-exynos5.c @@ -1129,6 +1129,7 @@ static int exynos5_i2c_runtime_suspend(struct device *dev) clk_disable(i2c->clk); exynos_update_ip_idle_status(i2c->idle_ip_index, 1); + i2c->runtime_resumed = 0; return 0; } @@ -1141,6 +1142,7 @@ static int exynos5_i2c_runtime_resume(struct device *dev) exynos_update_ip_idle_status(i2c->idle_ip_index, 0); ret = clk_enable(i2c->clk); + i2c->runtime_resumed = 1; if (ret) { exynos_update_ip_idle_status(i2c->idle_ip_index, 1); return ret; diff --git a/drivers/i2c/busses/i2c-exynos5.h b/drivers/i2c/busses/i2c-exynos5.h index cf299da1838f..be94eef105a0 100644 --- a/drivers/i2c/busses/i2c-exynos5.h +++ b/drivers/i2c/busses/i2c-exynos5.h @@ -55,5 +55,6 @@ struct exynos5_i2c { int idle_ip_index; int reset_before_trans; + unsigned int runtime_resumed; }; #endif /*__I2C_EXYNOS5_H */