From patchwork Fri Mar 7 03:27:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guangjie Song X-Patchwork-Id: 14005789 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 47DE5C282D0 for ; Fri, 7 Mar 2025 03:40:58 +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:Content-Type: Content-Transfer-Encoding:MIME-Version: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=eKZz4jFOoMUJdddEXwNyOM0T7oSXWk16nCWyBfGInKI=; b=3rNhTo5fsPMfOOG9QF4311PBtQ VymipDYduFYj8dWxy/Soo0MKjYEkHemn8ByS1doN75RvCUEmmHSBtbXGHgKOeDcZKZ4+lpW1JG38O dXUB9iphAMZMLB7+ruR0X4u6txmL7ra+yVoSSFkwiSa1syuU7qyuFVsc90omHt+u7TQC4C6K2kwI9 qZqsX6oOUgQQrfO+WHRvowQnNgKtHQk7C1DSI3LE2q0tdfSqPH9E7jV1pM9uP3/oso8jrO4RbN01q U424zzAa3I786aek0J11ICQvANLu+QLM+5w7R6i7jsyIltAVoB3j6qjpMmepm/CgoBerLWGUMCOoC BpNJA8Lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tqOZu-0000000D1Js-28bn; Fri, 07 Mar 2025 03:40:50 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tqOS6-0000000CzO3-3MjM; Fri, 07 Mar 2025 03:32:47 +0000 X-UUID: d320c5e6fb0411ef83f2a1c9db70dae0-20250306 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=eKZz4jFOoMUJdddEXwNyOM0T7oSXWk16nCWyBfGInKI=; b=N0xQ3eZ0FtoTW8IDvwbJaqotaua9cHmJPy/XYgXkxHOtjIoiDPA/OpKR3TK08Ox3bHQZvNz7HTGlrRLlw4Le7y9WaFdcxbgq+3raf+rR0UcjhMriRcxoh1Wi/gGOrPEvUtyDhusVtgB7jTorrK8IOrSzEUlPU11LLnLXNx9iYY4=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.2.1,REQID:6e03bc16-d6ff-4c48-85cb-04552af8cad9,IP:0,UR L:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:-5 X-CID-META: VersionHash:0ef645f,CLOUDID:db6d108c-f5b8-47d5-8cf3-b68fe7530c9a,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:81|82|102,TC:nil,Content:0|50,EDM:-3 ,IP:nil,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV :0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: d320c5e6fb0411ef83f2a1c9db70dae0-20250306 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 536526191; Thu, 06 Mar 2025 20:32:41 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Fri, 7 Mar 2025 11:32:38 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1258.28 via Frontend Transport; Fri, 7 Mar 2025 11:32:37 +0800 From: Guangjie Song To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Richard Cochran CC: , , , , , , Guangjie Song , Subject: [PATCH 05/26] clk: mediatek: Add gate ops without disable Date: Fri, 7 Mar 2025 11:27:01 +0800 Message-ID: <20250307032942.10447-6-guangjie.song@mediatek.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20250307032942.10447-1-guangjie.song@mediatek.com> References: <20250307032942.10447-1-guangjie.song@mediatek.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250306_193246_853919_4AA8F9AF X-CRM114-Status: GOOD ( 10.58 ) 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 Add gate ops without .disable and the ops is used for gate which is not allowed to disable but cannot affect its parent clock to disable. Signed-off-by: Guangjie Song --- drivers/clk/mediatek/clk-gate.c | 6 ++++++ drivers/clk/mediatek/clk-gate.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/clk/mediatek/clk-gate.c b/drivers/clk/mediatek/clk-gate.c index be6cf4a6d246..a36136c61252 100644 --- a/drivers/clk/mediatek/clk-gate.c +++ b/drivers/clk/mediatek/clk-gate.c @@ -273,6 +273,12 @@ const struct clk_ops mtk_clk_gate_ops_setclr = { }; EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_setclr); +const struct clk_ops mtk_clk_gate_ops_setclr_enable = { + .is_enabled = mtk_cg_bit_is_cleared, + .enable = mtk_cg_enable, +}; +EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_setclr_enable); + const struct clk_ops mtk_clk_gate_ops_setclr_inv = { .is_enabled = mtk_cg_bit_is_set, .enable = mtk_cg_enable_inv, diff --git a/drivers/clk/mediatek/clk-gate.h b/drivers/clk/mediatek/clk-gate.h index 7d93fc84ad51..d992e3edd457 100644 --- a/drivers/clk/mediatek/clk-gate.h +++ b/drivers/clk/mediatek/clk-gate.h @@ -16,6 +16,7 @@ struct device; struct device_node; extern const struct clk_ops mtk_clk_gate_ops_setclr; +extern const struct clk_ops mtk_clk_gate_ops_setclr_enable; extern const struct clk_ops mtk_clk_gate_ops_setclr_inv; extern const struct clk_ops mtk_clk_gate_ops_no_setclr; extern const struct clk_ops mtk_clk_gate_ops_no_setclr_inv;