Re: [PATCH v2 2/2] PM / devfreq: mediatek: Introduce MediaTek CCI devfreq driver
From: Krzysztof Kozlowski
Date: Tue Apr 12 2022 - 05:48:52 EST
On 12/04/2022 10:39, Johnson Wang wrote:
>>> +static struct platform_driver mtk_ccifreq_platdrv = {
>>> + .probe = mtk_ccifreq_probe,
>>> + .remove = mtk_ccifreq_remove,
>>> + .driver = {
>>> + .name = "mtk-ccifreq",
>>> + .of_match_table = of_match_ptr(mtk_ccifreq_machines),
>>
>> You use of_match_ptr() so is it possible to build it without OF? If
>> so,
>> then mtk_ccifreq_machines needs maybe_unused.
>>
>
> No, this driver must be built with OF due to our CPU arch.
COMPILE_TEST does not use your arch... There are stubs for most of
of-like functions, so !OF should build anyway.
> Should I add some dependencies in Kconfig to ensure OF is enabled?
There are different ways to solve it and it depends on what goal do you
want to achieve? One ways is to use maybe_unused and of_match_ptr. Other
way is to do not use them (skip both).
Best regards,
Krzysztof