Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4026902rwb; Tue, 16 Aug 2022 13:02:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR7EhcTHcOkBQDJhdh/BObi5r/ZjpFJ/BocS62QJe4LtYB6xIRBL/CBC7gRiPkzBJIR5PX4K X-Received: by 2002:a17:90b:3a83:b0:1f7:3d79:9e51 with SMTP id om3-20020a17090b3a8300b001f73d799e51mr224044pjb.102.1660680169645; Tue, 16 Aug 2022 13:02:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660680169; cv=none; d=google.com; s=arc-20160816; b=SWpBNyOTsTBo8XlSmWqG6NNJFmWRJ7zy1D0lSNDfYeJwZdXyKp0HzPn1zTDylG54Za LDcZJbfoUKRWtcB+JhrOn1gFcpD1b/Pz8HVdsk0U2pCfHaJPAKxpHcRp+Kd3Ljuh5f6w SdCjGARwYnF2BRCPB0lyoVZn1TBQSKpO5ppsqczTR2a5oXc7n6esPKfF9FP8oexRUp4o DGr5pCGGki/Ez/VtZDixwMp+xI4qYQY3zcDSII1kMJgfA+I2HO+Ozy4Y8dkTeOVADpkJ vBzWU4vvRzvxh/nU9hmGkCI4WFt9NZdviPxizc8jsooqxWEPrja6ghNA8U9yr7AchH8c ttyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+39HX+XU/AzeFqWmTpbHlbX4Me1OPJE5T2MCNHbdfVM=; b=EuNhVX26m/goGjGU6y6Dkj2wwiII+hxGWtZq3vxmtWPy9bPnch2vOgcAGV+U8ATyto Uz4qi3UnFziqe51EDdUZyxe98Mn/uD7QNhmT4e7I1N6op6LiPE6l22hp7H4ojfdY1A8A aAWz7nwlSxQtyAWAopg3548UV6TkDC4HH990mepLARep4LA2I++D6NrImtP9XiuM/7rU 8/f1Oh0/v/jrwAcxdgRx4QvzTC62lJFqt7FVGnXNZbFlVv5Cr3mjSwhhyU0JSew+N50D k1SERzKPP34CRmyjtQfMyZVreLvzVVS4hdbMo8n11IkEnt+K1FaLKNJXlGuiXJ6IVz3I 6m6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=F1fFftus; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w15-20020a17090a528f00b001f52214a049si13105578pjh.75.2022.08.16.13.02.36; Tue, 16 Aug 2022 13:02:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=F1fFftus; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232654AbiHPTdO (ORCPT + 99 others); Tue, 16 Aug 2022 15:33:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237166AbiHPTdK (ORCPT ); Tue, 16 Aug 2022 15:33:10 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E4C9294; Tue, 16 Aug 2022 12:33:05 -0700 (PDT) Received: from notapiano.myfiosgateway.com (unknown [70.107.189.129]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id B512F660159D; Tue, 16 Aug 2022 20:33:02 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1660678384; bh=gzvafDsmVPj6f0v0ggroSucH45xtJAA4wYHsWwciQiw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F1fFftusnvTojZEx/bskbRueFzFHVwTecmmKXB9GIseb6H/rHQNNWYoOzN0xuHVi7 U4f1/SFE1KKsQ4HA+RbdIBf0NhBc+BLRwdxQ+0v5VSLfBg8rEYbJtTqaOtGpi71VSc FYiilBB0koR2tR6gRAnqc1g0pQyiK9izl/vdsgGMucdXUlLlPxqlc3PDG1pF7SLted 5fKFav7pN6TOUgP7IWE3/2Io1ge1zt0ZAF7DQFMaoitqIGBFO/90aZ1AuscZ0+52c9 c5pmtLQ/Ndd6RHItnKRv3KHAzAPAMGZpcMi9fFXVXipTjXE/7vVgJ30pA/jmalNRof ROvb1CYSdW25w== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Michael Turquette Cc: Bo-Chen Chen , AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , Chen-Yu Tsai , Matthias Brugger , Miles Chen , Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [RESEND PATCH v3 1/2] clk: mediatek: clk-mt8195-vdo0: Set rate on vdo0_dp_intf0_dp_intf's parent Date: Tue, 16 Aug 2022 15:32:55 -0400 Message-Id: <20220816193257.658487-2-nfraprado@collabora.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220816193257.658487-1-nfraprado@collabora.com> References: <20220816193257.658487-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: AngeloGioacchino Del Regno Add the CLK_SET_RATE_PARENT flag to the CLK_VDO0_DP_INTF0_DP_INTF clock: this is required to trigger clock source selection on CLK_TOP_EDP, while avoiding to manage the enablement of the former separately from the latter in the displayport driver. Fixes: 70282c90d4a2 ("clk: mediatek: Add MT8195 vdosys0 clock support") Signed-off-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Reviewed-by: Bo-Chen Chen Signed-off-by: NĂ­colas F. R. A. Prado --- drivers/clk/mediatek/clk-mt8195-vdo0.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-mt8195-vdo0.c b/drivers/clk/mediatek/clk-mt8195-vdo0.c index 261a7f76dd3c..07b46bfd5040 100644 --- a/drivers/clk/mediatek/clk-mt8195-vdo0.c +++ b/drivers/clk/mediatek/clk-mt8195-vdo0.c @@ -37,6 +37,10 @@ static const struct mtk_gate_regs vdo0_2_cg_regs = { #define GATE_VDO0_2(_id, _name, _parent, _shift) \ GATE_MTK(_id, _name, _parent, &vdo0_2_cg_regs, _shift, &mtk_clk_gate_ops_setclr) +#define GATE_VDO0_2_FLAGS(_id, _name, _parent, _shift, _flags) \ + GATE_MTK_FLAGS(_id, _name, _parent, &vdo0_2_cg_regs, _shift, \ + &mtk_clk_gate_ops_setclr, _flags) + static const struct mtk_gate vdo0_clks[] = { /* VDO0_0 */ GATE_VDO0_0(CLK_VDO0_DISP_OVL0, "vdo0_disp_ovl0", "top_vpp", 0), @@ -85,7 +89,8 @@ static const struct mtk_gate vdo0_clks[] = { /* VDO0_2 */ GATE_VDO0_2(CLK_VDO0_DSI0_DSI, "vdo0_dsi0_dsi", "top_dsi_occ", 0), GATE_VDO0_2(CLK_VDO0_DSI1_DSI, "vdo0_dsi1_dsi", "top_dsi_occ", 8), - GATE_VDO0_2(CLK_VDO0_DP_INTF0_DP_INTF, "vdo0_dp_intf0_dp_intf", "top_edp", 16), + GATE_VDO0_2_FLAGS(CLK_VDO0_DP_INTF0_DP_INTF, "vdo0_dp_intf0_dp_intf", + "top_edp", 16, CLK_SET_RATE_PARENT), }; static int clk_mt8195_vdo0_probe(struct platform_device *pdev) -- 2.37.1