diff options
author | Gao Pan <b54642@freescale.com> | 2015-08-25 14:00:32 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 1140476e789233210070700784db9d6bd7d32104 (patch) | |
tree | 7f9526c3e9d8f6e89d217121cbb4707e173910e5 /drivers/i2c | |
parent | ca241e4257fa5d6eb824df401604d895b55bd67c (diff) |
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
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-imx.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 450add46910b..fab088d8ba12 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1226,7 +1226,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) }; |