Thread (16 messages) 16 messages, 4 authors, 2025-01-13

Re: [PATCH v2 1/6] dt-bindings: clock: imx8m: document nominal/overdrive properties

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2025-01-07 06:52:41
Also in: imx, linux-clk, linux-devicetree, lkml

On Mon, Jan 06, 2025 at 08:55:08PM +0100, Ahmad Fatoum wrote:
quoted
quoted
quoted
why need two flags? suppose "not set fsl,overdrive-mode" is equal to
fsl,nominal-mode
Conor had the same question on v1[1] and I have addressed this in the commit
message of v2, see above.

In short, there is unfortunately no universally applicable default.

[1]: https://lore.kernel.org/all/4e2250b3-5170-4e88-aa0a-dd796b81e78b@pengutronix.de/ (local)
But there are problem if use dts overlay because dts overlay can't support
delete property.

If one dts file use "fsl,overdrive-mode", dts overlay file can't delete
this property. "mutually exclusive optional properties" was not preferred.

mode = ["normal" | "overdrive"]
I don't see myself setting this via overlay, but if you say it's useful, we can
adjust the binding.

I am not sure what's the preference is though, should we have

  fsl,operating-mode = "normal" / "overdrive"

or 

  fsl,operating-mode = <IMX_OPMODE_NORMAL> / <IMX_OPMODE_OVERDRIVE>


Any idea? Conor?
If these are two exclusive modes (plus default), then as Frank
suggested: use enum of strings. Imagine encoding enum of 10 values with
bools as you did: that would be enourmous oneOf condition or if:then:.

Preferred is strings, but numerical values are also accepted.

Best regards,
Krzysztof

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help