[PATCH 2/2] ASoC: dt-bindings: drop redundant wakeup-source definitions
Krzysztof Kozlowski
krzk at kernel.org
Tue Apr 28 01:33:35 PDT 2026
On 27/04/2026 01:40, Bui Duc Phuc wrote:
> Hi,
>
>>> The 'wakeup-source' property already has its type defined in the core
>
>
>> TYPES. It is plural.
>
>
> Thank you for pointing that out. That was a mistake in my wording.
> Regarding the two data types, I’m already aware of this and have
> discussed it in a previous patch.
>
> https://lore.kernel.org/all/CAABR9nH3hr+Y5ksD0cn3Gd9XUvmb07X7zJw0b4k_yVbnAuz9=w@mail.gmail.com/
>
>>> - wakeup-source:
>
>>> - type: boolean
>
>>> - description:
>
>>> - Flag to indicate this device can wake system (suspend/resume).
>
>>> + wakeup-source: true
>
>>
>
>> That's wrong. Commit msg is making here false statements that it is
>
>> redundant. I checked (and you should too!) and driver does clearly
>
>> device_property_read_bool() thus the property CANNOT be the second type.
>
> I think Device Tree bindings should describe the hardware capability.
Yes. And the ABI. You cannot have ABI which has an incompatible
implementation. IOW, when implementation contradicts the ABI, something
is wrong.
The question of course if read_bool() is here incompatible. From the
actual code point of view, it is compatible, but how it is documented
and how it is intended to use: it is not compatible.
Also if future schema-kernel-ABI checker gets implemented, the tool
might report here a mistake for that reason. read_bool() means property
is bool.
> If the hardware supports wakeup functionality,
> referencing the core schema is sufficient. Hardware description should
> not be constrained by the current driver implementation
> ( e.g. the use of device_property_read_bool() ).
> Bindings should remain stable and generic, while drivers can evolve over time.
So you claim that bindings can define property as integer, but drivers
can evolve and for example read it as string?
>
> Re-defining the type locally duplicates the core definition. If the
> core schema evolves,
There is no re-definition here. This is choice of subset of types.
> this approach would require touching many bindings instead of updating
> one central place.
>
> This follows the recent cleanups suggested by Rob
>
> https://lore.kernel.org/all/177628888260.592110.11727813820499601669.robh@kernel.org/
> https://lore.kernel.org/all/177679687272.1458365.1328485324673928433.robh@kernel.org/
Where is Rob's suggestion to do such cleanups for EXISTING code? I only
see that new code should come like that.
Anyway, your commit msg is for me incorrect because it misses all this
points I made. Whether the schema code is correct, I'll defer to Rob,
although I still claim the same I claimed before at v2 or v3 of your
previous work - this should have defined type.
Best regards,
Krzysztof
More information about the Linux-rockchip
mailing list