soc: swr-mstr: Hold suspend during hw wakeup interrupt

Hold system suspend when hardware wakeup interrupt is
received to resume soundwire master.

Change-Id: I99a58aa7d28cfa514d72bacc8c6fc6e95fbe038a
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
This commit is contained in:
Ramprasad Katkam 2018-12-20 15:08:44 +05:30 committed by Gerrit - the friendly Code Review server
parent b4c7c680ef
commit 44b7a9602b

View file

@ -1430,12 +1430,17 @@ static irqreturn_t swrm_wakeup_interrupt(int irq, void *dev)
return ret;
}
mutex_unlock(&swrm->devlock);
if (unlikely(swrm_lock_sleep(swrm) == false)) {
dev_err(swrm->dev, "%s Failed to hold suspend\n", __func__);
goto exit;
}
if (swrm->wake_irq > 0)
disable_irq_nosync(swrm->wake_irq);
pm_runtime_get_sync(swrm->dev);
pm_runtime_mark_last_busy(swrm->dev);
pm_runtime_put_autosuspend(swrm->dev);
swrm_unlock_sleep(swrm);
exit:
return ret;
}