Message ID | 20241228-wake_irq-v1-6-09cfca77cd47@nxp.com |
---|---|
State | New |
Headers | show
Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2059.outbound.protection.outlook.com [40.107.22.59]) (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 F338578F54; Sat, 28 Dec 2024 01:15:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735348553; cv=fail; b=TbH/d4phBFSxQaGbJVWavxoeKRzlLaaDc1rSdVvT8aGK6v9C8wbP+o7lmwCFz4riLEO+nMR33RL40DRTJ+Kk9MxKF0GytWr2s3L70lU5mXse4TL1akH1KkrZ0qQhcRbPUgXVRRg47qWcn+2ctuXiVU4Ad7dVLIBQXmOzz7tIhx8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735348553; c=relaxed/simple; bh=JiSAV7Q4NNZurUbBcswCV+h/Lz5/1lhowxKOZ/KNAmw=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=FnHOMEVD4smTTu2Ol8haIvw1TLKOreGa2WQ2XHND3UeXizrKvkqQDZOSNqSjBYndGKGkjQIqlUbEkKQbkGtYSakQmYc+Ii2n+iCgrbRZRiA0iXkOea5ThgiwE+VNaA+oPHdPjXfhBnuZiup4mS4MpjfnstcrGRYrJNqCKeQqyCc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=fEXGWJJn; arc=fail smtp.client-ip=40.107.22.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="fEXGWJJn" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=olPMx0tE6Ed7jYvTX0V9egv8YIGEugwqDV0iITMiFZezT1oYT7/8Zz9jvFnsKfpsIRpZkyuO5miIklunKno1OLDxzzjzZOh4izeWWdt+VX3j2+MVWjjoGjAoKoHMmatYQKZ2R9ZldqBUEUHpm4Dd//NfqPzxEDcGscrocV12fQ6xNrLUETFM+NorUMIDPRNFPuTSempe/5O83GLSZVr29MZchLGstIjW2TzW4eFF6LrRdrnbZzQw+3lsI5gvS4+NYOfd2Wbqp9mXjV/gvNS9dUX1NyfEThs0BHhTIskq2O4v04Q4HlihmMBSqRng5ERqIKX9vVz8lcRq7Hfoo0sciQ== 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=tvRxcJQkTcUxL+UY0CT1LkbMh/5QCJDI8WvxLfFze6k=; b=NdZO4KK6Cnnw4xzoOm5Q6YfK8kZvbawsHzox7CCkum8NdHeT5jCpWpl/7NKdb+jsIivo9XdnDfeUaPW17O4TvNzHkUzVBVGkyKwpr64uMtTlQtmioB14+oS+3TuboxVhzDAAu1kiL/b5z1Xhj0+MnTvQPQjRJ3EUKgTxDfrdYnR8TMl6X6s1CEsMVmGvM2WLX8uq3Gl1W+pGG7bH7FC0Gm0byZhkhLa/NbP8itsVQCuMWsls5vvVdN1nURqvdUpbhCtE8XY6iB9/XHn/MzrDW1yTSrgycb8MkblB7tz6CJ6GsjqI6jjh6XNvYTG/d8mfN4MaR15W2ZUJxYM3qPoZEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tvRxcJQkTcUxL+UY0CT1LkbMh/5QCJDI8WvxLfFze6k=; b=fEXGWJJn5P4XNa0sBDtpmP4Mai2h0uOC9b66ZC+Q1ZeRfeaoDlkDtiSVfIVM8mypCgYZxFYnjrDE3JHAfzevvUtMwxGWia5baxtDcRiQJBGPv1YEb2FQaBDEFrY3uoolISyGPba2FYhDFwGmYRyDq/IsnOptfN/MSsC0hD3MKteJm7whbZJwpWo/1SC2lduAFN6Nzwn0kIdZkqXU9KYRmLpCVnNlfoneMIcwST8iRRcb3jNfNZBaDrgCC1gNikHMcmGPqGUKN+NkArdXPK2UT8rGBZIPPlponZXr7V0Qz8OKvQxvGlh9NuqhylK7Tgvn11bpbcWnIWUp68rd5BK1Eg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by AM0PR04MB7140.eurprd04.prod.outlook.com (2603:10a6:208:192::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8293.15; Sat, 28 Dec 2024 01:15:44 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%5]) with mapi id 15.20.8293.000; Sat, 28 Dec 2024 01:15:44 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Sat, 28 Dec 2024 09:14:42 +0800 Subject: [PATCH 06/12] rtc: stm32: Use resource managed API to simplify code Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241228-wake_irq-v1-6-09cfca77cd47@nxp.com> References: <20241228-wake_irq-v1-0-09cfca77cd47@nxp.com> In-Reply-To: <20241228-wake_irq-v1-0-09cfca77cd47@nxp.com> To: "Rafael J. Wysocki" <rafael@kernel.org>, Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Linus Walleij <linus.walleij@linaro.org>, Conor Dooley <conor.dooley@microchip.com>, Daire McNamara <daire.mcnamara@microchip.com> Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-rtc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-riscv@lists.infradead.org, Peng Fan <peng.fan@nxp.com> X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1735348488; l=1529; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=3L5kSry1bFWI+vzXqFXX2mukiWSnq2LH9PLt8NvYjoY=; b=B3T68jTJq1CEoyhrigYxE+0meJO14wNaqx5QKL+LOdMajmlDmTiJD1lez46bwXprMXVKEvpGi mJWb21WGEHODrDQuLK0flOSEZPL8Qlp3R2EjTV1CpPGtdR9Qqxe+1vD X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR02CA0099.apcprd02.prod.outlook.com (2603:1096:4:92::15) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: <linux-pm.vger.kernel.org> List-Subscribe: <mailto:linux-pm+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-pm+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|AM0PR04MB7140:EE_ X-MS-Office365-Filtering-Correlation-Id: c3ef80ce-50f7-4fb6-f7e3-08dd26dd271a X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|7416014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?P9XXyQn08p5anJARNCBGIVRI2oIWLj5?= =?utf-8?q?cqbJ+stz1BvjF0fbx6TIR0k/gBQ0VG1W/yvQzwt2O2OvT0SqpwxQihMg+U2kXM/MR?= =?utf-8?q?vGmR6FFCg4dCBuUk5+/a9Pk6txTb7QUHOnI/rOQj3OtrlTCnQkpIkkNG/i1x/i2/U?= =?utf-8?q?kqhXVzXg2pAoUuPX8vwf803WClEuE7NHioTKpTUxwjFqR0BbFxdMqm0M5N6U43hEv?= =?utf-8?q?4za0qB4Q0L0Isdv3NEwKhEUk0EnAkoQ1s9EBLcJG2ItO8FcaXj/LTfZTTqgxl1UlK?= =?utf-8?q?1U346cZoKdMkBrEjSRR4CZundMcOXRyc8sKn3UO7In4Qja2zQ7pgxblfcY1RcPolI?= =?utf-8?q?cdRwWs/1ZFFIlbAqRbDw2sEsZJMk2ZYH3OlQlU6MI8CxNMruXNvnxZ2BZ6/YhSusj?= =?utf-8?q?YtgEjUPABAa0v/VZf1yGUwgMPLl9r8TdwYzbFJE9q/e99glhZF1/AVyXnZN92Jsya?= =?utf-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g2X/HSzR76Zm1bvLPibFtD7nVDetkC/IHcONL4dVkyA/utVYuMn+abuKvUnZ?= =?utf-8?q?SsBeCEsSrdl1+oOfqSEReT2t+3QIzDy8Q=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(7416014)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?mz5C2CpHh2mYv4ojW+wzeOX+mvC8?= =?utf-8?q?7UnIAu1asGB59eXZjhGBpzKppd0J2qvS38an0ztxh3eJQwitM2y7hx6gsH9U6azRr?= =?utf-8?q?blVfNjaMvIZpZYNxMephq+3/eHI1e3N4XLoxAkTEKxIBnMHAshPYFvIlPOTBKTrxe?= =?utf-8?q?t88v+KI9FabL6afhCVSZo7dVbyuDRH3FOdUf00uCD0D+nZ+Eh4OwsL6wWeiUgIE5h?= =?utf-8?q?CbuA7FaILeecQPjVbRYVwx/+VNOyi1Ua32cllZkHp1g3LWozIfoPZ6EDAKs3etNl/?= =?utf-8?q?Zq9N6urIOEzm/rXYKf9tRWM0gkLf/hvYMczWEHA5PG48AsMw7CJg2bGW1VWtn7lwl?= =?utf-8?q?OjwayOFOXvlv8c0gKAYBgsJFh0EdCuNMMmk9qLRKU1li/zWAAOmQYF0Dx6Q9IycU+?= =?utf-8?q?B7HjbMHVEf+OxnhrMNu1ySUuL1sKF5kvP6rmhWN0Cf9dK1QaSfvNPfL3OzQskfW54?= =?utf-8?q?LiTI1Fa7Eo0u43V12W1zSW1eCByVRwPEFlBbcR35pibCGku097VdmuUIZcmmjekEW?= =?utf-8?q?RuOm649wax855S0itjCXS/DJREbpA3qXmbZ7haBqLRfx9m/tq7mJxnsQcLEcSoxUP?= =?utf-8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Xnen/PhQYTV5b/0URp7yKjLdQ++3qKg4mAPmAhEhiN8Di4O6yEifLJVbdDObGHOnt?= =?utf-8?q?0pqQzRAsfaXz?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3ef80ce-50f7-4fb6-f7e3-08dd26dd271a X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2024 01:15:44.3329 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EASzHYX0Y9Nate1j5d6Lk4cnEVHCD/u8gP/xBHIzZk1pkFSOr8l8qigS2Jf+nvLIykTkPagclVuGWw56ni4Vcw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7140 |
Series |
pm: Introduce devm_pm_set_wake_irq
|
expand
|
diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c index 9f1a019ec8afa57245c6d40d378ec50fdcd64deb..183017b0d33d10481f94891de24cf2eee95893f5 100644 --- a/drivers/rtc/rtc-stm32.c +++ b/drivers/rtc/rtc-stm32.c @@ -1151,11 +1151,11 @@ static int stm32_rtc_probe(struct platform_device *pdev) goto err; } - ret = device_init_wakeup(&pdev->dev, true); + ret = devm_device_init_wakeup(&pdev->dev); if (ret) goto err; - ret = dev_pm_set_wake_irq(&pdev->dev, rtc->irq_alarm); + ret = devm_pm_set_wake_irq(&pdev->dev, rtc->irq_alarm); if (ret) goto err; @@ -1216,9 +1216,6 @@ static int stm32_rtc_probe(struct platform_device *pdev) if (rtc->data->need_dbp) regmap_update_bits(rtc->dbp, rtc->dbp_reg, rtc->dbp_mask, 0); - dev_pm_clear_wake_irq(&pdev->dev); - device_init_wakeup(&pdev->dev, false); - return ret; } @@ -1245,9 +1242,6 @@ static void stm32_rtc_remove(struct platform_device *pdev) /* Enable backup domain write protection if needed */ if (rtc->data->need_dbp) regmap_update_bits(rtc->dbp, rtc->dbp_reg, rtc->dbp_mask, 0); - - dev_pm_clear_wake_irq(&pdev->dev); - device_init_wakeup(&pdev->dev, false); } static int stm32_rtc_suspend(struct device *dev)