Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44b7a960 authored by Ramprasad Katkam's avatar Ramprasad Katkam Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarRamprasad Katkam <katkam@codeaurora.org>
parent b4c7c680
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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;
}