devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [QUESTION] Convert axg-audio-clkc to YAML format
@ 2024-05-08 14:42 Jan Dakinevich
  2024-05-08 14:42 ` [APPROACH 1 1/1] dt-bindings: clock: meson: " Jan Dakinevich
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jan Dakinevich @ 2024-05-08 14:42 UTC (permalink / raw)
  To: Jan Dakinevich, Conor Dooley, devicetree, Jerome Brunet,
	Kevin Hilman, Krzysztof Kozlowski, linux-amlogic,
	linux-arm-kernel, linux-clk, linux-kernel, Martin Blumenstingl,
	Michael Turquette, Neil Armstrong, Rob Herring, Stephen Boyd

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/20240419125812.983409-5-jan.dakinevich@salutedevices.com/
[2] https://lore.kernel.org/linux-devicetree/20230808194811.113087-1-alexander.stein@mailbox.org/
[3] https://lore.kernel.org/lkml/20240419210949.GA3979121-robh@kernel.org/
[4] https://lore.kernel.org/lkml/07b1ca57-49a0-4151-99bf-caac053eaa01@kernel.org/

-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-13 13:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-08 14:42 [QUESTION] Convert axg-audio-clkc to YAML format Jan Dakinevich
2024-05-08 14:42 ` [APPROACH 1 1/1] dt-bindings: clock: meson: " Jan Dakinevich
2024-05-08 14:42 ` [APPROACH 2 1/2] arm64: dts: amlogic: list all slave clocks for audio clock controller Jan Dakinevich
2024-05-08 17:50   ` Rob Herring
2024-05-12 19:06     ` Jan Dakinevich
2024-05-13 13:44       ` Rob Herring
2024-05-08 14:42 ` [APPROACH 2 2/2] dt-bindings: clock: meson: Convert axg-audio-clkc to YAML format Jan Dakinevich
2024-05-08 16:20   ` Rob Herring (Arm)

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).