Message ID | 20250103-wake_irq-v2-10-e3aeff5e9966@nxp.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=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 CACEDE77188 for <linux-arm-kernel@archiver.kernel.org>; Fri, 3 Jan 2025 08:56:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: 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=XjUzsRVsWfUKGqcMfcInIdzIFU4EDALwy1w62++QsnY=; b=iF09vyHcpSmYsVYV6BhvNX1Xq0 R51gCrxC+o+Rexp5AZnYe7oY8aGc/GBjpTCae6+Rfzqs7zIf4Ilom4u1L9fXHVVpXC/YUTQZbYSrs ro1qjjup11qrpd4b6qU5NN2tVed4/4c+WWSW0ecf4IJCFg5bE3SMN2RZD22JL74UU7S9s34jWF/B7 JfYTg+8xYpC6sLk761rdqL/HWzyacuYjqGUJCGyGeSif/0jD7hhLQuQ+Kz0xrMvSLzzyTDfr326q4 hsPY2IThIX6wpp+zqANw4gwz+YEoKjvXsUvAISoCY7Qq6+XvkcST9PwpJgnBH5O3i+qC9CYZ4sINO QiPJSG5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tTdTp-0000000CWo4-3YW0; Fri, 03 Jan 2025 08:56:29 +0000 Received: from mail-am0eur02on20617.outbound.protection.outlook.com ([2a01:111:f403:2606::617] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tTdGk-0000000CTyJ-3pi6; Fri, 03 Jan 2025 08:42:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Md4A0Ls1ch7WKaYvjrmUH8MtpM5feWLHNXE5kVDeHYgnNZrgL4gjrJP6rU82LxzViMnBey/0PtSq2aXc+Lau+KC6ze+UEKEdy3x9CPfHkpDUD9yU5syIK/WIiUDm5gXOGXdvuNcNvrGdwX4Be7W+s++NXN/0upTVk0uyBT9IxLjV4wIBrDXumBrao/qW4HtDgYToyB5D/zSN1unrAMJSnvwOfMjtDEwQFRDpAT9R2bQZD6YuX/r2azSXYhinG0nisu6Gb3E2/m7T+0/X762y4KR12KW7rIK9LS2b2LMKWAj9+fQEoN4doRQTc/0zWBffHjmZ9VUFMIs47twkTrCdIA== 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=XjUzsRVsWfUKGqcMfcInIdzIFU4EDALwy1w62++QsnY=; b=NNyLgFPlTYgh8Khp4SfPZnGrCwaurFZMGzo5PMIBgbrV/vUGgsFS6GjKniBd6v9xYKLN19f3qAxqPH7850qCpr17fWCneAQFTRiqmHhmkYG2/1gk1zrF6mE1tWYkmtHSHQdsHR1Y7k/xx6PEoIp2llHMBn9cMFdiBxo6RdKVoq4XebnBCOfsbuRD56WUv+NcYaMxv1hiv0/Wvfibjwf0nqQB+10vadmzcEs2UOalC4jtPvthc6/sFo9BmPNQJX2OjaUayCMjm5iedj3I9A8dF1lt4sFb7vdId+Wp5XaV+9V+G8Kjy6bTCHM3TLTEHMacbcQDRjv0VLDRRtHV7ZCIfw== 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=XjUzsRVsWfUKGqcMfcInIdzIFU4EDALwy1w62++QsnY=; b=rk6kpXg0jJzsrvHsjOIt/T91wiNyt7KcPzFMabciOPVCuo8zwckPgPfWCU3nYbNtuVyGmAT4CV7feR7EigFGLZvXRa9yWB3ZG2/REEXkAo+IY6xRQkBsiLL2PVG6pqVAdBljO6lfUCdu4bJLsjnQnCkTgh/KrO70q5Ac67GMZdzqBzVkO8qIWrh1D8+zMZQB5jxppH4AF3gizJxUFCrCtmXPJC51RUMcGlydsuGrL3CsmSJrmTCtc4XRvq0YqwfABPXYfvkaZbJn7yoQ+mMvn1k6q5zEj4851UHFlwcW37dlnSfj9PL8xBoBVSmkNiJgBaHEbOXmkxY2uybvddWBhA== 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:51 +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:51 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Fri, 03 Jan 2025 16:41:22 +0800 Subject: [PATCH v2 10/12] rtc: ab8500: Use resource managed API to simplify code Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250103-wake_irq-v2-10-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=1597; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=rISyYCuz8yJRuvtcynWqye8n/ybIJ7leHy6yEB7pHHU=; b=xaSOBF7rbPCPOPpRk8B72PtGMEon0vCPZFSnnNt5H6V3KsWLbwrLyvuss/Olw4WIEYNlzcdnV X7R5cOLpQU1By5c59CRK+xFOdl3nMqOGeDn4fIgj1jykTG6IMhvHt0D 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: 6b3111a9-45d3-429d-94b0-08dd2bd29c03 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|7053199007|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?p6q1ULLPpXtH0S+2nbkrlk24uoj6e2c?= =?utf-8?q?MukYyzvk6K38fq/HSzi3m8CAYadfypCfq89BAHRUSrrt5HfDHW4UlT27NJSXuuMik?= =?utf-8?q?XPzNPwDHaLNu92584g7V9tfmod+KRxIOgBv5X8RH7mxVCo5dr9dl7ExLIcjgzb1WZ?= =?utf-8?q?DXBFmQSw+zNpFN9RNxKJdJP/7X4gt2AyI7GRL8AEfuKV+k9iy6iq+aKr9JgpTBAXB?= =?utf-8?q?vxwRbkvMkY56u/qlpFSdTubzrzew83Dap/uDFjVt5uxbFzPR/AUwZhSWO6vGJPNFu?= =?utf-8?q?NavWqTzyU82ZJxxEFr9pZPqmrEU2Fs/Gas+9DzsoDoQbHZWINXHyqACsMpxT5Q/GI?= =?utf-8?q?GoB78Lo5/LNiUCMAc780CIXWbDcxs5TPcRbsacJobeSnthpp+7LSyT+76aTOjAxun?= =?utf-8?q?TB2ogT48qnXfJQSHqo1BLsqht6Ut5DnXgLyG/stxPHbBz3kg1YfKXKB2lStHqlojv?= =?utf-8?q?y7bSpkktX6I2hH1bTvIqYMWWpM5cTtFgEVxEF+RpKe9XIbYjCeSGxRgwpu3TJOjs+?= =?utf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v26TJM57oSV9I+u1vgk/wL9dvWg=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)(376014)(7416014)(52116014)(366016)(1800799024)(921020)(7053199007)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?XAsV0Hq1zdd9jNKOwgi89CioBYAs?= =?utf-8?q?AxW19XNVWjjUSbSt0n2JSa142jXPgek4u3vWlWIr2DK4Wyzec4gbnR8CvHR5ogmv3?= =?utf-8?q?68/F+YgFLIGGVILq1Xumha8QHxtYvlYK/AqZ/oKAfK73r1KzF0Cs+AfGLKVMocxcn?= =?utf-8?q?HgXKI+vQPvYgwgb9n923ckqtdsHkqXlVjd1EAmuq5hBx3CZTEfPLQVaQg1t4SAhGm?= =?utf-8?q?bSQ1UJhoQ2tTkdf/WiEkxeFIpRS3ybp8vWh7CT9aMyiStadC9LNeGiuIQpCTzaoUL?= =?utf-8?q?W9QJ8GcE2oddEGiRzCnIwxPo9iVZFyPA8eAHU4sLM0liwh6efCIDx0unE6v/d8uCl?= =?utf-8?q?I5/AuV4K2w684V+65HBXdNUj7ZByGYkUu+PInlpvG/f2/Q0dbkShmPUmqx1baGwSu?= =?utf-8?q?FcgbGoq4iMl7v+Luq9UUpnhP6BHy1nF8hQXNpsdidbw7FFpzyhqML8BC4VzKtwkx0?= =?utf-8?q?i0fRCD5XXErIsojcskOQMdw1bnirYd/K+B1hu6ePxnJ0xO+KIlQraJvFu/kvX2ytf?= =?utf-8?q?asUQGe1vlduHGAt/9BSC4IGte3V2jtUd+TWcCDOJudwNi6jnu4EnRpK3phSdH1pfL?= =?utf-8?q?rh62Kzi/gAQN7CwJew6FuU6aGwSkrt4C1EIYXJ5ZORy7IP+L/5qq9wcTfF8y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f-8?q?dIbwRZuHKbGj?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b3111a9-45d3-429d-94b0-08dd2bd29c03 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:51.8042 (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: eBccr9Kg0zcivnKXlfIPzpufRiqn5RmXhVbU1IS84DVazBkSZe0kenEoQGKBxhRunqXQ2eAyxyPagxi6XvIKGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7599 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250103_004258_959087_78E6A80A X-CRM114-Status: GOOD ( 12.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
pm: Introduce devm_pm_set_wake_irq
|
expand
|
diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c index 2dcda96f4a8ef727514c751322b84d8d2b382b75..ed2b6b8bb3bf8f99fef9f8bee9676f71f8a86d2a 100644 --- a/drivers/rtc/rtc-ab8500.c +++ b/drivers/rtc/rtc-ab8500.c @@ -361,7 +361,7 @@ static int ab8500_rtc_probe(struct platform_device *pdev) return -ENODEV; } - device_init_wakeup(&pdev->dev, true); + devm_device_init_wakeup(&pdev->dev); rtc = devm_rtc_allocate_device(&pdev->dev); if (IS_ERR(rtc)) @@ -375,7 +375,7 @@ static int ab8500_rtc_probe(struct platform_device *pdev) if (err < 0) return err; - dev_pm_set_wake_irq(&pdev->dev, irq); + devm_pm_set_wake_irq(&pdev->dev, irq); platform_set_drvdata(pdev, rtc); set_bit(RTC_FEATURE_ALARM_RES_MINUTE, rtc->features); @@ -392,18 +392,11 @@ static int ab8500_rtc_probe(struct platform_device *pdev) return devm_rtc_register_device(rtc); } -static void ab8500_rtc_remove(struct platform_device *pdev) -{ - dev_pm_clear_wake_irq(&pdev->dev); - device_init_wakeup(&pdev->dev, false); -} - static struct platform_driver ab8500_rtc_driver = { .driver = { .name = "ab8500-rtc", }, .probe = ab8500_rtc_probe, - .remove = ab8500_rtc_remove, .id_table = ab85xx_rtc_ids, };