From patchwork Tue Jul 5 12:08:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 12906507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 413A7CCA485 for ; Tue, 5 Jul 2022 12:09:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234390AbiGEMJ0 (ORCPT ); Tue, 5 Jul 2022 08:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235289AbiGEMIv (ORCPT ); Tue, 5 Jul 2022 08:08:51 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CA9E10B8; Tue, 5 Jul 2022 05:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1657022930; x=1688558930; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=YRsVqKY1FP8GB58R3OD493uBwRt0/4HsIz06TH1IPTg=; b=yDR7LzRkvFDpNmBlhdPqLj+249WDf+BKk8msN1AZpWK5hDXBfFkuckcT tfPXt64DAafMTCc8D+gi1KKAzTRnWwXkN0WXvazs5HH/aReGqFM5aIiA0 lSQ83wgOyO6wqVzheuCWJbhv7YllwqdSuEh2Vfw4JJS7HEaMfeh5Qyeyc A=; Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-01.qualcomm.com with ESMTP; 05 Jul 2022 05:08:50 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg03-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2022 05:08:49 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 5 Jul 2022 05:08:49 -0700 Received: from blr-ubuntu-87.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 5 Jul 2022 05:08:45 -0700 From: Sibi Sankar To: CC: , , , , , , , Siddharth Gupta , Sibi Sankar Subject: [V3 3/7] remoteproc: qcom: pas: Mark devices as wakeup capable Date: Tue, 5 Jul 2022 17:38:16 +0530 Message-ID: <1657022900-2049-4-git-send-email-quic_sibis@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1657022900-2049-1-git-send-email-quic_sibis@quicinc.com> References: <1657022900-2049-1-git-send-email-quic_sibis@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org From: Siddharth Gupta 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 Signed-off-by: Sibi Sankar --- drivers/remoteproc/qcom_q6v5_pas.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index df13cfc3aeb8..43dde151120f 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -486,7 +486,9 @@ static int adsp_probe(struct platform_device *pdev) adsp->decrypt_shutdown = desc->decrypt_shutdown; 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)