From patchwork Fri Aug 18 09:30:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Zetao X-Patchwork-Id: 13357545 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 98021C678DC for ; Fri, 18 Aug 2023 09:31:30 +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: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=Io+VcGuGT4DT4GWz/IRlWOn7wMMq7yXahsynqtO10Bs=; b=B2iQJnL5h2HfZl i9Xz9urEmqgbbIWfreQBk9ryWuqjAJZjfBPGKuN4FYt5MmVYK6HKmsln4lOO5v4negjmqLutbZdMe UbqyNvQdlCfjNjHyPy9JOFMnSLukNT48Iu598tpga/AvUf5QZnfriI9bWSAS9yWc3Z0DaVO9j9O1+ YeAz9nxjXvsOx/D+GT0e5uronryovD+zzFZeMOM7f4UIgrrq54gCeTzB1gA7lyq3nJRkZbSK2rBPB Gu7VcD5QAWrzomtV68Kz4cOFo7bSR9/AGyDePwZIvdvnjs7cWfEVaaaj0RppjPLKLRPMHkdIZ9vkJ w0vD7O6Rfbs1jkbQBFgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWvom-0085jk-2z; Fri, 18 Aug 2023 09:30:56 +0000 Received: from szxga03-in.huawei.com ([45.249.212.189]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWvoY-0085aX-0A for linux-arm-kernel@lists.infradead.org; Fri, 18 Aug 2023 09:30:44 +0000 Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4RRxNk0sV0zFqlR; Fri, 18 Aug 2023 17:27:34 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 18 Aug 2023 17:30:33 +0800 From: Li Zetao To: , , , , , , , , , , , , CC: , , , , Subject: [PATCH -next 00/11] gpio: Use devm_clk_get_*() helper function to simplify the drivers. Date: Fri, 18 Aug 2023 17:30:07 +0800 Message-ID: <20230818093018.1051434-1-lizetao1@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230818_023042_411906_64B4BF5F X-CRM114-Status: UNSURE ( 7.33 ) 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 Commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks") provides a a series of new helper function for prepared and enabled clocks when a driver keeps a clock prepared (or enabled) during the whole lifetime of the driver. So where drivers get clocks and enable them immediately, it can be combined into a single function devm_clk_get_*(). Moreover, the unprepare and disable function has been registered to devm_clk_state, and before devm_clk_state is released, the clocks will be unprepareed and disable, so it is unnecessary to unprepare and disable clock explicitly when remove drivers or in the error handling path. Li Zetao (11): gpio: cadence: Use helper function devm_clk_get_enabled() gpio: davinci: Use helper function devm_clk_get_enabled() gpio: ftgpio010: Use helper function devm_clk_get_enabled() gpio: lpc18xx: Use helper function devm_clk_get_enabled() gpio: mb86s7x: Use helper function devm_clk_get_optional_enabled() gpio: mvebu: Use helper function devm_clk_get_enabled() gpio: mxc: Use helper function devm_clk_get_optional_enabled() gpio: omap: Use helper function devm_clk_get_prepared() gpio: stp-xway: Use helper function devm_clk_get_enabled() gpio: xilinx: Use helper function devm_clk_get_optional_enabled() gpio: zynq: Use helper function devm_clk_get_enabled() drivers/gpio/gpio-cadence.c | 20 +++++--------------- drivers/gpio/gpio-davinci.c | 13 ++----------- drivers/gpio/gpio-ftgpio010.c | 29 +++++++---------------------- drivers/gpio/gpio-lpc18xx.c | 14 +++----------- drivers/gpio/gpio-mb86s7x.c | 8 +------- drivers/gpio/gpio-mvebu.c | 4 +--- drivers/gpio/gpio-mxc.c | 9 +-------- drivers/gpio/gpio-omap.c | 8 +------- drivers/gpio/gpio-stp-xway.c | 10 ++-------- drivers/gpio/gpio-xilinx.c | 14 +++----------- drivers/gpio/gpio-zynq.c | 13 +++---------- 11 files changed, 29 insertions(+), 113 deletions(-)