Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp329866rwj; Fri, 23 Dec 2022 01:55:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXsjMT26PZKAwCAZ6vzNm2/ipoWki4yQSFnwNuaAI9rdvhfBZxWj1KxZ2RCCxqoTxcehPQdt X-Received: by 2002:a05:6a20:2a07:b0:af:6d54:239a with SMTP id e7-20020a056a202a0700b000af6d54239amr28724570pzh.38.1671789342375; Fri, 23 Dec 2022 01:55:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671789342; cv=none; d=google.com; s=arc-20160816; b=sZDI99sHIoAe59WmUKn+oa8gYExPzeCdgG3BMpyZTT9CjiKoPDbVg7cBtyHumWZqjP RJd0hTDQiaUr3Yt5SKOQ9cPXDojl3EcRbLg2TWWyBb0PLCqLWC5nZhwLmctxaYvgWL+A XFq5844LXDapIkNSEonrJ3MI0CIwBOXEmrJ78YnQL+Wt2A0Udn3BBgDIpRwD4UGVkFwp mChNURpdCYbz/S6WmayBLt5Ss02x/+swojuvtBNxfX9fNEifKrZf66RlqUskinFDMJsk sR/slqW4kLbVD/FhuKzWHLU+kJsgbci/WDafyAXEelWJvTZRMonO0NI2294zRC3pkbI8 OPHA== 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=p1iS2XgY/3O6EWd+pIgwtxYUXmFhfzGHv81EyQIS6/Y=; b=wy+Dag/PVahQctdDDBppYZuygFkBGayfcImFo1Yfbr/UxIA06PWK8no0KFZqJ7gT4p mvjn0xXiU2qBcomFmTooqv5cPW+TvPrC0o3Dgck2Dm11ryWS56IGkfRiDKj362FOfOUQ JRUCIgtnrENgwWZYh9gJg8UR9phY5HDxwBq7l7WVFhdxnLK6Cs/J57sq2suvlcn7XVba z6jwGutj3dd7CKBA3neuFPiDEXeKNivGIfBftpKna+ALV3wv4HENAB/h1TdmowCHAMth h3Px6J2w5QQ0mFGcLp1HkqvcGX0bpctLgLS9sfuPMczCKJNMYdHG9btWeWNN0ixCKWOT EaKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ks6XI8Ul; 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 q197-20020a632ace000000b0047895cb23cdsi3084862pgq.647.2022.12.23.01.55.33; Fri, 23 Dec 2022 01:55:42 -0800 (PST) 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=ks6XI8Ul; 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 S236303AbiLWJpP (ORCPT + 67 others); Fri, 23 Dec 2022 04:45:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236131AbiLWJoY (ORCPT ); Fri, 23 Dec 2022 04:44:24 -0500 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 7DE2F37FB3; Fri, 23 Dec 2022 01:43:31 -0800 (PST) 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 1AA756602CFA; Fri, 23 Dec 2022 09:43:29 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1671788610; bh=qJD6neFrISC/cTuT2H409HfAsDBdlpEBNGJzQ7fGoL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ks6XI8UlxDNSzxfGJZE27BhA1Pa2x9TXspFKv8xIOn9zGDkc9R8kbLBOrEDikIwES sjaoQwcb4hBpOj8W6ZlaF4b4qJ6ndvA9lyGSPGoHjIc+SAnET8tlAiYupIePfPzXc9 JjUsIS9CIYVVPJGcbgAZm1p3zp2Ndg+oSocisST3C82viOYHGHhmmAg+2K3RL7N7rW mHwdZPSpoi9G1qy/+DK9ifO5+n3J7XnoQ6+hGFixqe9P/LJIFTkIGZWmcWCTt/cORr B7+nTDPrbEGQda92QNR8nCleFsipf8GiXGeqLm7bDWi6RxfAlQjYG0wX1CPw2aEB9P /eeOqaHaZZRsQ== From: AngeloGioacchino Del Regno To: mturquette@baylibre.com Cc: sboyd@kernel.org, matthias.bgg@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, angelogioacchino.delregno@collabora.com, wenst@chromium.org, johnson.wang@mediatek.com, miles.chen@mediatek.com, fparent@baylibre.com, chun-jie.chen@mediatek.com, sam.shih@mediatek.com, y.oudjana@protonmail.com, nfraprado@collabora.com, rex-bc.chen@mediatek.com, ryder.lee@kernel.org, daniel@makrotopia.org, jose.exposito89@gmail.com, yangyingliang@huawei.com, pablo.sun@mediatek.com, msp@baylibre.com, weiyi.lu@mediatek.com, ikjn@chromium.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, kernel@collabora.com Subject: [PATCH v2 16/23] clk: mediatek: mt8186: Join top_adj_div and top_muxes Date: Fri, 23 Dec 2022 10:42:52 +0100 Message-Id: <20221223094259.87373-17-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221223094259.87373-1-angelogioacchino.delregno@collabora.com> References: <20221223094259.87373-1-angelogioacchino.delregno@collabora.com> 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 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 Like done for MT8192, join the two to register them in one shot, as there's no point in doing that separately from one another. Signed-off-by: AngeloGioacchino Del Regno --- drivers/clk/mediatek/clk-mt8186-topckgen.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt8186-topckgen.c b/drivers/clk/mediatek/clk-mt8186-topckgen.c index d05143891b69..63befb1f492d 100644 --- a/drivers/clk/mediatek/clk-mt8186-topckgen.c +++ b/drivers/clk/mediatek/clk-mt8186-topckgen.c @@ -669,9 +669,6 @@ static struct mtk_composite top_muxes[] = { MUX(CLK_TOP_APLL_I2S4_MCK_SEL, "apll_i2s4_mck_sel", apll_mck_parents, 0x0320, 19, 1), MUX(CLK_TOP_APLL_TDMOUT_MCK_SEL, "apll_tdmout_mck_sel", apll_mck_parents, 0x0320, 20, 1), -}; - -static const struct mtk_composite top_adj_divs[] = { DIV_GATE(CLK_TOP_APLL12_CK_DIV0, "apll12_div0", "apll_i2s0_mck_sel", 0x0320, 0, 0x0328, 8, 0), DIV_GATE(CLK_TOP_APLL12_CK_DIV1, "apll12_div1", "apll_i2s1_mck_sel", @@ -747,26 +744,19 @@ static int clk_mt8186_topck_probe(struct platform_device *pdev) if (r) goto unregister_muxes; - r = mtk_clk_register_composites(top_adj_divs, ARRAY_SIZE(top_adj_divs), base, - &mt8186_clk_lock, clk_data, &pdev->dev); - if (r) - goto unregister_composite_muxes; - r = clk_mt8186_reg_mfg_mux_notifier(&pdev->dev, clk_data->hws[CLK_TOP_MFG]->clk); if (r) - goto unregister_composite_divs; + goto unregister_composite_muxes; r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); if (r) - goto unregister_composite_divs; + goto unregister_composite_muxes; platform_set_drvdata(pdev, clk_data); return r; -unregister_composite_divs: - mtk_clk_unregister_composites(top_adj_divs, ARRAY_SIZE(top_adj_divs), clk_data); unregister_composite_muxes: mtk_clk_unregister_composites(top_muxes, ARRAY_SIZE(top_muxes), clk_data); unregister_muxes: @@ -787,7 +777,6 @@ static int clk_mt8186_topck_remove(struct platform_device *pdev) of_clk_del_provider(node); mtk_clk_unregister_composites(top_adj_divs, ARRAY_SIZE(top_adj_divs), clk_data); - mtk_clk_unregister_composites(top_muxes, ARRAY_SIZE(top_muxes), clk_data); mtk_clk_unregister_muxes(top_mtk_muxes, ARRAY_SIZE(top_mtk_muxes), clk_data); mtk_clk_unregister_factors(top_divs, ARRAY_SIZE(top_divs), clk_data); mtk_clk_unregister_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks), clk_data); -- 2.39.0