Message ID | 20250103-wake_irq-v2-7-e3aeff5e9966@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 1E34BE77188 for <linux-riscv@archiver.kernel.org>; Fri, 3 Jan 2025 08:53:01 +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=r2hVzGwq/lGLJf/+SRytq7PzChhrqrxvhNJyvMgE8xk=; b=RXyIBqCUTsh7VtAGbzcQ8y2WJp VTMLjF0oH01NWJZijRQSTcVH+BGjfDPOIRB1PZWwxpnU+v3OTonMSbk6Aq0FuX5QuMgb0ul0bTTZy AAfrux9d8hdIV8MOvUumoJGEY6k1Qy6QGUXd1tZ07Ykix/UOY5Jh0MH0Tyf8hS/Gy5OFzC02+m4rh ikRcPAR+nALDw21S1dWr5AFEzXSiUFUQJCpcsgyMVO/rKYOyd7L6zJHJlEsF7UNE5SuJv2cJqoaND 4MCMMiR1I+qvSTG2UrTARhR0kHeRa12NGL1yDuET2+rvmBlGuvlKK/ieu8e1hqU9dyR1BmDSzr7r9 9eYA6dbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tTdQO-0000000CWCN-08ja; Fri, 03 Jan 2025 08:52:56 +0000 Received: from mail-db8eur05on2060f.outbound.protection.outlook.com ([2a01:111:f403:2614::60f] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tTdGU-0000000CTtt-17JK; Fri, 03 Jan 2025 08:42:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aOPYu/jF9/SCCeRnvhLOfOGctYxsmO7WXa9ShemzMzqeuwTaUhhzk/w1stNS5xQ2DZ/dtFzmOwzmnxflT0ELXjgPKpsqASyo8vyvmcl2lZgNsviObWQ/Qalp4i1SAGm0pUfTKVW/yqYR7Q87rU8eUy4Nb1JVVz9UIPqmfP4lOuSsM67F1DVZWuTvqZ55P+/xJNC02495uqKaKJhDkZUmMfaw33GgitvBfwZ/Wb2a6j3ULvwAFoCThkD5rHD/T15YdpZmloDsOGNGKKXSiufOXpcSON0ZRULkLJyT0lKRI6xnvyCc+TCjFGfTD/fZMoBIQX5PhGJaMhxHGjL0+1VGZg== 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=VFg5y3TrIOn9VH/jNSFVTNtUnnNsK5iZCxLymVMVirI=; b=n7+9FX+e85Ek1w2uOgOWwpxZkery+EJHyUqFuiOSGJPCqTI5U0vqE3HdryBsAgn4uLp4AlxlPxEUuj7bJ2fHxS1/vdy0s36OQKnEsjbfxGqGtcePTVGtFPgu2oKJ98BrqE8srZzdh3dzrqeVEfxAaeoh7dEPAXnZeuJH/UHP1XpT4V/ydaOEYWRwo6kDFfBPsBSQHg/pQxTVwzQdMyWD3g3wHyEGJyPJl5HhLv2fUoZnNIhLIsbcaL7+Ch9EABXutYOgi0AwaieO3xe+7Iw8sPlcR4WSi5lzU++kqpx4cLYmriypwSpdg96nrnkcwaC3v43/Qa3OyYmAnwi2J1fwHw== 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=VFg5y3TrIOn9VH/jNSFVTNtUnnNsK5iZCxLymVMVirI=; b=wCGHfmJkhq7G5hMBmyhLCziZKfqotmzL7S2spd2FQB0hf9saaSEZUUiwITRzMv1YXA30FIdzx/L2zJg0V2pbieM7SwL7c+iomeuQjVh5EZzD3/bSE5oLMvAcmc3GK22QRhHIZ0fh5+T6Qb5UcA2B9chWU49xAwbWZCYDlFEGYt68gtKEZE1pFBp1COOSzpNx/uS5f6pr7M1W8xqYm4VcA+tAp7ycJqp3JonC9tIvIkbyvSdTJPHEb/8L84SeFZ+bzzYyNOTfAUr5s+gcD4DqLJX4U17hiolDAHZlcgL61Qkl9wE4oTsAsSQ/Xf3eP3RxBHr1lBhn14vCHPoKq67LCw== 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 PA4PR04MB7599.eurprd04.prod.outlook.com (2603:10a6:102:ea::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8314.14; Fri, 3 Jan 2025 08:42:35 +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.8314.013; Fri, 3 Jan 2025 08:42:34 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Fri, 03 Jan 2025 16:41:19 +0800 Subject: [PATCH v2 07/12] rtc: nxp-bbnsm: Use resource managed API to simplify code Message-Id: <20250103-wake_irq-v2-7-e3aeff5e9966@nxp.com> References: <20250103-wake_irq-v2-0-e3aeff5e9966@nxp.com> In-Reply-To: <20250103-wake_irq-v2-0-e3aeff5e9966@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=1735893689; l=2071; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=VAulaoWVPhHtzgpO1nG1u9VR+bogAGzfLBxhdt2/l0I=; b=SJnE6nTcSAS4I1d291x5RNISbMdR92Y3bdxMVEhj1npS25/awsjbGzI0msy/0HB1ZZ6MKzP/4 7OsAdosToQ/CU+1nt5kyf4smIDYXBQh0LTFZYtNiILaJ7E8DONqwLFc X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2PR02CA0003.apcprd02.prod.outlook.com (2603:1096:4:194::13) 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_|PA4PR04MB7599:EE_ X-MS-Office365-Filtering-Correlation-Id: 9e8242c8-3877-4214-7a14-08dd2bd291ee 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|376014|7416014|52116014|366016|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?SQ4fziKKoDvvxgJ/gF9XF6N0I2D2JIH?= =?utf-8?q?VF1L59Syc+jW4cw2pZ8fAJkhouICBHOehUE0TwOrS6VuO9D1a0i22sivMfLkqwuIB?= =?utf-8?q?ry5h5MrUIyWjsLlRTxSsX/omqCNX1sNP2YyE9Y0qlrFsmtQK/aXxDyBPR1pHeCEeh?= =?utf-8?q?7GpbVdWHdbfiL/uZvqu+FzYZlwoTphhGyy0e2fWMY6wi+0ihZayMHDI2BVbuyeSR7?= =?utf-8?q?7cr9QJ8Ugo4fRlHCwLpTeyWcUizspY6JnMAuavnVinQRm1FVSxDQq/qojRRJ3Tm8a?= =?utf-8?q?exHbmVXkLHtkMacVxkoN1D+S8BP1iOEo8lKuiaOP5U4RvVM5r4DYU29tRRoiTgJxg?= =?utf-8?q?eABFIJpqz8JX8miN/6F/DLjDqLce/yAhFjjAMUasNbulAy7w6YqUQOfmStBhqpy+l?= =?utf-8?q?XLubmLHUdEWUUP5RJmZWVGG+IhFQbyk+VjlDSBGoyIOlnj4f7l9i+wF+FyowAHo/A?= =?utf-8?q?3z9csUgOOv4O8JOVJ2CApUMG0uTb4v4eKGJ57wKxN8mxU7nr9JazHSnMM+SoO5rRe?= =?utf-8?q?6lsvbUc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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)(376014)(7416014)(52116014)(366016)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?yM5Qmz2csNCgYd1N6skBTXDbspxq?= =?utf-8?q?0q+ySPv/giEMGY1hu4xpNZPvwCE3ccA4y0q1ghCOYhBvHFQaGWkAipUdsgGyRxLQQ?= =?utf-8?q?DffGHhT79a5Fexdf5sFE9+Ead29ZJ6DGAqNKdWDIlJZycG6Z3P8N5l5PTu4nGcYuJ?= =?utf-8?q?1llsuflkvE2ZfXGwR6DIvmojrPajXP3QJ+kM2lUNSGdF1RaXDZNi/iHcc7btKc2VG?= =?utf-8?q?I2A6Te/jqm+saeodjI1v1v45d/Lh3HRWhucefpP+LTkHuGESrvSBup4CegVR8p04l?= =?utf-8?q?54vnvG9P+tgAqD3j7ie0FNMgS4/ZeR4ZkmB/OmW/Nc2CXxUjqVavLIlQp2wTfwKmu?= =?utf-8?q?xI+7b+8BW7dypgKuRl8o5L3SfQHED1lnAzKKZdQoRW84Rr2Lz4RkPPuUE8YUJUmFV?= =?utf-8?q?+rA2ZRsM3Y5xPm+0GC7kw/VP3hInMd2mElhxLAECdRWim5mKxmZwGfEETaZ3s0Y60?= =?utf-8?q?jTX714WJ5dAot4Hqz3IOZNfGT1buTpe1kbKHUDSfSmraGpYqCG/g2zgAW4FMT2iaw?= =?utf-8?q?QqYZrxRawWU+FLXzmxBxqMNZmVvzh9/PbWQvG6+cWn7/kRbN2GXW21Dk1AbkrEliY?= =?utf-8?q?gKTiTYJHbvbZBCbjgx9fl1hwJZEStTWl1/oqVq7EAsHLkdEuQEFQs/YVlSzqvAVW2?= =?utf-8?q?BWdXfce/YdAQPK9AiiY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ginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e8242c8-3877-4214-7a14-08dd2bd291ee X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2025 08:42:34.9490 (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: r/KVS2/gkm2jJ4aI02MLeFct2jN6RdHkYRfkgON8K/K0gvWLm3qOhZzt32hIVf9Wv2ZJowH24RKxaGE84so19w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7599 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250103_004242_308251_FC7A1E75 X-CRM114-Status: GOOD ( 12.88 ) 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/rtc/rtc-nxp-bbnsm.c b/drivers/rtc/rtc-nxp-bbnsm.c index fa3b0328c7a255ff8a902a58d61a4b0e59eac493..d4fc9dc583d317d4852b7d897a6c45cfff6961a2 100644 --- a/drivers/rtc/rtc-nxp-bbnsm.c +++ b/drivers/rtc/rtc-nxp-bbnsm.c @@ -189,36 +189,26 @@ static int bbnsm_rtc_probe(struct platform_device *pdev) /* clear all the pending events */ regmap_write(bbnsm->regmap, BBNSM_EVENTS, 0x7A); - device_init_wakeup(&pdev->dev, true); - dev_pm_set_wake_irq(&pdev->dev, bbnsm->irq); + ret = devm_device_init_wakeup(&pdev->dev); + if (ret) + dev_err(&pdev->dev, "failed to init wakeup, %d\n", ret); + + ret = devm_pm_set_wake_irq(&pdev->dev, bbnsm->irq); + if (ret) + dev_err(&pdev->dev, "failed to set wake irq, %d\n", ret); ret = devm_request_irq(&pdev->dev, bbnsm->irq, bbnsm_rtc_irq_handler, IRQF_SHARED, "rtc alarm", &pdev->dev); if (ret) { dev_err(&pdev->dev, "failed to request irq %d: %d\n", bbnsm->irq, ret); - goto err; + return ret; } bbnsm->rtc->ops = &bbnsm_rtc_ops; bbnsm->rtc->range_max = U32_MAX; - ret = devm_rtc_register_device(bbnsm->rtc); - if (ret) - goto err; - - return 0; - -err: - dev_pm_clear_wake_irq(&pdev->dev); - device_init_wakeup(&pdev->dev, false); - return ret; -} - -static void bbnsm_rtc_remove(struct platform_device *pdev) -{ - dev_pm_clear_wake_irq(&pdev->dev); - device_init_wakeup(&pdev->dev, false); + return devm_rtc_register_device(bbnsm->rtc); } static const struct of_device_id bbnsm_dt_ids[] = { @@ -233,7 +223,6 @@ static struct platform_driver bbnsm_rtc_driver = { .of_match_table = bbnsm_dt_ids, }, .probe = bbnsm_rtc_probe, - .remove = bbnsm_rtc_remove, }; module_platform_driver(bbnsm_rtc_driver);