]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
clk: amlogic: pclk explicitly use CLK_IGNORE_UNUSED
authorJerome Brunet <jbrunet@baylibre.com>
Mon, 25 Aug 2025 14:26:32 +0000 (16:26 +0200)
committerJerome Brunet <jbrunet@baylibre.com>
Thu, 4 Sep 2025 16:27:12 +0000 (18:27 +0200)
commitc3f369363a138638edd33a6f2fa97b6770a97c96
tree56d6f4b7e0784a9bdf3fe020d78649110453ce24
parentcf03071b7c3f1537dba21a64bcd1559b5201a156
clk: amlogic: pclk explicitly use CLK_IGNORE_UNUSED

Every usage of CLK_IGNORE_UNUSED should be explicitly motivated and
documented. However, the PCLK macros used by most Amlogic platforms are
adding that flag systematically. Because of this, all pclks are marked with
CLK_IGNORE_UNUSED, without any form of distinction or motivation.

This may have been fine in the early days of CCF but it is not anymore.

Just removing the flag is not an option at this stage since it could cause
regression on existing platforms.

Instead, drop the flag from the macro definition and add it to the each
clock definition, for the existing clocks. This makes quite a nasty change
but it will make it a lot easier for people to contribute to fixing the
problem, clock by clock. It will also prevent new platform from being added
with a silent use of the flag.

Reviewed-by: Chuan Liu <chuan.liu@amlogic.com>
Link: https://lore.kernel.org/r/20250825-meson-clk-cleanup-24-v2-7-0f402f01e117@baylibre.com
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
drivers/clk/meson/a1-peripherals.c
drivers/clk/meson/axg-aoclk.c
drivers/clk/meson/axg.c
drivers/clk/meson/g12a-aoclk.c
drivers/clk/meson/g12a.c
drivers/clk/meson/gxbb-aoclk.c
drivers/clk/meson/gxbb.c
drivers/clk/meson/meson-clkc-utils.h
drivers/clk/meson/meson8b.c
drivers/clk/meson/s4-peripherals.c