[PATCH linux-next 13/33] clk: mediatek: Fix MT8135 onecell IDs after common probe migration

Akari Tsuyukusa akkun11.open at gmail.com
Sat Nov 28 17:47:25 PST 2026


Migrating the MT8135 apmixedsys clock driver to the common
probe/remove helpers stopped using CLK_*_NR for onecell data
allocation, causing an out-of-bounds registration due to a missing
dummy slot for ID 0.

Add the missing dummy slot so all clock IDs stay within bounds.

Fixes: 3dba20de43a0 ("clk: mediatek: mt8135-apmixedsys: Switch to common probe/remove helpers")
Signed-off-by: Akari Tsuyukusa <akkun11.open at gmail.com>
---
 drivers/clk/mediatek/clk-mt8135-apmixedsys.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/clk/mediatek/clk-mt8135-apmixedsys.c b/drivers/clk/mediatek/clk-mt8135-apmixedsys.c
index fe868417de48..2de7ed9b1510 100644
--- a/drivers/clk/mediatek/clk-mt8135-apmixedsys.c
+++ b/drivers/clk/mediatek/clk-mt8135-apmixedsys.c
@@ -11,6 +11,7 @@
 #include <linux/of.h>
 #include <linux/platform_device.h>
 
+#include "clk-gate.h"
 #include "clk-mtk.h"
 #include "clk-pll.h"
 
@@ -47,7 +48,13 @@ static const struct mtk_pll_data plls[] = {
 	PLL(CLK_APMIXED_VDECPLL, "vdecpll", 0x304, 0x31c, 0x80000000, 0, 21, 0x2b0, 6, 0x0, 0x308, 0),
 };
 
+static const struct mtk_gate apmixed_clks[] = {
+	GATE_DUMMY(CLK_DUMMY, "apmixed_dummy"),
+};
+
 static const struct mtk_clk_desc apmixed_desc = {
+	.clks = apmixed_clks,
+	.num_clks = ARRAY_SIZE(apmixed_clks),
 	.plls = plls,
 	.num_plls = ARRAY_SIZE(plls),
 };
-- 
2.56.0




More information about the linux-arm-kernel mailing list