Message ID | 20241228-wake_irq-v1-4-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 12A1FE7718B for <linux-riscv@archiver.kernel.org>; Sat, 28 Dec 2024 01:21:38 +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=CPYpGJONvPzTWPRPrywWiNt1uPIgnnmzOhZHbWxkU5I=; b=bPn9Hr84goswzY/FzMrSEdjTIt L9MVWsGS9SjjtYH5lBgrXSlPDaAAMjcLK/2/PR6S6bQnnDUdOoOZ0ub7LrCmnGZmCmFNZvb8ItAAL GI9eMQODsXdGEcb2kmYZ1zXCsLhHRbcSK453Yf+1eaFk77SmS9B1uKRTP932IgcjLwJ0iEYYFnQ1I F77X+46m0nu1up+fgQDlqBpXWii0kAR505TN2zmQMT6jF/5WuFcd/U0IBO9jkUPS4gxwt7y4jP72p 985CjUdeUOk8z5huXceVSopeyL0rneGLr5J1lrpegvTG4HIkwUUB0zvY4fE1J17O64ZwaOoADLlUq E8rKp48Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tRLWG-00000001CSJ-2rAo; Sat, 28 Dec 2024 01:21:32 +0000 Received: from mail-am6eur05on2060c.outbound.protection.outlook.com ([2a01:111:f403:2612::60c] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tRLQa-00000001B9u-2mJF; Sat, 28 Dec 2024 01:15:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=De03qc/7+W09q88nvZWjpdJ+r44syFhmY0TGXrDE9q8cLOOQ+MC2FTi/26TBOTg1z71q/Njjd2+YilGj2hVqA2yBruyaElB3FzznpfGnaJFCyehc9x0U5kkafytI4nMKaOdBBe3iuf2o0DBS0O0e3DDuSIKrL6PC1POWXdwPlz8yvMOasg1ES5hAuxZY1ER4iKQAzwGhflNJnP3qo7ZlZhxJAqBfT69E8uDmBUQ7OkMCx5BA9Z6i+akGtRpBr+BEb75qnSg967vVYBGvDiak7OnV4huxskJ12YkZCfTiAsLDTFP/cQ+mOU/JxPEn7N1laO3U59HZAE3rCv1cMPKHkw== 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=eLJ6/6T287sMFeFzpA8pzl4U0kUK+AHmoE0BEwYo/f4=; b=FW5NwhB6l0ulZlgR8HG4Y0y6fxynFZ5VS3ZIxGwpH74L90gXYmN/Z0R9zJjABrQOvPeDSCsaFgG1jgM0xzSySFtFHhYpyWlbjktQtwERCr/aEMcWiWoau2YF7puLTfamwHlk8K6PQBxTy1bwYfJFbAlw6Si1pKdPNhoBnkPk7LGmEADNJj//fMsMdrJEw8PdAje9VqE/UsM4UDVDtunaYEHfrXyo3Y0DDRLfrMiUVHosTRWTJerLjfkfF5BX8nxpJZVbI5jC49AJdAYwtLRoEpFiFhtC5OneUhmhHyZG6/K2IZ8q9pjZ/hgpdcZarohsaWgvza8fS5IvFEvBrPtcoA== 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=eLJ6/6T287sMFeFzpA8pzl4U0kUK+AHmoE0BEwYo/f4=; b=bdVTbLzxiZp2lRvyYH6Bc24luyGUH+RGc4fBdXYmTBIVFgOTXEViTJ4s/2MYXyVZF9izqgQge22bRocgyzocpeFBKin+IBVVMZ8zsQMn9CwojzYW8I5ieqpNQfHmOhcVeZnglGDVVllkty5SzZK23UEsnCZO0Ck0TX5BkNowSsfyT71QeIeZsVALm3I3fkUT2GEQOfb4dVCtObhysKjGVxBY+xu9NnrgHTyo+CczxQRzDddYsePxupFSjSK9gvqzEVngWyndAeDV7L1nk8wtoEpQnSEX3YtJJjXv4viJbdwfupfOJMULC6mPH45PnVWPKFCFkJwrj3sli68tjXp8fQ== 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:34 +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:33 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Sat, 28 Dec 2024 09:14:40 +0800 Subject: [PATCH 04/12] input: misc: nxp-bbnsm-pwrkey: Use resource managed API to simplify code Message-Id: <20241228-wake_irq-v1-4-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=1523; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=g2vZhAdAlG59tJHA7zmPtBw4oLxwHW1tSbJmlo9rLyg=; b=n1Rdvh+byloMgU9fVOo/u/dO2fgSbylAiFhuEeGCWpv+c5cbO6HQBC8GN4OZ2AYv6PpvAFCpi 5ptQtE7Ox15CwPoCaVywbzaXII03UcP1k2p2mA5iZLfYxQWU34rIpK0 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: a8ff64c7-de9a-4bfb-c06e-08dd26dd20e6 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?AAKgOTso9fXPeztRCyMP/AagQ52A/vi?= =?utf-8?q?XYjHh9MQ/PITWpRmlEm7dt07jKVeDVocAKQCVpAE4jlIMiPirc3c0m2g4t8o0l9iQ?= =?utf-8?q?M5KNXTZLbHZ7YILg+ysHhmoNCyGM3Z5USOFiS02pwFAHYHjmliujBOOBkM6Qx6oyq?= =?utf-8?q?M3EamaJ+lnY+ungW429JqozlB0kn8/6vTp1vxx+idH+FVGbOU+yXpBNl/bZ70Fvdh?= =?utf-8?q?NL8iBwMh15skuV9uRyFXM+YRJRcEWb/ws1xgMqAc3EyKCPcrgojZ0EW/Qfzej/t/5?= =?utf-8?q?GY47vCnxv34w+me1t4NOmPb8iS00iFOizlZP6f1tWvNbToo9RyVLhV7ver9TCwZFV?= =?utf-8?q?ZYs8NHhXNxh3zjG7+/SINzaHWnk6XwGJDu5oaEve0XwaNzzavpGQ23oicmcXXXEaz?= =?utf-8?q?3wI1EzkUUSmVq0K4lulrvvI1PD6oq55Kdlkd8D0ZcOPRBnlJHPi3ZuzmceioBwLy+?= =?utf-8?q?otJYRxKXn7XcVS1nffmPo7DZEAf4bJGQgvCKxk15uw4C1utfSlZzeKgDB/t8w7Mj7?= =?utf-8?q?n3+K01yrmUDUQqzWxhpb2+pCC6okUH+dGfWrxnoNvZ37B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Y:;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?IBbwi7nisCnfNgHXAbwXfrO8fXD9?= =?utf-8?q?EKoADMVVeRf9m6TJFqMfByQI2P3kAWa2m7Dwbvxvy52N/NWwoM4Bi0USjb7XfO44H?= =?utf-8?q?gyQwVycJmBRHRVYiOOzw/StkhouzKoDJwdEGTpw4wRRILOz6AnH65n/agXtce5Eeh?= =?utf-8?q?j5NjIm71X5D514wjzp/UnoW/Zxg72Na2bb0XpySXO7/Pzq0uRJ3ZS0YBRjk8XtS2p?= =?utf-8?q?BYVXrgc98wSkNEb9IV2I14+uRM8qULBO4U/zItvSwuuweB6mx/730I6SLaIpJdRew?= =?utf-8?q?envP9EHOXqoe5G8xAop5BknVKPEWoASF/lQzHMFElMq2oLMmGE1f1F8yuE3B1udvT?= =?utf-8?q?Rg/fbjnk7o50SxOnBKLVlbeUEpqI8QNRL07I2EUsBHuorkLOkaQK+kea7nVHzXWML?= =?utf-8?q?jPzS5LaYkfUGTW5veci5t0VAidTB3aotdASj4rwbZqzkQSXigVkIMR6ToCR0sydJ5?= =?utf-8?q?QhuaP77s4ysw5k285zxpQYBQYGYAW0D/1i3V2kFhHWF9MJSlzuDeuL4jLgmq1c5qL?= =?utf-8?q?G/MQDyFFwZ/XKsHsXz3sTzls5GAHyBro6ZPha1IljvsgNwg/pvyoaBApXroRucky2?= =?utf-8?q?LEoxRgywWz3xHuWfPTz4xWAozBCXvDRo/WJUezxXCoA61cqOpP11MS5hRdQ3miKqD?= =?utf-8?q?LyUGMSdplfTtryxOTqb9zQq4ILqEw4tQtfzIOk0QrpiZ05G4e3K8aZPMO3EMNVWY6?= =?utf-8?q?QyzrnuqhifauP1DFJGgoEicjF9lzpMrgI/14K3lIxMIqvk2IZZ2849Xf+kNzfmfZL?= =?utf-8?q?eg9SeWX33Jv8wzqb39M1nZgVq7gWe74sRT+oQX3E7iLciBlpd/Xfe6V+cZmJa+ESO?= =?utf-8?q?lB6ABf1LoUQi+sq/7WHmXxJTF4NYRHLPmrROzSVQqSllIs1ma8VKRM4mjc1OE5ImF?= =?utf-8?q?M2uRTwcue0HNQyTe4r3mK4e/HK1a5bu4c88yqIFh0lPB68W2vJN98FLmartdMjVnu?= =?utf-8?q?kHNiEoW6sy2LvFs7BzxNIiFd4p880rM4aZ5tszUnd7vN70rCay3+RWYXaQWoNuGaA?= =?utf-8?q?qYgq/YQODeuX+bvEc8ZFpee+YD8UgqJtkYbB2ityenygtip/T8rw5OyFbgVcg1JTd?= =?utf-8?q?GdtMsPeU4VaqCzEfX8DC91L+vTpUakW8eQFhzQnxTvWfLWCazMslfho4tOMMbUrZc?= =?utf-8?q?fDMxb4f4Vigp8g2n2OqV18pKMBStH7rubE8+52tw0nJAc6pSTSz6QnNMXnaCo8bdm?= =?utf-8?q?zh2P8iTRIryPrhZANskl3nrlEdHnT45BhRyjCKIClvxKlP8+tEgfqukKjb5TrQXg1?= =?utf-8?q?K7Vgw/bxZjoaeky9topQ2at/PXu6hqa+RiTj8y+tYP/JehBgSmKYw9iVbwZCro7vm?= =?utf-8?q?VIRZUus5m+8gMh26q486VoGs+/AqN+EjTjJU94liJ/EYehrfwk4QBHt2QdVVrzrkB?= =?utf-8?q?NV6D/xiScTDpai7UtlyeKuPZIJB7QraPTZ686m9RUW6Osp4OU2Jda0vngWWMj9GJL?= =?utf-8?q?L1VMUGJNBx9XHytxiwZreeM/mxotX8YZjvNTEYLJbHA6jds2naozj5m0zUdQ93hsT?= =?utf-8?q?eq1NLF9BgLhT?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8ff64c7-de9a-4bfb-c06e-08dd26dd20e6 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:33.9459 (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: hD2oFTTUJKXRjZyLT2oh+iao0KNwr0nZ8a2u/HrrvcMaWm+QIY09MWs2jLoUPjFMjxc6FzhvpT3XbtSHfrakHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7140 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241227_171541_012624_BF930365 X-CRM114-Status: GOOD ( 10.57 ) 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 |
diff --git a/drivers/input/misc/nxp-bbnsm-pwrkey.c b/drivers/input/misc/nxp-bbnsm-pwrkey.c index 7ba8d166d68c18b396e616f6f9074ae98c4629b7..5faad2c98af35c52dcacbf25728dbaf2cbb3c625 100644 --- a/drivers/input/misc/nxp-bbnsm-pwrkey.c +++ b/drivers/input/misc/nxp-bbnsm-pwrkey.c @@ -179,20 +179,17 @@ static int bbnsm_pwrkey_probe(struct platform_device *pdev) return error; } - device_init_wakeup(&pdev->dev, true); - error = dev_pm_set_wake_irq(&pdev->dev, bbnsm->irq); + error = devm_device_init_wakeup(&pdev->dev); + if (error) + return error; + + error = devm_pm_set_wake_irq(&pdev->dev, bbnsm->irq); if (error) dev_warn(&pdev->dev, "irq wake enable failed.\n"); return 0; } -static void bbnsm_pwrkey_remove(struct platform_device *pdev) -{ - dev_pm_clear_wake_irq(&pdev->dev); - device_init_wakeup(&pdev->dev, false); -} - static int __maybe_unused bbnsm_pwrkey_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -229,8 +226,6 @@ static struct platform_driver bbnsm_pwrkey_driver = { .of_match_table = bbnsm_pwrkey_ids, }, .probe = bbnsm_pwrkey_probe, - .remove = bbnsm_pwrkey_remove, - }; module_platform_driver(bbnsm_pwrkey_driver);