Re: [PATCH dt-schema] schemas: i2c: Allow '-' in 'i2c-.*' node names
Rob Herring <[email protected]> Tue, 20 May 2025 07:29:28 -0500
| Newsgroups | org.kernel.vger.devicetree-spec,org.kernel.vger.linux-i2c |
|---|---|
| Message-ID | <CAL_JsqL6CdmrCTbvbFEUjhbd+yDtd9Jf9r+OcV0imcoB117iAg@mail.gmail.com> |
On Tue, May 20, 2025 at 4:25 AM Wolfram Sang <[email protected]> wrote: > > On Mon, May 19, 2025 at 08:18:53PM -0500, Rob Herring wrote: > > On Mon, May 19, 2025 at 1:45 PM Wolfram Sang > > <[email protected]> wrote: > > > > > > 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# > > > > IMO, we should change the node name to "i2c-0". While I'm on the fence > > whether it's worth changing these, I do think it is worth not getting > > new ones. > > It is hard changing the existing ones. They are numbered based on the > numbers of GPIO based I2C busses only. If we drop "gpio-", they need to > be mixed with other non-GPIO busses. That numbering is usually unique > per board and can't be automated. I don't understand. For arm32, I see 1 case of possibly already having an i2c-[0-9] name and that's in arch/arm/boot/dts/samsung/exynos5250-arndale.dts. The non-GPIO I2C buses are all MMIO and have unit addresses (and also aren't at the root level). The hardest part is doing a dtb->dts pass and comparing those before and after to make sure you haven't combined or split nodes. Rob