linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: "Stephen Boyd" <sboyd@kernel.org>,
	"Alim Akhtar" <alim.akhtar@samsung.com>,
	"André Draszik" <andre.draszik@linaro.org>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Chanwoo Choi" <cw00.choi@samsung.com>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Peter Griffin" <peter.griffin@linaro.org>,
	"Rob Herring" <robh@kernel.org>,
	"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
	"Will Deacon" <will@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-clk@vger.kernel.org, willmcvicker@google.com,
	kernel-team@android.com
Subject: Re: [PATCH v6 4/6] clk: samsung: add Exynos ACPM clock driver
Date: Tue, 11 Nov 2025 12:29:44 +0200	[thread overview]
Message-ID: <5eaaf3cf-a271-467f-b015-9cb9b49590f0@linaro.org> (raw)
In-Reply-To: <c5db97fa-8789-447f-909a-edbdb55383f8@linaro.org>



On 11/11/25 8:24 AM, Tudor Ambarus wrote:
> 
> 
> On 11/11/25 3:39 AM, Stephen Boyd wrote:
> 
> Hi, Stephen!
> 
>> Quoting Tudor Ambarus (2025-10-20 00:45:58)
>>>
>>>
>>> On 10/20/25 7:54 AM, Krzysztof Kozlowski wrote:
>>>>> 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/
> 

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


  reply	other threads:[~2025-11-11 10:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-10 12:46 [PATCH v6 0/6] exynos-acpm: add DVFS protocol and clock driver Tudor Ambarus
2025-10-10 12:46 ` [PATCH v6 1/6] dt-bindings: firmware: google,gs101-acpm-ipc: add ACPM clocks Tudor Ambarus
2025-10-20  6:55   ` (subset) " Krzysztof Kozlowski
2025-10-10 12:46 ` [PATCH v6 2/6] firmware: exynos-acpm: add DVFS protocol Tudor Ambarus
2025-10-20  6:55   ` (subset) " Krzysztof Kozlowski
2025-10-10 12:46 ` [PATCH v6 3/6] firmware: exynos-acpm: register ACPM clocks pdev Tudor Ambarus
2025-10-20  6:55   ` (subset) " Krzysztof Kozlowski
2025-10-10 12:46 ` [PATCH v6 4/6] clk: samsung: add Exynos ACPM clock driver Tudor Ambarus
2025-10-20  6:54   ` Krzysztof Kozlowski
2025-10-20  7:45     ` Tudor Ambarus
2025-10-20  8:22       ` Krzysztof Kozlowski
2025-10-20  9:19         ` Tudor Ambarus
2025-10-20  9:58           ` Krzysztof Kozlowski
2025-10-20 11:02             ` Tudor Ambarus
2025-10-20 11:21               ` Krzysztof Kozlowski
2025-11-11  1:39       ` Stephen Boyd
2025-11-11  6:24         ` Tudor Ambarus
2025-11-11 10:29           ` Tudor Ambarus [this message]
2025-11-11  7:11         ` Krzysztof Kozlowski
2025-10-20  6:55   ` (subset) " Krzysztof Kozlowski
2025-10-10 12:46 ` [PATCH v6 5/6] arm64: defconfig: enable Exynos ACPM clocks Tudor Ambarus
2025-10-20  6:55   ` (subset) " Krzysztof Kozlowski
2025-10-10 12:46 ` [PATCH v6 6/6] MAINTAINERS: add ACPM clock bindings and driver Tudor Ambarus
2025-10-20  6:55   ` (subset) " Krzysztof Kozlowski
2025-10-20  7:03 ` [PATCH v6 0/6] exynos-acpm: add DVFS protocol and clock driver Krzysztof Kozlowski
2025-10-20  9:53   ` Tudor Ambarus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5eaaf3cf-a271-467f-b015-9cb9b49590f0@linaro.org \
    --to=tudor.ambarus@linaro.org \
    --cc=alim.akhtar@samsung.com \
    --cc=andre.draszik@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel-team@android.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=peter.griffin@linaro.org \
    --cc=robh@kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sboyd@kernel.org \
    --cc=will@kernel.org \
    --cc=willmcvicker@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).