From patchwork Tue Aug 20 12:16:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rong Qianfeng X-Patchwork-Id: 13770051 Return-Path: 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 1D326C3DA4A for ; Tue, 20 Aug 2024 12:18:35 +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:Content-Type: Content-Transfer-Encoding:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=kFlrSfciLaB1d6wcA9N1/nuotNE0rTzwO24BSPRPeZ4=; b=xFbnr4z3uzC1mA1SCgxMUC3z0e oExzLSJczmvdFWOs/hJDmusSlIK8P1jk1P8y4DYAMvsAmwvnemciuC9N7NEZVJwh/7XcLPfL5pTzf MNb7sv4+dL2tRzMImYY4EZ+3NvJnZYU9SNle+mNRTSubYS+2WUsUVH7gRVMkXX3F5AC4f3ThUHRZ3 WSEwUMg22e00VosxcKExCxyM7HXu/0BQgnNKNLhBPR1nxy3+ku3hXOFjzxS+9zmwCPueZMkiKGioW dxeDFMDqcBuFSzY42pfn/XKAFp4YBj/HmCaqh6BeeQyN76JynzjWKBL7JbQ1IgpliAC7sFNOGaRbb aBl2nenQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgNoc-000000059yv-3fjv; Tue, 20 Aug 2024 12:18:22 +0000 Received: from mail-psaapc01on2062c.outbound.protection.outlook.com ([2a01:111:f400:feae::62c] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgNnu-000000059pF-459f for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 12:17:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BeA+NTuREXOyol9c5eXzieOlzs59I7kITG23KxEfRSAF8s5FNR4XD2/4uGFy2sFtfVv3QQY+11CqpjqmLX2nAeIvP5HHrH4ImPVzJw9Q30HpxLW6i/0qlzLz4CL/suB3HWpw1B0bKO1jPWiI1BLriTy45pnis2A+E3wB/nIQLsIX7pjQSyHR1TYnSmeDf31zpxM79lRsFDXxMrMTB2wUZ93JyQ/HRwr1O0/C7xS9lPH9aCx7/JVYrGUgaZEQ1uHa4yr40ovAH4kO4bYA8TCniMdPlh+LmiNDHM1IHlFyPV5RiQgsRWtbv6YrQLLESZE4aFNHUHVu1x14JbAnk8+Uxg== 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=kFlrSfciLaB1d6wcA9N1/nuotNE0rTzwO24BSPRPeZ4=; b=JM5E5b+OuDC1jUwxDBZJyPn4T556N4jk2hPOo3NYEyfOc9K4sow7i6W1Gz6bRcP7PZAs+GpnwVAXRB++jEbdF2qX/lhzGdcGgKdR4+Gl0SzOWDwV8HHid4ua90K3lNuc3BIWsSAqkqVKQPuJ07mBdaqcmnLUEeoh+inOTQDoUdjRa2ng4O1i2nzgmihyjAkde/SUxfsGqRq2SeQkavaC4pDZeY6pVWRVMDE96v4gxvNGQZrP/5C0xLMkfPhYieM7XYWEkNdyguGPjN1FA6+EDKdZHgUmiGETpRtNVU6gkdIwPDlYvSlJCbnqSUKGWpj8MJBybgLdwP+0kbeXkSfGjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kFlrSfciLaB1d6wcA9N1/nuotNE0rTzwO24BSPRPeZ4=; b=AKeQ3DixxisiDP6onLXR4KSkYpQr4viNBlt4UBX0kMcLFXpVIjRHPrlhPXjOWSVlR2oNi7k7H9w3+3XUK43yWSiAqGvSB5feI7qHFD28/SSL1wtuZGZaHXvst9gl3Qs4GB3PBr9j9Jilxw5A/VoY4sa4njSEf/90S2DtPhwATsOPe0SAOyaeFWPHYJWOxKyZ9yUxF6qfAvBBc/wNLcua9UjsZyUJ7jLBLkqPmrFd5v9+tfgVRoeW/OQE5FGRv9r4kESsaT7p8Trf4FTOFaXhmLYkdTuWLQlyLPablFT2LFHValBf+c8cjBkiMPnTfTA9HCaMRF0L55YoIS7IlsxAKw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SI2PR06MB5140.apcprd06.prod.outlook.com (2603:1096:4:1af::9) by SEZPR06MB6285.apcprd06.prod.outlook.com (2603:1096:101:130::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Tue, 20 Aug 2024 12:17:19 +0000 Received: from SI2PR06MB5140.apcprd06.prod.outlook.com ([fe80::468a:88be:bec:666]) by SI2PR06MB5140.apcprd06.prod.outlook.com ([fe80::468a:88be:bec:666%6]) with mapi id 15.20.7875.019; Tue, 20 Aug 2024 12:17:19 +0000 From: Rong Qianfeng To: Linus Walleij , Bartosz Golaszewski , Shubhrajyoti Datta , Srinivas Neeli , Michal Simek , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: opensource.kernel@vivo.com, Rong Qianfeng Subject: [PATCH v1 0/2] gpio: Simplify using devm_clk_get_enabled() Date: Tue, 20 Aug 2024 20:16:49 +0800 Message-Id: <20240820121651.29706-1-rongqianfeng@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: TYCP301CA0063.JPNP301.PROD.OUTLOOK.COM (2603:1096:405:7d::8) To SI2PR06MB5140.apcprd06.prod.outlook.com (2603:1096:4:1af::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SI2PR06MB5140:EE_|SEZPR06MB6285:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e9673ce-8b77-41d2-5db9-08dcc1120950 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: MehimFQnOKJS9lJ46m2mfUU/N1TLsByDmeWNKtSzzqoTalOEYtGM0Rwe/hBbZgOGdhoJ9qJJ9DTCi8fr1T9ckFIQgb/FtOACslyw0O8A18iQm6vvsliaQKTlTibDJ5BgbCKzGIZ24WaPvDNYp8Hjasqdrlsn5OI5125ocQy8wu4indmpOphzFbVmcKW3Cck7c6Xbwgop+uuQedk2p0NSJGPeORQY/cPv2Nf7okBlOKYWpA0PQthuxAFFU+XtPM/alP/LrBYu6GfB7PW6Ghn8zSshjGSCFIsCY4cwb65JRigUX4B1jffblaU8MJSSjUnDaAWqGjJkhacCmJPkMutJK19rAIJyo4BLCJBU3gz6gH+llOpixyJK4fpzycZxXeMLh4P2vHjJayMqPF/v2XPjmiZwStsvWzu3x8YT4A3QlFCHhxZrmIrMpwogCKv974APOCSTV/MD9L2yG76salpatbPInlky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(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5CXl+/D7vrERF6jOMtBBZxolm1yiWSwVnVtMO3oLCiawK0rAsq2Bakkw8Oi0YXWBlSBsREQdYcLmLMG1X2BLr1EAclBANa3IJrCxY0sJSKTbPnP+ztPczMimF0ukOs72mpTy0kOaWOKZ/kSH1CXaFl87NkoY1ZY2O1M5foZCEvg1hXDwTe+W0m/uTeEHCpJk3OjOYdg7zhQ8TYDc+DEfxaGuZhCAZ8F8TyX9ydEk//GBqU1GNATzprMOhPbp6lDG0dQNVNCbklxAJEFimpwMWOJtzcGhAKdL4FUWALgKYIrq2rDRgaeRDmBcqpQV8vKrsZpPXF0RDcOS4bo1smzqczKQceK9I2RPSO6R4GwoJFDHNjDqSAY3eVTNTd6GVhjgIgcBGERPScj//6ZHT61U0W8GoGm8Eup6+FqssZPx5TfoAh65ESeVqQgSW79/yGRuVAyTI1VjvwY4k/7D1WrpI0Lcjvl4CMY5LT1d/8OA6UWuzaonnHpOE+a9Ryet+C9MJrH+d9YN1ATkA2IyqkFujcPH/NtF/Eb+F41SPAeQzRlcw+wOtiB2MMKeBEhAPc7BmaIcfA6rxoGAtlDbzVBXCyvRCfOTkrx3b3NoZCV99+fLyZf0BcSjnfFbmG0NxaLHKU+EAG8157jqlJffJHgwoQixBNZUmybMU1EMz4qysye2jHPS3+aupP89Qr3WqE4nNNLBRq2iVFycEyhbAFkliAi170k7QOtJRgEw+t5WcJc5DuRhG3olIzhhNTb4JIqMf6yxJiZKW/fDQ0F8R0ZdCGxBd2WmsDjPPg6V64bjqmiCy62VMcchWJKHx9pXE6SDN3uky9I1w00Q0USgkYUAu6nTP4ycM/q5rQYPOaLIhewIDHHFV4kbglGCrN7e68DWvNwhLAxJG84E/EH/vChkVR70xCB9gRqIiax8PvG2FRTQJocnzEikG3KZJ4ZZ4GNoFOzOxV9gao2b004UTf3QQhBsbkzCf5ddkv+U4kHxtHa/GDSpNqNdzKCytWJVXxMdZN8YVKeyBufybGH301uD+qmAZk37eiSFn2Zgn9RQ4VGr+hUiJe8GSdfYDy1FACac5RVZMncCbr3Y0tFRVAuD92Lnsz9iNYBEeMo/yOh0UodylJVN+Rdpy5Esud/HvMyXTOFvcFRYyG6eAUAj8mmYvEZiqGET+jDoDvKHJE2JeEd6kUmbirre+GnVnXUnQX0alpYw1cXTgQVZdpf6NsXOvjM3+UUPJr+Cs92LunPsXqiDNJbnhM3tXdSnyWqzj9zNXU/uF6WtXUqcjzaokJKclATPddhGAPludJIRNb6pmz3c8LZ5Ss8kW2+w6TUZ96MQkFNkyCtloWXKAmQdgyXI04buvSyIw9tJXSKSMk39J8vhRDt7lMsAYuHXdt9tGa+Gic9bOcqI4x1MjL5S5Ext7Z8uvZNIVvOMzoOWGYfKHP38B2M5MBKgS/22faqUGDe6OC4xnnUL/JnneOh7DJ9PxwtaTduc5kg2/KPBrB6ZH7AGRvTjWPpTVmLNBlNiwGxCrCJT/LoDAmyeO/Ylf0KBvU8jQ4jZhKhTXgvqNt0Rb6CjPF/FRdLy728IEQ2aqv6H X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e9673ce-8b77-41d2-5db9-08dcc1120950 X-MS-Exchange-CrossTenant-AuthSource: SI2PR06MB5140.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2024 12:17:19.1646 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: o8teAndps4zYm4wHcW6/y6XPp8b/wXwuiunZvjkT7/MDPB17pgAL/oGvGE/+hLguFnOvIDNVJOTaIveOsAWAAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6285 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240820_051739_035949_E57E15E5 X-CRM114-Status: UNSURE ( 6.09 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org devm_clk_get_enabled() will call devm_clk_get() + clk_prepare_enable() and the clock will automatically be disabled, unprepared and freed when the device is unbound from the bus. So simplify .probe() and .remove() accordingly. version 1 changes The changes for davinci have been removed, as they have already been sent by Bartosz. Rong Qianfeng (2): gpio: stp-xway: Simplify using devm_clk_get_enabled() gpio: zynq: Simplify using devm_clk_get_enabled() drivers/gpio/gpio-stp-xway.c | 10 ++-------- drivers/gpio/gpio-zynq.c | 10 +--------- 2 files changed, 3 insertions(+), 17 deletions(-)