]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: mediatek: Pass device to clk_hw_register for PLLs
authorNicolas Frattaroli <nicolas.frattaroli@collabora.com>
Mon, 15 Dec 2025 10:24:00 +0000 (11:24 +0100)
committerStephen Boyd <sboyd@kernel.org>
Fri, 23 Jan 2026 01:44:33 +0000 (17:44 -0800)
commitecffd05839b32f17bde1f3701b68ab182a837b07
tree386146eea9606b3b0ebdd5d262e964b255f0a21d
parentc9ced38af56fe6411118c6bc6522eab80849326d
clk: mediatek: Pass device to clk_hw_register for PLLs

Passing the struct device pointer to clk_hw_register allows for runtime
power management to work for the registered clock controllers. However,
the mediatek PLL clocks do not do this.

Change this by adding a struct device pointer argument to
mtk_clk_register_pll, and fix up the only other user of it. Also add a
new member to the struct mtk_clk_pll for the struct device pointer,
which is set by mtk_clk_register_pll and is used by
mtk_clk_register_pll_ops.

If mtk_clk_register_pll is called with a NULL struct device pointer,
then everything still works as expected; the clock core will simply
treat them as previously, i.e. without runtime power management.

Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mediatek/clk-pll.c
drivers/clk/mediatek/clk-pll.h
drivers/clk/mediatek/clk-pllfh.c