|
@@ -879,19 +879,19 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)
|
|
#ifdef CONFIG_PM_SLEEP
|
|
#ifdef CONFIG_PM_SLEEP
|
|
static int nmk_i2c_suspend_late(struct device *dev)
|
|
static int nmk_i2c_suspend_late(struct device *dev)
|
|
{
|
|
{
|
|
- pinctrl_pm_select_sleep_state(dev);
|
|
|
|
|
|
+ int ret;
|
|
|
|
|
|
|
|
+ ret = pm_runtime_force_suspend(dev);
|
|
|
|
+ if (ret)
|
|
|
|
+ return ret;
|
|
|
|
+
|
|
|
|
+ pinctrl_pm_select_sleep_state(dev);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
static int nmk_i2c_resume_early(struct device *dev)
|
|
static int nmk_i2c_resume_early(struct device *dev)
|
|
{
|
|
{
|
|
- /* First go to the default state */
|
|
|
|
- pinctrl_pm_select_default_state(dev);
|
|
|
|
- /* Then let's idle the pins until the next transfer happens */
|
|
|
|
- pinctrl_pm_select_idle_state(dev);
|
|
|
|
-
|
|
|
|
- return 0;
|
|
|
|
|
|
+ return pm_runtime_force_resume(dev);
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|