Blob Blame History Raw
From dc86c129b4fb5c387b0678cfb6081ef29809cc41 Mon Sep 17 00:00:00 2001
From: Siddharth Gupta <sidgup@codeaurora.org>
Date: Tue, 5 Jul 2022 17:38:16 +0530
Subject: [PATCH] remoteproc: qcom: pas: Mark devices as wakeup capable
Git-commit: dc86c129b4fb5c387b0678cfb6081ef29809cc41
Patch-mainline: v6.0-rc1
References: git-fixes

device_wakeup_enable() on its own is not capable of setting
device as wakeup capable, it needs to be used in conjunction
with device_set_wakeup_capable(). The device_init_wakeup()
calls both these functions on the device passed.

Fixes: a781e5aa5911 ("remoteproc: core: Prevent system suspend during remoteproc recovery")
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1657022900-2049-4-git-send-email-quic_sibis@quicinc.com
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/remoteproc/qcom_q6v5_pas.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -442,7 +442,9 @@ static int adsp_probe(struct platform_de
 	adsp->info_name = desc->sysmon_name;
 	platform_set_drvdata(pdev, adsp);
 
-	device_wakeup_enable(adsp->dev);
+	ret = device_init_wakeup(adsp->dev, true);
+	if (ret)
+		goto free_rproc;
 
 	ret = adsp_alloc_memory_region(adsp);
 	if (ret)