From e3da441a1ef0255896a1eeca844449c26a76422a Mon Sep 17 00:00:00 2001 From: Gao Pan <b54642@freescale.com> Date: Tue, 25 Aug 2015 14:00:32 +0800 Subject: [PATCH] MLK-11403: I2C: imx: restore pin setting for i2c restore pin setting for i2c in suspend/resume Signed-off-by: Gao Pan <gaopan@freescale.com> (cherry picked from commit 8aed73af218f25e0677b8980b3706246dd68790d) Signed-off-by: Robin Gong <yibin.gong@nxp.com> Conflicts: drivers/i2c/busses/i2c-imx.c Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com> --- drivers/i2c/busses/i2c-imx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 6e2a84943fe060..ab09deb5adb485 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1235,7 +1235,20 @@ static int i2c_imx_runtime_resume(struct device *dev) return ret; } +static int i2c_imx_suspend(struct device *dev) +{ + pinctrl_pm_select_sleep_state(dev); + return 0; +} + +static int i2c_imx_resume(struct device *dev) +{ + pinctrl_pm_select_default_state(dev); + return 0; +} + static const struct dev_pm_ops i2c_imx_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(i2c_imx_suspend, i2c_imx_resume) SET_RUNTIME_PM_OPS(i2c_imx_runtime_suspend, i2c_imx_runtime_resume, NULL) }; -- GitLab