From patchwork Wed Oct 18 07:01:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhangqing X-Patchwork-Id: 13426505 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 CC438CDB484 for ; Wed, 18 Oct 2023 07:03:05 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: 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: List-Owner; bh=1Z1SeEVzgICGyZH7OJAEOKuwyG55B4j2n8kfTEX6FLA=; b=uzKoEWsUsVOZ4N nEeIEDMLaRiQ5Dm4t+eNf00fQD6AKR1ls0xzs4L292cYRf5t2935Y74audSdf9CG7z0eu4DDEGRkd A/yI9JVk93JoA8AHg+aYYLUvC7Skf4O5C4J9vgUggTd+gDe4dv+qedfHCQ6lX9F+WSVDkJGeTmiVE mSXGpDt0fqxLR2pOJzXh5EjNGs3s0P7ttPra3RHBa7zAfViEnF/IkpmduH7AaIgeo7vPg45IXa/0+ YUt/YPTMYTbOuC8R1+ACSoGFT1JJ5KNmr7TARUm3RgWvNi/tQgE0epwln41kkweKPn9hXsMhIXwgQ Hl0F4nq9CxXJsBndckKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qt0Ze-00E0EY-0H; Wed, 18 Oct 2023 07:02:34 +0000 Received: from mail-m121156.qiye.163.com ([115.236.121.156]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qt0Za-00E0Ah-2y; Wed, 18 Oct 2023 07:02:32 +0000 DKIM-Signature: a=rsa-sha256; b=E0PSZ4VK2U+/fIZEgreSbpMcd05lTrtevdu+RBVmosKtnpF/jy/Q4nheKL3OBZPLO1TUlndl6QXwvqLOfnkHFyk+0UaSuAeTUqgAoAm8Y9BwCZL4D83LpcLW6BNRTZ8ZhbjtyY0yt0EzX5bcWXMsRz0n+lSdZHFhHrxDoxP2lUw=; c=relaxed/relaxed; s=default; d=rock-chips.com; v=1; bh=DtH/oCtKJde1sjDyS3pl41/qKJ2ZiN3kvC/owDT8wEA=; h=date:mime-version:subject:message-id:from; Received: from localhost.localdomain (unknown [58.22.7.114]) by mail-m11877.qiye.163.com (Hmail) with ESMTPA id 8A8F4400353; Wed, 18 Oct 2023 15:01:51 +0800 (CST) From: Elaine Zhang To: mturquette@baylibre.com, sboyd@kernel.org, kever.yang@rock-chips.com, zhangqing@rock-chips.com, heiko@sntech.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, huangtao@rock-chips.com, andy.yan@rock-chips.com Subject: [PATCH v4 1/4] clk: gate: export clk_gate_endisable Date: Wed, 18 Oct 2023 15:01:41 +0800 Message-Id: <20231018070144.8512-2-zhangqing@rock-chips.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231018070144.8512-1-zhangqing@rock-chips.com> References: <20231018070144.8512-1-zhangqing@rock-chips.com> X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZGR5CHlYeTBlDTx0aTxkfSElVEwETFh oSFyQUDg9ZV1kYEgtZQVlOQ1VJSVVMVUpKT1lXWRYaDxIVHRRZQVlPS0hVSk1PSU5JVUpLS1VKQl kG X-HM-Tid: 0a8b41973abe2eb3kusn8a8f4400353 X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PzY6ECo4MTw9IksOCC8yGgMO HTowCx1VSlVKTUJMTUpJTkpJT0xLVTMWGhIXVQETGhUcChIVHDsJFBgQVhgTEgsIVRgUFkVZV1kS C1lBWU5DVUlJVUxVSkpPWVdZCAFZQUhLSUw3Bg++ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_000231_135583_1AC8F24A X-CRM114-Status: GOOD ( 11.37 ) 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org make clk_gate_endisable not static, export API for other use. Signed-off-by: Elaine Zhang --- drivers/clk/clk-gate.c | 3 ++- include/linux/clk-provider.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c index 64283807600b..5a9d10370237 100644 --- a/drivers/clk/clk-gate.c +++ b/drivers/clk/clk-gate.c @@ -53,7 +53,7 @@ static inline void clk_gate_writel(struct clk_gate *gate, u32 val) * * So, result is always: enable xor set2dis. */ -static void clk_gate_endisable(struct clk_hw *hw, int enable) +void clk_gate_endisable(struct clk_hw *hw, int enable) { struct clk_gate *gate = to_clk_gate(hw); int set = gate->flags & CLK_GATE_SET_TO_DISABLE ? 1 : 0; @@ -87,6 +87,7 @@ static void clk_gate_endisable(struct clk_hw *hw, int enable) else __release(gate->lock); } +EXPORT_SYMBOL_GPL(clk_gate_endisable); static int clk_gate_enable(struct clk_hw *hw) { diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index ec32ec58c59f..e81266199742 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -630,6 +630,7 @@ struct clk *clk_register_gate(struct device *dev, const char *name, void clk_unregister_gate(struct clk *clk); void clk_hw_unregister_gate(struct clk_hw *hw); int clk_gate_is_enabled(struct clk_hw *hw); +void clk_gate_endisable(struct clk_hw *hw, int enable); struct clk_div_table { unsigned int val;