[PATCH 1/2] schemas: i2c: Avoid extra characters in i2c nodename pattern
From: Herve Codina
Date: Tue Apr 01 2025 - 04:11:36 EST
Current nodename pattern doesn't limit the end of name for an i2c node.
It can match 'i2c@10-foo'.
In order to avoid matching to an incorrect name, avoid any extra
characters in nodename pattern.
Signed-off-by: Herve Codina <herve.codina@xxxxxxxxxxx>
---
dtschema/schemas/i2c/i2c-controller.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dtschema/schemas/i2c/i2c-controller.yaml b/dtschema/schemas/i2c/i2c-controller.yaml
index 487e669..018d266 100644
--- a/dtschema/schemas/i2c/i2c-controller.yaml
+++ b/dtschema/schemas/i2c/i2c-controller.yaml
@@ -14,7 +14,7 @@ maintainers:
properties:
$nodename:
- pattern: "^i2c(@.*)?"
+ pattern: "^i2c(@.*)?$"
i2c-bus:
type: object
--
2.49.0