From patchwork Tue Aug 6 07:38:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhangqing X-Patchwork-Id: 13754506 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 9C236C3DA64 for ; Tue, 6 Aug 2024 07:39:23 +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: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=jI1JeY9TXwRrj6qJYsUyP8KnWtyDUAzEtpD1YYt2e3o=; b=i5tJXXirBTJsdK o/JkF/9Xvq5w9hL2nBMnwOqEVdLwF3VxvPekgVF95TqwBa+qEBkbnR3hCkyyYbHyXU2Lz0rqBuFL+ xGyFjp7QwFJ+T2s+0q0AZ02FRH5DOxs7gw6chF/OTLySowY5kd+q6BTAuZ0nRDgLXVARiiOWiJXS1 aE4C8dEcrtiXSykAUo1rH8omqYCFAsQxgCbVvb2rvsDdVijOaoNZVZp5AR6mKPAnyZfyg9ISfmM58 lK6GmkBgGtvp4ldp3dpjdQYrx8lUukZTRXx7tpsWhm0asCvm7z5FiBwbuLMt5Wzvn5eakOd1/phV5 yjulwXrT+enbFthsGBvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbEms-00000000p3n-0tll; Tue, 06 Aug 2024 07:39:18 +0000 Received: from mail-m32118.qiye.163.com ([220.197.32.118]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbEmo-00000000p20-1KLm for linux-rockchip@lists.infradead.org; Tue, 06 Aug 2024 07:39:16 +0000 DKIM-Signature: a=rsa-sha256; b=hB7cv8FQEu9PuezqGIIrz1ErY4ueQCOC7o50WMlAQ4F/2H8dWKdjDacxJpRvIvhlDi90AXg528vCOpFmjWDYQHv4i931JD1urwpTbDZi+tjMnE+2KgHks11H60ED9q4hCFboMRxflkRpBqQWcCMFAZb5fvgsDZowZfa9iRY3v78=; s=default; c=relaxed/relaxed; d=rock-chips.com; v=1; bh=qUN0fucssUTYDJMPGdCMYXuJJdSvyMs7YM5gSkBeMgM=; h=date:mime-version:subject:message-id:from; Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.qiye.163.com (Hmail) with ESMTPA id 55BD9A07E0; Tue, 6 Aug 2024 15:38:40 +0800 (CST) From: Elaine Zhang To: mturquette@baylibre.com, sboyd@kernel.org, kever.yang@rock-chips.com, zhangqing@rock-chips.com, heiko@sntech.de Cc: linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, huangtao@rock-chips.com, sugar.zhang@rock-chips.com Subject: [PATCH v1] clk: gate: export clk_gate_endisable Date: Tue, 6 Aug 2024 15:38:32 +0800 Message-Id: <20240806073832.13568-1-zhangqing@rock-chips.com> X-Mailer: git-send-email 2.17.1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZGh5KQ1ZISBgeHUtDQhhJHktWFRQJFh oXVRMBExYaEhckFA4PWVdZGBILWUFZTkNVSUlVTFVKSk9ZV1kWGg8SFR0UWUFZT0tIVUpLSUhCSE NVSktLVUpCS0tZBg++ X-HM-Tid: 0a9126a03b4c03a8kunm55bd9a07e0 X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MzY6Iyo4PDI3HxJJNxYSHUke DhlPCiNVSlVKTElJQklCQklKSEtOVTMWGhIXVQETGhUcChIVHDsJFBgQVhgTEgsIVRgUFkVZV1kS C1lBWU5DVUlJVUxVSkpPWVdZCAFZQUlOSkk3Bg++ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240806_003914_878991_7DF3AD47 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 68e585a02fd9..531bb84a5b3e 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 4a537260f655..db7132e9c057 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;