From patchwork Wed Dec 25 07:23:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13920641 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2082.outbound.protection.outlook.com [40.107.92.82]) (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 84E8914D2B7; Wed, 25 Dec 2024 07:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735111471; cv=fail; b=pkq9lEozhP7PRkRAHm2SsOYYkFjr0yWgzfpu81CQAHM5FOVTVyyw0/UGXQn8G0jSrhG/bZBWmq61l8eDhiVjgdFDMiZjApK+i4lD7pfVydJh7HP3kGRuOPt5KsZzoTO5ivRwYr3yY2LlnD04RgTR0U4d7Kd0mioPZ5MyYQEjRyU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735111471; c=relaxed/simple; bh=zM2zh0uJM8rvEjfNegpihH264PTE4XAZU4iWLdI353Q=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ul7JCRlP8lG70F9Sr/gf+S16iyOQLmDrL4GEwO7gJl80pl4HzkYxgqeCAHOpUsZHZtPq6O/AQ6gMC7XMj4GqIjMz8SlXpsNC2fZBcPwQziiCW1kaiCAzJS/spZrMD87hyyxhHoOuEFyi/W+nTNVuW+wqhTbMyzWloyrGMq1s1WY= 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=toPpxVRJ; arc=fail smtp.client-ip=40.107.92.82 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="toPpxVRJ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Es7ZrUx3LTD4lN8yOFweTdttOan16hboed2fnECajcO6rqHV/2DjVBmreA0g4qWQh8DfQtITjOGy7Y15Umh7v91wbMSbzOo6Coq1mGzSXJJ9tvTm7EH5+1OJxfa0TUy3tZLvOgt2NSVfsJS6VDY20/rEzQM//3gY/7uBtqdLI4dD1trEfCLJp/U9VyL2NiRmRFUvYdnS2jynUvxC/4HgdZivRdxDRa0MG9UUQr8J0JFSUI5bS5d5oxwuXdyhQ0jDKprQSYcs2Lb7e5o+Oy4ngez7BT1d0/aRSC9GdHqiKzDFzaRHd5ZnROgqCKmbuM8jMuFr7qiCfP8h+SK9noGWAA== 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=OUbXwsn8vovcShrE2uNFFJF8kP3roV7g85ByyNWjnzSzZ3/VZRceMYYyHtleJf4c81O0/FKSaoKDTB7+Eg4SEzVe0wp2CTg3dib26Jv7k+vq0o6DTEZV+ZdjFOEl5m8lorD4Z3tVkBOTeIwW25WIBdqp2Cqcrjwg0hKAHa3drno2vJF3YL34Mlx3rr7gMi+QSuDMCX8L6z6CPcDq9uzBYWvukrkc3MuLa6QLVPLnuVUAT6kErNe7iDYahzmxXbrG78f+Yea0GXbBamOm2eezF4uyoBaJXnWTeRTraJrZefwvX+zEoKeXDXEckp/18z4FiUjal65zZAhpH4RJ2PBb3A== 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=toPpxVRJYm7oG5x+xouzZRGUIPfhd2LJaGoYnaqRNjfwqc/uwONP42vzGPBvV0fAMhqW0vHP6L5vYRTrbq911xtvaFU/pfBFd9tjXdIHmM4lpJicFe1tgINTIHBRN8shv0tumpEiCD9x6lj8dPEu+6w8EYef0EbXwL1zrFN+/AI= Received: from SJ0PR13CA0017.namprd13.prod.outlook.com (2603:10b6:a03:2c0::22) by IA1PR12MB6236.namprd12.prod.outlook.com (2603:10b6:208:3e4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Wed, 25 Dec 2024 07:24:21 +0000 Received: from MWH0EPF000A6733.namprd04.prod.outlook.com (2603:10b6:a03:2c0:cafe::65) by SJ0PR13CA0017.outlook.office365.com (2603:10b6:a03:2c0::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8293.10 via Frontend Transport; Wed, 25 Dec 2024 07:24:20 +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 MWH0EPF000A6733.mail.protection.outlook.com (10.167.249.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8293.12 via Frontend Transport; Wed, 25 Dec 2024 07:24:20 +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; Wed, 25 Dec 2024 01:24:16 -0600 From: Vijendar Mukunda To: CC: , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 1/5] soundwire: amd: change the soundwire wake enable/disable sequence Date: Wed, 25 Dec 2024 12:53:56 +0530 Message-ID: <20241225072400.912445-2-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241225072400.912445-1-Vijendar.Mukunda@amd.com> References: <20241225072400.912445-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: MWH0EPF000A6733:EE_|IA1PR12MB6236:EE_ X-MS-Office365-Filtering-Correlation-Id: 4106f380-dd2c-4a1e-ae22-08dd24b5260d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: l+khqjruzU965Ev66kkuGdo0iCwtdEGxCf+MNjRP8ZLujXNv0Yw3gaTmZif0K+HK4DUv1eQw1SaRmawAdAFqHqLzKyWGgzC+z0vsit+039dzy7B19dV1vZ/UjdtZXZ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gJPdk5VBgc6ZQxs0uBGZhnNAWgtaLB+Ci7DjqOt+DfQEx4In8MvjccC03b0Re30ZpIHnADsOwTv3lHv1B5BipZ52icf1/cTug1tkD7CiN3tSeozR2WIKF+RMRm5A1Sm6x8iE4SVzE1LgkKGCIZ+4YEDjwcWd8tCZHa6HFSOIakQGqymgBQgkRM+zbhCnsl1Ub984HKglFHlDp0JfOZNRqvfuDDfKQAWQXWYLTtK3XOCQ8q3ycCojMCg8/g0X1OiXi/spLsa4aF1CErAH4KlhMSgqeX4WNwioQqxpJYrSL49ChqAu++qo= 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)(376014)(1800799024)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2024 07:24:20.0870 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4106f380-dd2c-4a1e-ae22-08dd24b5260d 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: MWH0EPF000A6733.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6236 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;