Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1255106iog; Tue, 14 Jun 2022 02:24:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sX78NyK6p4IbyNJL43ZVR5Xmlz+HE4jGvUkCjGZmD6dn9BrZcLx8L48YPctb+X+Zx+HoNR X-Received: by 2002:a17:90b:4f8a:b0:1e8:9018:dec9 with SMTP id qe10-20020a17090b4f8a00b001e89018dec9mr3500134pjb.89.1655198696223; Tue, 14 Jun 2022 02:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655198696; cv=none; d=google.com; s=arc-20160816; b=n7yO34L5hiaTUr4EUV1gNFA96OkfX834J0EDpO1lBGtOYmmqUdxaUf1Ok82fNrUgQ5 n2CfFRe1f+Hrt3ODE4vZpT4eYnJqfK544bBa4tRVgHcXVoxnUsDONpj3OcS5h78afe/c WitKm1/j+zSQz1P49Ca+5BUr3s+wv+4g/qvMPKfycdhoPQjGEXnOwRQt7cNnYI+NNbem tq7zrLXYy9w938KWsnYrE8worYMxL7z8Qy1jhpiWWSs6iDrWgz03qqu62FAXkXiG+FuS gcmZf+S5u1N2l1obEvx2q/LlHNyoS3wi6afK3GKLmpU12vorGp4BwAx363eiPXEHoqiE Siog== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=4NMbL92JADsLqsaROm3Mr4SWSFAKOLi9IY1kAlakopw=; b=gNy7De/LCjjfeva+cwiXBEydSlzXWFgZh4Fkm/lm5V8dPNaLJqttKWgrOUqKGC6Wny +59SPaCli0fHCDwmCfC0LP6DC0CQU04FmgAjusHMlNxJuNrA7Lf0tI5DdQguwwaP96/v 0LrXQsAP1N0VvUX/P2AehAmtiDHQiOgiVmMv08f074N90cYlv+gDLs/cCK0mHL5BfCRK Nc3FcdgV1FUsZf7ClmtOla1+r6XROcJ3LijdP4nzMJa8aQwCxktTzr28TKPNFBX55uKo f389WJBhtsLtQyHyfZ39lG5wosVQQdoJz8MC2ZlwW2i5QTD8T/ibhz6bzvZaWWObb5mO 4Nzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=JxXL3Gzu; 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 q66-20020a632a45000000b004051d97d38asi11865702pgq.438.2022.06.14.02.24.44; Tue, 14 Jun 2022 02:24:56 -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=JxXL3Gzu; 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 S1353469AbiFNJKa (ORCPT + 99 others); Tue, 14 Jun 2022 05:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351197AbiFNJK3 (ORCPT ); Tue, 14 Jun 2022 05:10:29 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 525414160C; Tue, 14 Jun 2022 02:10:28 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (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: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 7202B66016A0; Tue, 14 Jun 2022 10:10:26 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1655197827; bh=4DR1T/pSi8XL/XvHbqB/gYOloys10AlaIbBw9rkIUmI=; h=From:To:Cc:Subject:Date:From; b=JxXL3GzuRTvVROXKxCVs2uXc9PpuLPmai+GyPpWhUg7yd2Vv9PNvNbLICJwW7me6C puoUZVtkcM/QSM9zL7OP0x7a4gs2x9ju2Rdxgb36F+Nup5ZH7nlanD23aVGCF+b0bE nIDoJE3ta7oWtNlabW0J3t1HhTM7FZ0F2nf9JYOkwXynAranTaAkxRrNoiV6E3wR4k rRAoWkGDrwAEjFfATAXq/B5kAEtIK4iQjRlvE0mpJ3lQ7MWzGj2i9+GvcjopHCAs5w INO7wPuVMSiDuM7criM9rrS17TWN8ZJhJqhlM1kC5+tHB7pSCiofbs68I+JPbczPDI DKGTvxFXe3TBw== From: AngeloGioacchino Del Regno To: mturquette@baylibre.com Cc: sboyd@kernel.org, matthias.bgg@gmail.com, wenst@chromium.org, angelogioacchino.delregno@collabora.com, miles.chen@mediatek.com, chun-jie.chen@mediatek.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, rex-bc.chen@mediatek.com Subject: [PATCH] clk: mediatek: clk-mt8195-vdo0: Set rate on vdo0_dp_intf0_dp_intf's parent Date: Tue, 14 Jun 2022 11:10:20 +0200 Message-Id: <20220614091020.21472-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 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 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. Signed-off-by: AngeloGioacchino Del Regno --- 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.35.1