Previously we discussed how to implement dt-schema for audio clock controller in
Amlogic SoC [1]. Also, there was an earlier attempt to convert to yaml [2].
Let me remind you that the problem is that only "pclk" clock of this controller.
Other clocks are optional and they are allowed to be not routed.
I can suggest two approaches how to deal with this. Could you please tell me
which of them is more correct?
Approach 1: use 'additionalItems' to declare optional clocks.
Pros:
- it is short and simple;
- no need to modify existing DTSIs.
Cons:
- checking works but 'additionalItems' doesn't expect no-boolean value [3]
- there is reasoning that all clocks should be specified ragardless if they are
used or not [3][4].
Approach 2: assume that all clocks are mandatory and declare all of them.
Pros:
- it is more common and compatible with existing meta-schemas;
- may be architecturally it is more correct.
Cons:
- boilerplate in schema and in DTSIs;
- requires modification of existing DTSIs.
Links:
[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/linux-devicetree/[email protected]/
[3] https://lore.kernel.org/lkml/[email protected]/
[4] https://lore.kernel.org/lkml/[email protected]/
--
2.34.1