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
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)
};