From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: devicetree-spec@vger.kernel.org
Cc: linux-i2c@vger.kernel.org,
Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: [PATCH dt-schema] schemas: i2c: Allow '-' in 'i2c-.*' node names
Date: Mon, 19 May 2025 20:43:23 +0200 [thread overview]
Message-ID: <20250519184530.21845-1-wsa+renesas@sang-engineering.com> (raw)
When allowing extended i2c node names, the '-' character was not added
to the character class. Fixes the following error:
.../Kernel/linux/arch/arm/boot/dts/microchip/usb_a9g20.dtb: i2c-gpio-0 (i2c-gpio): $nodename:0: 'i2c-gpio-0' does not match '^i2c(@.+|-[a-z0-9]+)?$'
from schema $id: http://devicetree.org/schemas/i2c/i2c-gpio.yaml#
Fixes: 647181a1f8ff ("schemas: i2c: Allow for 'i2c-.*' node names")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
I don't know if it is possible to define a custom character class to
avoid similar problems in the future?
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 8488edd5ecc4..4abcf1a0ddcc 100644
--- a/dtschema/schemas/i2c/i2c-controller.yaml
+++ b/dtschema/schemas/i2c/i2c-controller.yaml
@@ -14,7 +14,7 @@ maintainers:
properties:
$nodename:
- pattern: "^i2c(@.+|-[a-z0-9]+)?$"
+ pattern: "^i2c(@.+|-[a-z0-9\\-]+)?$"
i2c-bus:
type: object
--
2.47.2
next reply other threads:[~2025-05-19 18:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 18:43 Wolfram Sang [this message]
2025-05-20 1:18 ` [PATCH dt-schema] schemas: i2c: Allow '-' in 'i2c-.*' node names Rob Herring
2025-05-20 9:25 ` Wolfram Sang
2025-05-20 12:29 ` Rob Herring
2025-05-21 9:35 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250519184530.21845-1-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=devicetree-spec@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).