Message ID | 20241228-wake_irq-v1-12-09cfca77cd47@nxp.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E7E3E7718B for <linux-riscv@archiver.kernel.org>; Sat, 28 Dec 2024 01:31:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=oXkiccgX1mXtIZuG+nIrpUNIHNsrddvwDKMyk+V2Ed4=; b=q2O8oavJ+3KtZJB44JFU9M1gMw qVbFoXFiiyVToGPhpY7YWTl9oaMAeXEZ89q4K/8r5l+G/U2408ucRW2W6AuFkbJWTBim95/9im/F5 ZXyRA0dVpMLI2AswLzDBBUQonOG8gYYs2pS7WT+eAZkt5aozUw/ZpgOn7JIf3ZLIXguBJa8qflkpj CBBAFv/FIJekmObXKkeahdV0ympGBeboaY33qUkJC7uT+CNAJHX+x6Oi3/98cSWqGlvkH1Mn9o+4Z lIVtoEeNwmdxLvkr4ezAA3U7jreM/n2Z+lLHDq3oapWOr/KJbvVY7Y1YYBFqLMmlqzLMioWh5aaV9 yAeYyVlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tRLfb-00000001DPU-19aE; Sat, 28 Dec 2024 01:31:11 +0000 Received: from mail-vi1eur05on20627.outbound.protection.outlook.com ([2a01:111:f403:2613::627] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tRLRH-00000001BL0-0gXH; Sat, 28 Dec 2024 01:16:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=icYCs2ZqekGd+37C3M70wSGEHi/HMxj7N47k06vMhgqNf3RLegI28GAMzILY36lrkRwRwHGOVm1xYxRMWhfi1RK7sOrE7auzvXlviX08nkVSiSJGzW6Epc3Qi8hQAJZ9Ww+l9jyg3t6fgxh3yesIl/f5l/PvT9LJ+H/ramAsd2PFqZzNFYNWMvYvY/7EwlvNPNjqAgr5sJTLNTLwGZ7y2jPITWGV7olA+RWg94m42NUxfpw3jED6+Y7PI814YBt+tujJKWs0dIzvXyjZQpInzbOmBoQZR4fWIhcM3i8pJ4TD3rc4u58SADmRVezauXlDzNPSp+c8OE1oTzefoMgrIg== 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=SwP/Z30a82zAkoSfiP4uYDFRLsAZY6IC2N1v3ZTRi6g=; b=stm+2Gd5h+s0NxVf6Bc4aYom35PzbsbFxb9TBJT68vkguGCNVjpus5+XpcW4XaPfN5e8lLCupYocEaJvGAX0NklDzEfDiCQZNP+36nu1eoK6qvLjDJyzovcEmO37kkI04kpLhVDgKtKd9ylq8Ax6A+xn7a8OkdrywB/cxpUCuEb8zrl35Qx9lkqlbPW7rPHFx1toFCQjuYhPyNwM/zfqXkepZ/driT17ssDEFuigPsjZ78V9U4S9FZYEg8M7oy4tpoKbgEyT0Gc6hjDQHLwANiDKNQaeaAaZYnaCMzWN/7quyvIZybN1JDj2ppJ/Qyz0HgP3dssRiqnlHxwUmJHEcw== 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=SwP/Z30a82zAkoSfiP4uYDFRLsAZY6IC2N1v3ZTRi6g=; b=KqEwJo7Yq93VGM33epmbmAouJdXGLda3Q6Sdt0z+hOHEeDX+ctzRAmeVQpWaHQH47WW+mCBLXpEfEZz6uroSsY6C50yRHReawvsjUyZcoxgS8+Gy0MtA2OE7ae9AQ4xjD6cTbntH/DbnsSHHhOxOHFqkzbr7lx/xNWoFNxjmMa8DQ68FjlneXWBefp9I+DaynJqlHiInE/Jq9YcWjmgVOtqFO79vJMbe7Y5r2isr5DLLd4Xse3q0UcxxaMPTRTIuofwp0mDHyF6jlq+E1HQA4ZirwNKcjj9dy/1mdDKnmdYN/gXx8pug2qDPOMmJhmWVvb0zcRgYEmoBHigKzjDTCQ== 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:16:15 +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:16:15 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Sat, 28 Dec 2024 09:14:48 +0800 Subject: [PATCH 12/12] rtc: pl031: Use resource managed API to simplify code Message-Id: <20241228-wake_irq-v1-12-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=1402; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=4BMfK6zSQF5qiBDmk7U70xZY4AnsGczgpoZ/YOkhF9U=; b=pUt4U8/DoSsmmA+YwURboasmkRyxZrbgsS72GSgchx8AvlavLmQcbowWHUf60rQ6f87O4Xu1H zZb3y56hfH4CqUdatq1mfS0i5ZTetyxBOQORYjJzuxq6HS9oK+jnXae 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) 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: 6455ec2c-8348-423e-b75b-08dd26dd39d5 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?JLihIqFZ9vMluogPwyag3rSvN+LqC1V?= =?utf-8?q?0E71g5sxJWbp50oArzM9NHDltGyzAzrrlTMwx8wVB2PjOy6beYzjnlJET89tvc0uF?= =?utf-8?q?7MNT4hBrNFVGM4FdFav0aZR8iRjNmw4HuIYSE5xsF6D6e9u66s9hx7LHPJRFThRYa?= =?utf-8?q?Wvj7H2ZAtgU55EXNqx6/5WFXGZMwd4izKruBkxmS365B9/uAiXEAVUR4shm4Exp9t?= =?utf-8?q?8nI16I/3Qk5/BGvqR/9L+qdcPoTxVOpPXHz/pQJpE9Mwfoz+1bbTDGsP6mKiXUOX8?= =?utf-8?q?hhXNxRDJX0zIqZyogzafh/KjMfz75UEctlTbgziOaJ54peCw/hb/SM3jC1JROc/Md?= =?utf-8?q?/Gq5AeazTSaDzpO1FgvaHuO/T4VBAUA7zlI2Qgq6aIEJ6bnBvS7myi9NahR/PwzQV?= =?utf-8?q?pVCTvhYbe1Q+pB94z8/7dKNkLKbR5aQC4n+QJayfqf9DR23mmIMxbCe+hWcXdSzYb?= =?utf-8?q?wwuZm9UjPCStfREHDdP9uDpbje5hBD0SKanSPnZOw2SEUhutTZo94XNpleoYOJGfa?= =?utf-8?q?asv0iG9GO20rjoWvonGf4JGnuT5hpcc5mZNlh8/RQwlrIlmtC0ZeBTfYG1X5nhA4M?= =?utf-8?q?iEt7o7AKtvazKrKgsLNiGYIB6ZQFXzLES8snSMXf6e635/O5zc5lRrydj9wPf8YT1?= =?utf-8?q?6NeubL2/OdHVJKCqH+D/NYc8JINKnKk1vepESFjT/vo30JjT2ODY3wHMSKU8SXhHa?= =?utf-8?q?jrNwaaCxewtkth2IoMXVreYrylt1DiugL4776QZ7877bp9EQOuDjyrCG2MZjjCmZc?= =?utf-8?q?RZEKgLqrZdme1OS/ZBCdtbIG///qU3RganvE0sKfziegOvw7DQ5TB5sFOvfZAFPLv?= =?utf-8?q?zAp5nJt7gU84/YNWFFqZ9ugF3axPNtUsDDilCup58VIWmd7e1Fvz0nlReZvQCH4je?= =?utf-8?q?q2pdjapy5oDc/7uZammFByoGw4NsfG8zzqAKAY1/hmzIeO2kQ9+WcpUtLJvYvk67Q?= =?utf-8?q?JHTxEi2Z6pfVmaje25YIjGqNAmvieWgVDVydbyLe9oZ8NEzJ5CbIvelaqYsv6txLN?= =?utf-8?q?MTTVcdXNBXzROVLP48kN3HNNDf15N5OeB9GCz0Uf9BnwrR9WocWzepaRwcFq5QyT2?= =?utf-8?q?qCGEB8CS3mFxL0bShrkhyj/1iR/2g/EQmyri+XFotY++/Yudk7UxcxFhy17NCgmpj?= =?utf-8?q?i60O9pD5xJydZfU4N0odOAiWsG6uzDKZl9smBkAeLlp4EDJwxo0N8/QUYFOiQv2oD?= =?utf-8?q?ykOGPHfANE2g5NqpysQ2EQI7GGaIjm8DRj+Md0HxgGfxuzb9zCquVs/jg1gytjnTD?= =?utf-8?q?DwagrOWxtM8/W8eZjiSEJzyuw6xMOLA1NrDAM2HMfTFuqHXs/2LsTtFly0BnaQgLV?= =?utf-8?q?TW5Lwy5a4YvMHU6j5iLt1uFMjLH0zhlis1ip/KVobNI8ftQjLOwJPtbq2DnmFyWoa?= =?utf-8?q?A9WyUG0l66sWgkHfCxqz1Wco4PjOm5eqQ=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?6C6oRtZKKArb3Orv2dKTbdGxlhyM?= =?utf-8?q?kBLeESysWgevdH7cF4Nsm3W0QUuTtiarfT4ZiVYJhRsHVG4+X9jN5au6KR2eQfRWk?= =?utf-8?q?GuLRf6N7wpBKdQrXemr9O9TvrE8w3m4koBP82OaAKMHWNkuSWtlvY90FJGlOCN+w8?= =?utf-8?q?k/dj+2Vq+qYfEsMeHQu+ngsrsqAKYW1P+8FAP3gbkwylvcJw+hKer/LpZPxIAt/sV?= =?utf-8?q?Xm1U4VCbo01ojMphgniMiGdbnzPrHput3jijhIKs2IahOQmGs/AU0pcPbHaMvY7nt?= =?utf-8?q?IcLOLvkVYMeCMLhyJbMkpmvybGvVhIns5RsQiyHnw9Mf1ruJmV3AMory+YDmUFq3D?= =?utf-8?q?Dq8xuZIhN74HZ3Knni5u7nrmS5Gn9V/XiXlaz9ABXT+taqViIWTyDAAA/e3IdjU7Z?= =?utf-8?q?ptJXhTmMeqaRIXVmGeBzymsij2wmQ7U3cl1PAW1bI4L16JIQjbLL3xkFwrISM2+TL?= =?utf-8?q?S2fFY08BjQ/LNOM7QejIH2rXTrH/p5t0NJoaYxQj4AJ2SWp3NJ50+zI3I7LeXNQ6a?= =?utf-8?q?48Cc8mqyIcHlRjD/JASgV3UKgXxEGI0b1PSYsqlwIda8z0wH/V05l+E+Yej8rF29A?= =?utf-8?q?jNDeinbL7vu+A1voZwr/P0djM4nE/DtYspZbMX18K8ARYJw+XTnuhVeARbOIo26QJ?= =?utf-8?q?C7dowlVOoLw85mjLzysobsg+C4oOu9VoNY2liIznhjA9RRuc+Vnajr31i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-Id: 6455ec2c-8348-423e-b75b-08dd26dd39d5 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:16:15.7255 (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: KFUTPpyMWHKSNY6jE6x5gXIMv7hUjizTHKJjCWoGhzxl+RBGvoDIzRWrkNYCt++ZS1gV4fMvqstQmEUt+7Zb+Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7140 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241227_171623_212982_39A219CD X-CRM114-Status: GOOD ( 10.23 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-riscv.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-riscv>, <mailto:linux-riscv-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-riscv/> List-Post: <mailto:linux-riscv@lists.infradead.org> List-Help: <mailto:linux-riscv-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-riscv>, <mailto:linux-riscv-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" <linux-riscv-bounces@lists.infradead.org> Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org |
Series |
pm: Introduce devm_pm_set_wake_irq
|
expand
|
Context | Check | Description |
---|---|---|
conchuod/vmtest-fixes-PR | fail | merge-conflict |
On Sat, Dec 28, 2024 at 2:16 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote: > From: Peng Fan <peng.fan@nxp.com> > > Use devm_pm_set_wake_irq and devm_device_init_wakeup to cleanup the > error handling code and 'driver.remove()' hook. > > Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c index bad6a5d9c6839ca70905e3d46286b9729c1fd435..47bfc5395e5908b7722b98276399120f1ba65af0 100644 --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c @@ -284,8 +284,6 @@ static void pl031_remove(struct amba_device *adev) { struct pl031_local *ldata = dev_get_drvdata(&adev->dev); - dev_pm_clear_wake_irq(&adev->dev); - device_init_wakeup(&adev->dev, false); if (adev->irq[0]) free_irq(adev->irq[0], ldata); amba_release_regions(adev); @@ -350,7 +348,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id) } } - device_init_wakeup(&adev->dev, true); + devm_device_init_wakeup(&adev->dev); ldata->rtc = devm_rtc_allocate_device(&adev->dev); if (IS_ERR(ldata->rtc)) { ret = PTR_ERR(ldata->rtc); @@ -373,7 +371,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id) vendor->irqflags, "rtc-pl031", ldata); if (ret) goto out; - dev_pm_set_wake_irq(&adev->dev, adev->irq[0]); + devm_pm_set_wake_irq(&adev->dev, adev->irq[0]); } return 0;