From 320569618c678afc0f628741cfb0d35b457d4dca Mon Sep 17 00:00:00 2001 From: Youngmin Nam Date: Mon, 6 Feb 2017 12:27:13 +0900 Subject: [PATCH] [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 --- drivers/i2c/busses/i2c-exynos5.c | 2 ++ drivers/i2c/busses/i2c-exynos5.h | 1 + 2 files changed, 3 insertions(+) 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 */ -- 2.20.1