From patchwork Mon Jan 20 10:13:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13944984 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2073.outbound.protection.outlook.com [40.107.243.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 657881B4F0B; Mon, 20 Jan 2025 10:13:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.73 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737368038; cv=fail; b=CUddwSAkAP4mRQjOV8TCEdbse4AZ5HQCfM5mMnLNIXhyi838FMPQJ8VHrkUO4ooPG1m9TUKoz79qN7NhBm24IOWZ6L1zQI3WYAmTu3x1pKMbhupgphP4RP+8rQw4TS9zd5cT8eV07ne+jRH1zLV/gysBfBVjU1sKZUg1VwA4jzg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737368038; c=relaxed/simple; bh=1vVmNfq8H+MF8cFUabtR1dg1mENZPacQbwpf4RcYRqs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PIyxt3JXsJyFGUPo8oC+Dee+m9IsMLqKGS+lLmmGeKrLihTF1F1NtfybLF00EPQY/CKiq1v1MyFWQS0DiFohk2p5ATzfW8TUEll0oNRw99MKrA3+FUhLFM/vvWZakfmeZu4enZ338tQQq6Z0b22ICuosPGBHo11MwmjCsqc5nes= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=0uXLXmM5; arc=fail smtp.client-ip=40.107.243.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="0uXLXmM5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lHrLjy0tHSmpjfB8ETz8HygbFVhhyQXrnZtDJB6QeIY21fTMKG4B7ahuQZQVhMtTkme4KEHFBEyt5rpJsh23VZbQFejLLt04QP2ukzQ8NCNZFuxkM4yOutDuaS5UEmkezWXJYw5r7ZbyhbsY4nLhrtN5ixPidnEZfQvk8184E90UkIBh2jyOlNOwPOxKzK+cPEIltSFPqJ3mtlAjpWeEGj3ITqJNIbLMEG3W/5ERJdDEkj5p0I46G/dTSlCzTXnSKbNw4ITSkfJ8AWM2p0DWyYjGqcXx8OQft7TtxB813SSdrwQuebzp+bpleZblQpFYq2Q2Is3QFiQE8kNfA0KM/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=41PUfFjatuc7da+InPcOcLM/ud0y8M9s1/dqpC1dL3A=; b=kkmXtHnbdNa0pMnBjwkNLh5a7QXxBfdJ+VClhTcTJ4zL4lTEhjMBRj1t4UuxI9Dx0mLEvQTC9wBv0RPT2JrJrdEz30c2AJufl5wqPsMHg0nDD7L3egDY/YJDI1UWW/3YE2WqRf4LnxeI6I7d2nLejile7uezX9Bh+uORCTcEPnz/Jo1RibZ6ur1C2KC3k46jE/hIgVK0P1en5+K0G/5+fUNGrZzo1Y4sU4bCQSAxj5CHAAg1iMKKS3kgRhj+r+oLSy5qHtkjLT5HOyTJSGHSXmsxTwtq5zxfcl2zN4g7sYNCx9aJyCvAKX1M+vfxMWF7g98bn9kf+oUkUx4NhB0iew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=41PUfFjatuc7da+InPcOcLM/ud0y8M9s1/dqpC1dL3A=; b=0uXLXmM5Q1WX6XffhbhMXioSUxH8EyGumvKHPVc6rVaa3eiLvFSljqz/rZ1qImjbTup4WIjEQdeaurIphGZO4oAdDr9TpTG64pBdVpFuSA8FuP+m0PdBjaGXCiXX+Vhux6ONigs76NddPlGi1TJx+CFcAqeNMtfrxX20YPtOxp0= Received: from BN9P220CA0008.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:13e::13) by DS0PR12MB6631.namprd12.prod.outlook.com (2603:10b6:8:d1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.21; Mon, 20 Jan 2025 10:13:54 +0000 Received: from BN3PEPF0000B370.namprd21.prod.outlook.com (2603:10b6:408:13e:cafe::13) by BN9P220CA0008.outlook.office365.com (2603:10b6:408:13e::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.21 via Frontend Transport; Mon, 20 Jan 2025 10:13:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN3PEPF0000B370.mail.protection.outlook.com (10.167.243.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8398.0 via Frontend Transport; Mon, 20 Jan 2025 10:13:54 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 20 Jan 2025 04:13:50 -0600 From: Vijendar Mukunda To: CC: , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH V2 3/7] soundwire: amd: add conditional for check for device resume Date: Mon, 20 Jan 2025 15:43:25 +0530 Message-ID: <20250120101329.3713017-4-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250120101329.3713017-1-Vijendar.Mukunda@amd.com> References: <20250120101329.3713017-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B370:EE_|DS0PR12MB6631:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e31bd00-7aab-4ca1-284c-08dd393b2509 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: Amf6RDISE3lq7IA2b4gJcn95I1dXG8Z3p7nfgWWcyfeLfQlHCKdjonz5nnEK/4NBKf5K1nz0Y484zybyUVoLCgkCc8nekGmkLNO9kOUN6OVP0aABoc7tU9R3+mWeppXhlaTDwk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qB3toNph/W35p0vFaSJNvBThPUS2Rbe6KOwuoc0ERNui2edc4vXP0ryyFG+yr6wPPVdaGlaIw7bo3eiwSpo9W4Eti0EPJTFlHOTRhxLnalW+x3nEIETvhwzj0kCxxPYcweixQculSu0B+XuRhrB2//+NC1cEDJdUyMfjyGwLwmddmy7nqhOMofyEoKomfC2WXeUgPNycRG1+jeYSn4YF8hPp3fbYZfYNKzwkpjHBFNsOo1pQjRlYwnmuSRhepnUya+/VkB1n0CSJWj8XaKiMvuvD1zU= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2025 10:13:54.3064 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2e31bd00-7aab-4ca1-284c-08dd393b2509 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN3PEPF0000B370.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6631 Add a conditional check to resume SoundWire manager device, when the SoundWire manager instance is in the suspended state. Signed-off-by: Vijendar Mukunda --- 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); }