Commit d3d6bd5e authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Stephen Boyd
Browse files

clk: mediatek: clk-mux: Propagate struct device for mtk-mux



Like done for other clocks, propagate struct device for mtk mux clocks
registered through clk-mux helpers to enable runtime pm support.

Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: default avatarMiles Chen <miles.chen@mediatek.com>
Link: https://lore.kernel.org/r/20230120092053.182923-7-angelogioacchino.delregno@collabora.com


Tested-by: default avatarMingming Su <mingming.su@mediatek.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 01a6c1ab
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -826,7 +826,8 @@ static int clk_mt6765_top_probe(struct platform_device *pdev)
				    clk_data);
	mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs),
				 clk_data);
	mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes), node,
	mtk_clk_register_muxes(&pdev->dev, top_muxes,
			       ARRAY_SIZE(top_muxes), node,
			       &mt6765_clk_lock, clk_data);
	mtk_clk_register_gates(&pdev->dev, node, top_clks,
			       ARRAY_SIZE(top_clks), clk_data);
+3 −2
Original line number Diff line number Diff line
@@ -1244,8 +1244,9 @@ static int clk_mt6779_top_probe(struct platform_device *pdev)

	mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);

	mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes),
			       node, &mt6779_clk_lock, clk_data);
	mtk_clk_register_muxes(&pdev->dev, top_muxes,
			       ARRAY_SIZE(top_muxes), node,
			       &mt6779_clk_lock, clk_data);

	mtk_clk_register_composites(&pdev->dev, top_aud_muxes,
				    ARRAY_SIZE(top_aud_muxes), base,
+2 −1
Original line number Diff line number Diff line
@@ -552,7 +552,8 @@ static int clk_mt6795_topckgen_probe(struct platform_device *pdev)
	if (ret)
		goto unregister_fixed_clks;

	ret = mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes), node,
	ret = mtk_clk_register_muxes(&pdev->dev, top_muxes,
				     ARRAY_SIZE(top_muxes), node,
				     &mt6795_top_clk_lock, clk_data);
	if (ret)
		goto unregister_factors;
+2 −1
Original line number Diff line number Diff line
@@ -190,7 +190,8 @@ static int clk_mt7986_infracfg_probe(struct platform_device *pdev)
		return -ENOMEM;

	mtk_clk_register_factors(infra_divs, ARRAY_SIZE(infra_divs), clk_data);
	mtk_clk_register_muxes(infra_muxes, ARRAY_SIZE(infra_muxes), node,
	mtk_clk_register_muxes(&pdev->dev, infra_muxes,
			       ARRAY_SIZE(infra_muxes), node,
			       &mt7986_clk_lock, clk_data);
	mtk_clk_register_gates(&pdev->dev, node, infra_clks,
			       ARRAY_SIZE(infra_clks), clk_data);
+2 −1
Original line number Diff line number Diff line
@@ -303,7 +303,8 @@ static int clk_mt7986_topckgen_probe(struct platform_device *pdev)
	mtk_clk_register_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks),
				    clk_data);
	mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
	mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes), node,
	mtk_clk_register_muxes(&pdev->dev, top_muxes,
			       ARRAY_SIZE(top_muxes), node,
			       &mt7986_clk_lock, clk_data);

	clk_prepare_enable(clk_data->hws[CLK_TOP_SYSAXI_SEL]->clk);
Loading