From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
To: <vkoul@kernel.org>
Cc: <alsa-devel@alsa-project.org>, <yung-chuan.liao@linux.intel.com>,
<pierre-louis.bossart@linux.dev>, <sanyog.r.kale@intel.com>,
<Basavaraj.Hiregoudar@amd.com>, <Sunil-kumar.Dommati@amd.com>,
<venkataprasad.potturu@amd.com>, <Mario.Limonciello@amd.com>,
<linux-sound@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Vijendar Mukunda" <Vijendar.Mukunda@amd.com>
Subject: [PATCH V2 3/7] soundwire: amd: add conditional for check for device resume
Date: Mon, 20 Jan 2025 15:43:25 +0530 [thread overview]
Message-ID: <20250120101329.3713017-4-Vijendar.Mukunda@amd.com> (raw)
In-Reply-To: <20250120101329.3713017-1-Vijendar.Mukunda@amd.com>
Add a conditional check to resume SoundWire manager device, when the
SoundWire manager instance is in the suspended state.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
drivers/soundwire/amd_manager.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c
index 60be5805715e..6831b3729db5 100644
--- a/drivers/soundwire/amd_manager.c
+++ b/drivers/soundwire/amd_manager.c
@@ -850,7 +850,10 @@ static void amd_sdw_update_slave_status(u32 status_change_0to7, u32 status_chang
static void amd_sdw_process_wake_event(struct amd_sdw_manager *amd_manager)
{
dev_dbg(amd_manager->dev, "SoundWire Wake event reported\n");
- pm_request_resume(amd_manager->dev);
+ if (pm_runtime_suspended(amd_manager->dev)) {
+ dev_dbg(amd_manager->dev, "Device is in suspend state\n");
+ pm_request_resume(amd_manager->dev);
+ }
writel(0x00, amd_manager->acp_mmio + ACP_SW_WAKE_EN(amd_manager->instance));
writel(0x00, amd_manager->mmio + ACP_SW_STATE_CHANGE_STATUS_8TO11);
}
--
2.34.1
next prev parent reply other threads:[~2025-01-20 10:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 10:13 [PATCH V2 0/7] soundwire: amd: code improvements and new platform support Vijendar Mukunda
2025-01-20 10:13 ` [PATCH V2 1/7] soundwire: amd: change the soundwire wake enable/disable sequence Vijendar Mukunda
2025-01-20 10:13 ` [PATCH V2 2/7] soundwire: amd: add debug log for soundwire wake event Vijendar Mukunda
2025-01-20 10:13 ` Vijendar Mukunda [this message]
2025-01-20 15:30 ` [PATCH V2 3/7] soundwire: amd: add conditional for check for device resume Pierre-Louis Bossart
2025-01-21 5:26 ` Mukunda,Vijendar
2025-01-20 10:13 ` [PATCH V2 4/7] soundwire: amd: add support for ACP7.0 & ACP7.1 platforms Vijendar Mukunda
2025-01-20 10:13 ` [PATCH V2 5/7] soundwire: amd: set device power state during suspend/resume sequence Vijendar Mukunda
2025-01-20 10:13 ` [PATCH V2 6/7] soundwire: amd: set ACP_PME_EN during runtime suspend sequence Vijendar Mukunda
2025-01-20 10:13 ` [PATCH V2 7/7] soundwire: amd: add soundwire host wake interrupt enable/disable sequence Vijendar Mukunda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250120101329.3713017-4-Vijendar.Mukunda@amd.com \
--to=vijendar.mukunda@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=pierre-louis.bossart@linux.dev \
--cc=sanyog.r.kale@intel.com \
--cc=venkataprasad.potturu@amd.com \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®