summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorYao Zi <ziyao@disroot.org>2025-06-23 09:34:45 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-07-10 15:57:39 +0200
commit34cbe5543bec9040f26fc1bc4e835aeb6e03a884 (patch)
treecf7d246b8fa7693f01b1b9b30c7a43e8569a94df /Documentation
parentf61db0a69d0b0cef88c8c8c032ad628c4b2b1897 (diff)
downloadlinux-34cbe5543bec9040f26fc1bc4e835aeb6e03a884.tar.gz
linux-34cbe5543bec9040f26fc1bc4e835aeb6e03a884.tar.bz2
linux-34cbe5543bec9040f26fc1bc4e835aeb6e03a884.zip
dt-bindings: serial: 8250: Make clocks and clock-frequency exclusive
commit 09812134071b3941fb81def30b61ed36d3a5dfb5 upstream. 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: e69f5dc623f9 ("dt-bindings: serial: Convert 8250 to json-schema") Cc: stable <stable@kernel.org> Signed-off-by: Yao Zi <ziyao@disroot.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20250623093445.62327-1-ziyao@disroot.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/serial/8250.yaml2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml
index fa767440f281..ca59e2c1d255 100644
--- a/Documentation/devicetree/bindings/serial/8250.yaml
+++ b/Documentation/devicetree/bindings/serial/8250.yaml
@@ -44,7 +44,7 @@ allOf:
- ns16550
- ns16550a
then:
- anyOf:
+ oneOf:
- required: [ clock-frequency ]
- required: [ clocks ]