[PATCH 11/13] dt-bindings: serial: restrict possible child node names

From: Krzysztof Kozlowski
Date: Mon Jan 23 2023 - 10:14:29 EST


The re-usable serial.yaml schema matches every property with ".*"
pattern, thus any other schema referencing it will not report unknown
(unevaluated) properties. This hides several wrong properties. It is
a limitation of dtschema, thus provide a simple workaround: expect
children to be only of few names matching upstream usage (Bluetooth,
GNSS, GPS and MCU).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
---
Documentation/devicetree/bindings/serial/serial.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/serial/serial.yaml b/Documentation/devicetree/bindings/serial/serial.yaml
index 11e822bf09e2..21992e9a3c2b 100644
--- a/Documentation/devicetree/bindings/serial/serial.yaml
+++ b/Documentation/devicetree/bindings/serial/serial.yaml
@@ -96,7 +96,7 @@ then:
rts-gpios: false

patternProperties:
- ".*":
+ "^bluetooth|gnss|gps|mcu$":
if:
type: object
then:
--
2.34.1