]> git.baikalelectronics.ru Git - kernel.git/commit
clk: mediatek: Warn if clk IDs are duplicated
authorChen-Yu Tsai <wenst@chromium.org>
Tue, 8 Feb 2022 12:40:34 +0000 (20:40 +0800)
committerStephen Boyd <sboyd@kernel.org>
Thu, 17 Feb 2022 20:12:25 +0000 (12:12 -0800)
commitb338f53d0cb19b80e0a1956b30f1efda642375e3
treeb76779b2ad6518cd92ad106bbac8e1012d157aa5
parentcb0c988b2a5ec9180d09bbaa3d9050bd3632df56
clk: mediatek: Warn if clk IDs are duplicated

The Mediatek clk driver library handles duplicate clock IDs in two
different ways: either ignoring the duplicate entry, or overwriting
the old clk. Either way may cause unexpected behavior, and the latter
also causes an orphan clk that cannot be cleaned up.

Align the behavior so that later duplicate entries are ignored, and
a warning printed. The warning will also aid in making the issue
noticeable.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Miles Chen <miles.chen@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220208124034.414635-32-wenst@chromium.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mediatek/clk-cpumux.c
drivers/clk/mediatek/clk-gate.c
drivers/clk/mediatek/clk-mtk.c
drivers/clk/mediatek/clk-mux.c
drivers/clk/mediatek/clk-pll.c