From patchwork Fri Nov 10 02:03:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhangqing X-Patchwork-Id: 13452018 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 DF7C4C4332F for ; Fri, 10 Nov 2023 02:11: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=FGTxf/wxQx7XPSPV8yZleTIvqkmhnGD3tadf3dfAA2Y=; b=YTlGvELDm9w9iy ozVRc9FmKlXWTvIZGCsWPUdPsbeurETDX0TWD6Ehv0lwgnoOgDAuedpRoXhzUNBBElfTHMNnxg5PY ZHRuqqOA137Dk/shJMJvpbQFkgiYnrM2mBEGDk6no4YE+x+g+6xtkWobcsGGmpgVp/CiIsyFDauEZ QuN/DhzHLHMX2Me48v9ecpoTbD4szVdgGqx/02txfKss/y5gS++o3/oPy1uob6uqk4jsx8H05QApa wMpqlQocMvhmP6q6eWbanWOrkHq/yDBJJpXc0GU6vQij3k5RRbIfZyWAUphXclB0KIZxYnPFtZhq6 Aovrr3/gy5e/MeubpRkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r1Gyp-007dwK-2E; Fri, 10 Nov 2023 02:10:43 +0000 Received: from mail-m25493.xmail.ntesmail.com ([103.129.254.93]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r1Gyl-007dvR-1d; Fri, 10 Nov 2023 02:10:40 +0000 DKIM-Signature: a=rsa-sha256; b=M2g0i8us0rU/y+6DX1WHLr5lTpOhWCA/jXxM5M6s1EKTfDPHVX+GoPA7qD0nrS+/mhn2SQMqHtW23i4mLhLV8JENyD7j2D+Txr69Ni4lPfxe9bKFBKgqx3oOUYFJGft1PAZSvOrBRrB2AOhh9TtBealfMHN9zM3+BNIdDOTdARc=; c=relaxed/relaxed; s=default; d=rock-chips.com; v=1; bh=ZNeB2wozA8E90INwwcWUSVp2xe4Q7ySaQgoaY7gbCkY=; 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 E374440016C; Fri, 10 Nov 2023 10:04:03 +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 v6 1/3] clk: gate: export clk_gate_endisable Date: Fri, 10 Nov 2023 10:03:56 +0800 Message-Id: <20231110020358.12840-2-zhangqing@rock-chips.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231110020358.12840-1-zhangqing@rock-chips.com> References: <20231110020358.12840-1-zhangqing@rock-chips.com> X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZGUhPHlYeH0kaHk9JQ0wfSk1VEwETFh oSFyQUDg9ZV1kYEgtZQVlOQ1VJSVVMVUpKT1lXWRYaDxIVHRRZQVlPS0hVSk1PSU5JVUpLS1VKQl kG X-HM-Tid: 0a8bb6f8db0a2eb3kusne374440016c X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PT46Ihw6Qzw2TA0vURwPPTUt LzcwCQlVSlVKTUJCTkNKQ09PQ0xLVTMWGhIXVQETGhUcChIVHDsJFBgQVhgTEgsIVRgUFkVZV1kS C1lBWU5DVUlJVUxVSkpPWVdZCAFZQUhLSEg3Bg++ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231109_181039_746116_EBA0B970 X-CRM114-Status: GOOD ( 10.92 ) 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 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 ace3a4ce2fc9..76b050d73feb 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;