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