From patchwork Mon Jan 20 10:13:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13944982 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2066.outbound.protection.outlook.com [40.107.94.66]) (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 432311B4F0B; Mon, 20 Jan 2025 10:13:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737368032; cv=fail; b=O7rPWfFUPnuxQKsNLdEV8F09U0E4IQOUE03LHNcfMvr6du9w39P7MtH/GptMAAq3zFehQLU+7lskH1RKisrqxHlPExF8q0djPJGBoX0Jx0wbFghgyYXeTiGUynMmWn0nQogd6I1UpwwSFtaSagI1aa/cowbp/El1CAKg4bof2Pk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737368032; c=relaxed/simple; bh=zM2zh0uJM8rvEjfNegpihH264PTE4XAZU4iWLdI353Q=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Iq+j/ZvvP0pDuODf8MlAzManUO3rPEbvH16wX3tRr8sgHkXpYDoFuDOXqZ0QjWdhTPJseWjJikczBSTdddDrQ8y0b07GKdT0s8UdZVRt5/36zt/zrTzjGS86TsvMqHb8lgWit5UI+DYYnsPavRnFKt6VUi9WVIfEmh6KfoaT9LA= 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=dxQPjYFc; arc=fail smtp.client-ip=40.107.94.66 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="dxQPjYFc" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JTx/xGxcVCgfjBGn9vhZ2RIWO8wraUGh4HjYtgi3cCeQ1tIGW+X0VpsA7AFO4eHNFXyb2ScfAyaCKVYm7eVssa3+GR4i2ftHhzT38e8Up5cpz2XY6bbZuIGtMYDkhh+cADwbpGK68VGIC16vOk/Zb7TcS40pj3YDtVYChzek4aN3i9fGLql2f/plzOIWxxIsISLsh7+k1tPs474SX9J4mqYaiS6JhOlSr1IlkZGVdFVa/H6EkFy3KP4doTXs/iIviMTeX7WO84+8LuekooGX/QYCPIR+78CvrSJvrfr4wkJx7NV3Us2N4OL14MA6JZ3mhunUtSkYDXBYjAyZ40kRQQ== 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=PLKy6dTIYcrqkT+OBBEkmVnloXRQGYN6kFXV5rWHDsk=; b=MZMOp2F4lwHNFrIkRM/Gjgzi3EJ4k098MiQeZrq48gpbyhY4bILXjqPZLLszdZ20mT9aELAoPlvs70k8echG58oiXW4EGzfhx1Rq+/mCenvAr4PKGYHZpaDOdJPUU6zcskUua+h02RhHV2g5VbKZjz5B+XgjpCKYjFbOmBa5ETb/mLI7Vw/weTXe7zloGp58gSQalcI7tUPkXMqJbMGU40DczFqbiJ4YbaGv22hNlMaC3QY7mTKLDqGk7JzdcKfabwwgxw/lpQDh5L8v9/ZBh0h7APt9BF7YSjdnbAk2N75H9AaJ60rnkm+AMgzgvfVzwWwGjkPaEYVtfNxWSMvjAg== 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=PLKy6dTIYcrqkT+OBBEkmVnloXRQGYN6kFXV5rWHDsk=; b=dxQPjYFcf447Dfa/TE4oRmMwcdacMqcZO+tRpevsYoZMbcmQ6S49W9X56Ql5TYzCv4TBav44khP7uNNMUqhpzpxaaxHpul+A97gPS9M0Y/J9Ocm40gxKuAakotQ6weFSzunVa2GAybCNzktlATus2g3yKxFOO7e2FClXF1lSsfA= Received: from BN9P220CA0003.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:13e::8) by CY8PR12MB7314.namprd12.prod.outlook.com (2603:10b6:930:52::19) 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:47 +0000 Received: from BN3PEPF0000B370.namprd21.prod.outlook.com (2603:10b6:408:13e:cafe::c8) by BN9P220CA0003.outlook.office365.com (2603:10b6:408:13e::8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.20 via Frontend Transport; Mon, 20 Jan 2025 10:13:47 +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:47 +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:43 -0600 From: Vijendar Mukunda To: CC: , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH V2 1/7] soundwire: amd: change the soundwire wake enable/disable sequence Date: Mon, 20 Jan 2025 15:43:23 +0530 Message-ID: <20250120101329.3713017-2-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_|CY8PR12MB7314:EE_ X-MS-Office365-Filtering-Correlation-Id: 071c4d08-1074-4322-69a3-08dd393b20fe 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: 4gDGKzVhScHZxXDMakkPKNVoQtE6ep8Ix4p200Ym1WrdR1T6zxQ3wRDmD+JblB2D7Q7Z11hONcxJATCc7Osr1WWN7KtqY15QxWbqvi7RGDxYtgM6eOq7JIkMZeb5n82tucyusj6w0RW5/KIodS91P5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qkImMQgm+pZ2R60V8xXyY0itYOhLpKiMkVmUAKMfsnbGli4TOsIY2YzXShHwie3ETSgmJESEveqgkBy8/Yxz3Dalzwkm5d8vlWZzP0tApOKQMXBdskiAM9s7UoS10TvHfqUcmuclnfK9+TJCvMyety8ZYKcz928i0lAO7xZhbiUWBc6lld2M5aDYSVrrAtwDJ6dJ08TYM2CJ0HbapgHnjxzoJdfYotsUaMTGFa61FzBIZyUPTJjTn0shZsQ97OkoPB6NeidVX0/It6jCtq71M7+/k05AKoPTri+l+k8vJ0h/PPH9ywFY= 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:47.5095 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 071c4d08-1074-4322-69a3-08dd393b20fe 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: CY8PR12MB7314 During runtime suspend scenario, SoundWire wake should be enabled and during system level suspend scenario SoundWire wake should be disabled. Implement the SoundWire wake enable/disable sequence as per design flow for SoundWire poweroff mode. Signed-off-by: Vijendar Mukunda --- drivers/soundwire/amd_manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c index 71b3cf2df89d..187006e68ad6 100644 --- a/drivers/soundwire/amd_manager.c +++ b/drivers/soundwire/amd_manager.c @@ -1139,6 +1139,7 @@ static int __maybe_unused amd_suspend(struct device *dev) amd_sdw_wake_enable(amd_manager, false); return amd_sdw_clock_stop(amd_manager); } else if (amd_manager->power_mode_mask & AMD_SDW_POWER_OFF_MODE) { + amd_sdw_wake_enable(amd_manager, false); /* * As per hardware programming sequence on AMD platforms, * clock stop should be invoked first before powering-off @@ -1166,6 +1167,7 @@ static int __maybe_unused amd_suspend_runtime(struct device *dev) amd_sdw_wake_enable(amd_manager, true); return amd_sdw_clock_stop(amd_manager); } else if (amd_manager->power_mode_mask & AMD_SDW_POWER_OFF_MODE) { + amd_sdw_wake_enable(amd_manager, true); ret = amd_sdw_clock_stop(amd_manager); if (ret) return ret;