Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Michael Zavertkin" <misha.zavertkin@mail.ru>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 2/2] dt-bindings: i2c: rtl9300: add 'rtl9607c-i2c'
Date: Sat, 10 Oct 2026 06:37:39 +0000	[thread overview]
Message-ID: <sashiko-outbox-166281@kernel.org> (raw)
In-Reply-To: <9a95cfb2f09ec69af02d51d6a71e4f1a7e42cc4e.1791611999.git.misha.zavertkin@mail.ru>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: i2c: missing patternProperties restriction for rtl9607c-i2c
--

commit 9c59eaea467911b21ec4b5c1d3ef7e034bb19883
Author: Michael Zavertkin <misha.zavertkin@mail.ru>

dt-bindings: i2c: rtl9300: add 'rtl9607c-i2c'

Add realtek,rtl9607c-i2c compatible for RTL9607C SoC, deprecate the old one,
and rely on pinctrl driver for pin assignment.

> diff --git a/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml b/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
> index 5873cfdc5b3e0..7c00918f33c8d 100644
> --- a/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
> +++ b/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml

[ ... ]

> @@ -96,6 +104,16 @@ allOf:
>        required:
>          - realtek,scl
>          - clocks
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: realtek,rtl9607c-i2c
> +    then:
> +      required:
> +        - clocks
> +        - pinctrl-0
> +        - pinctrl-names

[Severity: Low]
Does this conditional block need to restrict the allowed child nodes?

The RTL9607C hardware only supports 1 channel, but the base schema permits
any child node matching '^i2c@[0-9ab]$'.

Without adding a restriction such as patternProperties: '^i2c@[1-9ab]$': false
to this block, dt_binding_check could incorrectly pass single child nodes
with invalid reg indices, like i2c@1 or i2c@b.

Since the driver ignores the SDA index during configuration, it would accept
these invalid reg values without error.

Could we restrict the pattern here to prevent invalid channel definitions?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1791611999.git.misha.zavertkin@mail.ru?part=2

      reply	other threads:[~2026-10-10  6:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-10  6:12 [PATCH v2 0/2] i2c: rtl9300: remove IO_MODE configuration Michael Zavertkin
2026-10-10  6:12 ` [PATCH v2 1/2] i2c: rtl9300: add realtek,rtl9607c-i2c compatible Michael Zavertkin
2026-10-10  6:45   ` sashiko-bot
2026-10-10  6:12 ` [PATCH v2 2/2] dt-bindings: i2c: rtl9300: add 'rtl9607c-i2c' Michael Zavertkin
2026-10-10  6:37   ` sashiko-bot [this message]

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=sashiko-outbox-166281@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=misha.zavertkin@mail.ru \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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