Skip to content

Commit 0981213

Browse files
ziyao233gregkh
authored andcommitted
dt-bindings: serial: 8250: Make clocks and clock-frequency exclusive
The 8250 binding before converting to json-schema states, - clock-frequency : the input clock frequency for the UART or - clocks phandle to refer to the clk used as per Documentation/devicetree for clock-related properties, where "or" indicates these properties shouldn't exist at the same time. Additionally, the behavior of Linux's driver is strange when both clocks and clock-frequency are specified: it ignores clocks and obtains the frequency from clock-frequency, left the specified clocks unclaimed. It may even be disabled, which is undesired most of the time. But "anyOf" doesn't prevent these two properties from coexisting, as it considers the object valid as long as there's at LEAST one match. Let's switch to "oneOf" and disallows the other property if one exists, precisely matching the original binding and avoiding future confusion on the driver's behavior. Fixes: e69f5dc ("dt-bindings: serial: Convert 8250 to json-schema") Cc: stable <[email protected]> Signed-off-by: Yao Zi <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f23c52a commit 0981213

File tree

1 file changed

+1
-1
lines changed
  • Documentation/devicetree/bindings/serial

1 file changed

+1
-1
lines changed

Documentation/devicetree/bindings/serial/8250.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ allOf:
4545
- ns16550
4646
- ns16550a
4747
then:
48-
anyOf:
48+
oneOf:
4949
- required: [ clock-frequency ]
5050
- required: [ clocks ]
5151

0 commit comments

Comments
 (0)