Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4616580pxb; Tue, 5 Oct 2021 06:56:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWyWdNaZsf+50u5re7suvjwgEZuxiFae+N529KQO+PKyYjiDKYY+y7gzQLm1X7xHLMGJV5 X-Received: by 2002:a63:1656:: with SMTP id 22mr15868200pgw.20.1633442160233; Tue, 05 Oct 2021 06:56:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633442160; cv=none; d=google.com; s=arc-20160816; b=0lu5nk/5x1y0n2NBY6uc2/bV/2wUwomceE1tNxwptNXE6iEaiUlBnCAGAPd+ucoZCF mpRrDRgs2POIr9lsG7JPW948BvG3JnZBEBKIlCv7Rt10kHA/ZaJxnBCkHsh/dqcyXrld t6Nf2+vVQTm7nOoZVnBGmEE2UghGEZbZlbX1y27udNqMzCwv5FTV2ijw+MIK+HOtF58p TNv3JQ/dm/wgaF0tyZN989EY3K/By+rdckmmqoThMhhyKyeimqJQWyM2vM40ElO9qJi3 laUkea5ObLebPpA/7UK4hbSzYh8THZHTFcGRYLGjJlPSEFRjedWKCyEfxhM+zKmCa5VR 0Jzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=mdwWPM1XLRuW+Whh1aVvvz3JKBIwnA/NcEXlgNqh7BU=; b=Ovh4mtzYs9mTVQtlnLIbzMTSbtp9Ucjlzw3CcDfVpV+y25ZtdduNof544uX6y2jBZh D2m8M0sqAPKFJgWY5/Cj55hFCB+8FeodpkEjNQqYr4O9XP/4kij3DvqUK7EU9GBOr9uq +okk9dergyvGlmjn2VsT24OOFBCPTkuGFJWfYpsVx/EVqKbr5RHULO0Ygy3kiPMSI5GE 5DJRnZOD+NJQvOfcjcIHXWAtyWnj7ETXoRDYZXaRLS8EXjFsA29e+8R3IMUwAhllcdkK 0pNu0l0W/R/Wo6DipD4+hMDSPlr+2YKqdmqyIn3hnV0a1gbliPaZo6d4ZNDwdFwyVf5p 7hHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=VRaON9OT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si6778595plg.3.2021.10.05.06.55.46; Tue, 05 Oct 2021 06:56:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=VRaON9OT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235735AbhJEN4s (ORCPT + 99 others); Tue, 5 Oct 2021 09:56:48 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:45615 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235792AbhJEN4B (ORCPT ); Tue, 5 Oct 2021 09:56:01 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1633442051; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=mdwWPM1XLRuW+Whh1aVvvz3JKBIwnA/NcEXlgNqh7BU=; b=VRaON9OTlsAZpeqeyl2AWGJSSXrtVNTftc+2Vw8qTzYU3R1qRZCQRHck4aWwkP1fctBbf4xK /HXhN91FjKYDrfT+5CfsvVSm2ba6Rd242MHYdeiZF3JoqqRaB17xlNqtFuBZL1gz+XHUESVc ChWOhZKUsM49TJVyO/3gRI6Ez7I= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 615c58ff03355859c8a3b3df (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 05 Oct 2021 13:54:07 GMT Sender: srivasam=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 808ECC00911; Tue, 5 Oct 2021 13:54:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from hu-srivasam-hyd.qualcomm.com (unknown [202.46.22.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: srivasam) by smtp.codeaurora.org (Postfix) with ESMTPSA id ACDE2C18EA1; Tue, 5 Oct 2021 13:53:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org ACDE2C18EA1 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Srinivasa Rao Mandadapu To: agross@kernel.org, bjorn.andersson@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, plai@codeaurora.org, bgoswami@codeaurora.org, perex@perex.cz, tiwai@suse.com, srinivas.kandagatla@linaro.org, rohitkr@codeaurora.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, swboyd@chromium.org, judyhsiao@chromium.org Cc: Srinivasa Rao Mandadapu , Venkata Prasad Potturu Subject: [PATCH v2 8/9] ASoc: qcom: lpass: Add suspend and resume for sc7280 platform Date: Tue, 5 Oct 2021 19:22:53 +0530 Message-Id: <1633441974-15353-9-git-send-email-srivasam@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1633441974-15353-1-git-send-email-srivasam@codeaurora.org> References: <1633441974-15353-1-git-send-email-srivasam@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adds device suspend and resume callbacks for sc7280 platform driver ops. Signed-off-by: Venkata Prasad Potturu Signed-off-by: Srinivasa Rao Mandadapu --- sound/soc/qcom/lpass-cpu.c | 22 ++++++++++++++++++++++ sound/soc/qcom/lpass-sc7280.c | 2 ++ sound/soc/qcom/lpass.h | 2 ++ 3 files changed, 26 insertions(+) diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c index 6664d03..7494fdd 100644 --- a/sound/soc/qcom/lpass-cpu.c +++ b/sound/soc/qcom/lpass-cpu.c @@ -1247,6 +1247,28 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev) } EXPORT_SYMBOL_GPL(asoc_qcom_lpass_cpu_platform_probe); +int asoc_qcom_lpass_cpu_platform_resume(struct platform_device *pdev) +{ + struct lpass_data *drvdata = platform_get_drvdata(pdev); + + if (drvdata->variant->init) + drvdata->variant->init(pdev); + + return 0; +} +EXPORT_SYMBOL_GPL(asoc_qcom_lpass_cpu_platform_resume); + +int asoc_qcom_lpass_cpu_platform_suspend(struct platform_device *pdev, pm_message_t state) +{ + struct lpass_data *drvdata = platform_get_drvdata(pdev); + + if (drvdata->variant->exit) + drvdata->variant->exit(pdev); + + return 0; +} +EXPORT_SYMBOL_GPL(asoc_qcom_lpass_cpu_platform_suspend); + int asoc_qcom_lpass_cpu_platform_remove(struct platform_device *pdev) { struct lpass_data *drvdata = platform_get_drvdata(pdev); diff --git a/sound/soc/qcom/lpass-sc7280.c b/sound/soc/qcom/lpass-sc7280.c index 983a61b..6fdf111 100644 --- a/sound/soc/qcom/lpass-sc7280.c +++ b/sound/soc/qcom/lpass-sc7280.c @@ -591,6 +591,8 @@ static struct platform_driver sc7280_lpass_cpu_platform_driver = { .probe = asoc_qcom_lpass_cpu_platform_probe, .remove = asoc_qcom_lpass_cpu_platform_remove, .shutdown = asoc_qcom_lpass_cpu_platform_shutdown, + .resume = asoc_qcom_lpass_cpu_platform_resume, + .suspend = asoc_qcom_lpass_cpu_platform_suspend, }; module_platform_driver(sc7280_lpass_cpu_platform_driver); diff --git a/sound/soc/qcom/lpass.h b/sound/soc/qcom/lpass.h index e0ea698..53d9b5d 100644 --- a/sound/soc/qcom/lpass.h +++ b/sound/soc/qcom/lpass.h @@ -419,5 +419,7 @@ extern const struct snd_soc_dai_ops asoc_qcom_lpass_cpu_dai_ops; int lpass_cpu_pcm_new(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); extern const struct snd_soc_dai_ops asoc_qcom_lpass_wcd_dai_ops; +int asoc_qcom_lpass_cpu_platform_suspend(struct platform_device *pdev, pm_message_t state); +int asoc_qcom_lpass_cpu_platform_resume(struct platform_device *pdev); #endif /* __LPASS_H__ */ -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.