Thread (26 messages) 26 messages, 4 authors, 2025-11-11

Re: [PATCH v6 4/6] clk: samsung: add Exynos ACPM clock driver

From: Tudor Ambarus <tudor.ambarus@linaro.org>
Date: 2025-11-11 10:29:51
Also in: linux-clk, linux-devicetree, linux-samsung-soc, lkml


On 11/11/25 8:24 AM, Tudor Ambarus wrote:

On 11/11/25 3:39 AM, Stephen Boyd wrote:

Hi, Stephen!
quoted
Quoting Tudor Ambarus (2025-10-20 00:45:58)
quoted

On 10/20/25 7:54 AM, Krzysztof Kozlowski wrote:
quoted
quoted
diff --git a/drivers/clk/samsung/Kconfig b/drivers/clk/samsung/Kconfig
index 76a494e95027af26272e30876a87ac293bd56dfa..70a8b82a0136b4d0213d8ff95e029c52436e5c7f 100644
--- a/drivers/clk/samsung/Kconfig
+++ b/drivers/clk/samsung/Kconfig
@@ -95,6 +95,16 @@ config EXYNOS_CLKOUT
       status of the certains clocks from SoC, but it could also be tied to
       other devices as an input clock.
 
+config EXYNOS_ACPM_CLK
+    tristate "Clock driver controlled via ACPM interface"
+    depends on EXYNOS_ACPM_PROTOCOL || (COMPILE_TEST && !EXYNOS_ACPM_PROTOCOL)
I merged the patches but I don't get why we are not enabling it by
default, just like every other clock driver. What is so special here?
Thanks! Are you referring to the depends on line? I needed it otherwise
on randconfigs where COMPILE_TEST=y and EXYNOS_ACPM_PROTOCOL=n I get:

ERROR: modpost: "devm_acpm_get_by_node" [drivers/clk/samsung/clk-acpm.ko] undefined!
I don't understand that part. The depends on statement "COMPILE_TEST &&
!EXYNOS_ACPM_PROTOCOL" is equivalent to COMPILE_TEST=y and
EXYNOS_ACPM_PROTOCOL=n, so are you trying to avoid
EXYNOS_ACPM_PROTOCOL=y when COMPILE_TEST=y?
My previous comment was misleading.
The depends on line allows CONFIG_EXYNOS_ACPM_CLK to be selected in two
main scenarios:
1/ if EXYNOS_ACPM_PROTOCOL is enabled the clock driver that uses it can
   be enabled (the normal case).
2/ COMPILE_TEST is enabled AND EXYNOS_ACPM_PROTOCOL is NOT enabled. This
   is the special scenario for build testing. I want to build test the
   clock driver even if EXYNOS_ACPM_PROTOCOL is NOT enabled. For that I
   also needed the following patch:

https://lore.kernel.org/linux-samsung-soc/20251021-fix-acpm-clk-build-test-v1-1-236a3d6db7f5@linaro.org/ (local)
What I described in 2/ EXYNOS_ACPM_PROTOCOL [=n] && EXYNOS_ACPM_CLK [=y] 
can be achieved with a more relaxed:
depends on EXYNOS_ACPM_PROTOCOL || COMPILE_TEST
because of the stub (dummy method) that I referenced in the link above.

It's really what Krzysztof explained in his reply, I wanted to avoid
the link failure for COMPILE_TEST [=y] when
EXYNOS_ACPM_PROTOCOL [=m] && EXYNOS_ACPM_CLK [=y].

We have the following possibilities with:
depends on EXYNOS_ACPM_PROTOCOL || (COMPILE_TEST && !EXYNOS_ACPM_PROTOCOL)
1/ CONMPILE_TEST=n
EXYNOS_ACPM_PROTOCOL=n EXYNOS_ACPM_CLK=n
EXYNOS_ACPM_PROTOCOL=m EXYNOS_ACPM_CLK=n,m
EXYNOS_ACPM_PROTOCOL=y EXYNOS_ACPM_CLK=n,m,y

2/COMPILE_TEST=y
EXYNOS_ACPM_PROTOCOL=n EXYNOS_ACPM_CLK=n,m,y
EXYNOS_ACPM_PROTOCOL=m EXYNOS_ACPM_CLK=n,m
EXYNOS_ACPM_PROTOCOL=y EXYNOS_ACPM_CLK=n,m,y

We have the following possibilities with:
depends on EXYNOS_ACPM_PROTOCOL || COMPILE_TEST
1/ CONMPILE_TEST=n
EXYNOS_ACPM_PROTOCOL=n EXYNOS_ACPM_CLK=n
EXYNOS_ACPM_PROTOCOL=m EXYNOS_ACPM_CLK=n,m
EXYNOS_ACPM_PROTOCOL=y EXYNOS_ACPM_CLK=n,m,y

2/COMPILE_TEST=y
EXYNOS_ACPM_PROTOCOL=n EXYNOS_ACPM_CLK=n,m,y
EXYNOS_ACPM_PROTOCOL=m EXYNOS_ACPM_CLK=n,m,y <- link failure when y
EXYNOS_ACPM_PROTOCOL=y EXYNOS_ACPM_CLK=n,m,y

Thanks,
ta
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help