]> Gentwo Git Trees - linux/.git/commit
clk: mediatek: clk-gate: Refactor mtk_clk_register_gate to use mtk_gate struct
authorLaura Nao <laura.nao@collabora.com>
Mon, 15 Sep 2025 15:19:26 +0000 (17:19 +0200)
committerStephen Boyd <sboyd@kernel.org>
Sun, 21 Sep 2025 16:35:56 +0000 (09:35 -0700)
commit8ceff24a754ac065123ae0ec9f31ec03aff55f8a
tree9c16e7d08ed249ffba30f0ba1f85ccc02f19b499
parentbe89999259376eba724a52cc31560588bd5c95d8
clk: mediatek: clk-gate: Refactor mtk_clk_register_gate to use mtk_gate struct

MT8196 uses a HW voter for gate enable/disable control, with
set/clr/sta registers located in a separate regmap. Refactor
mtk_clk_register_gate() to take a struct mtk_gate, and add a pointer to
it in struct mtk_clk_gate. This allows reuse of the static gate data
(including HW voter register offsets) without adding extra function
arguments, and removes redundant duplication in the runtime data struct.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Laura Nao <laura.nao@collabora.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mediatek/clk-gate.c