From: Guenter Roeck <linux@roeck-us.net>
To: sashiko-reviews@lists.linux.dev, Svyatoslav Ryhel <clamor95@gmail.com>
Cc: devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 1/3] dt-bindings: hwmon: Document SMSC EMC1402/1403/1404/1428
Date: Wed, 1 Jul 2026 07:19:25 -0700 [thread overview]
Message-ID: <86b84aaf-a5ad-41db-a765-eddfbfdb07f8@roeck-us.net> (raw)
In-Reply-To: <20260619104041.8ED151F000E9@smtp.kernel.org>
On 6/19/26 03:40, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] The device tree binding schema fails to correctly restrict the maximum number of channels for the `smsc,emc1402` and its variants (emc1412, emc1422, emc1442). By grouping it alongside `emc1403` under the `not` condition for `emc1404`/`emc1428`, it inadvertently sets the channel `reg` maximum to 2 instead of 1.
> --
>
> commit 5a834c50ed998e304e4c00fb64e4e434cbd93896
> Author: Svyatoslav Ryhel <clamor95@gmail.com>
>
> dt-bindings: hwmon: Document SMSC EMC1402/1403/1404/1428
>
> This commit documents the basic hardware layout of SMSC (now Microchip)
> EMC1402/1403/1404/1428 thermal sensors.
>
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/hwmon/smsc,emc1403.yaml
>
> [ ... ]
>
>> +allOf:
>> + - if:
>> + not:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>> + - smsc,emc1404
>> + - smsc,emc1428
>> + then:
>> + patternProperties:
>> + "^channel@([0-7])$":
>> + properties:
>> + reg:
>> + items:
>> + maximum: 2
>
> [Severity: Low]
> Does this conditional block correctly restrict the channel limits for the
> smsc,emc1402 device and its variants (emc1412, emc1422, emc1442)?
>
> By grouping the emc1402 variants with the emc1403 under the fallback
> condition (not containing emc1404/emc1428), it applies a maximum reg value
> of 2. This appears to allow up to 3 channels (0, 1, 2) to pass schema
> validation.
>
> Since the emc1402 hardware only supports 2 channels (local and 1 remote),
> should there be a separate conditional for the emc1402 family setting the
> maximum to 1?
>
I am by no means a devicetree expert, but it seems to me that Sashiko
has a point. Please take a look.
Thanks,
Guenter
next prev parent reply other threads:[~2026-07-01 14:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 10:31 [PATCH v2 0/3] hwmon: emc1403: Convert to use OF bindings and add regulator support Svyatoslav Ryhel
2026-06-19 10:31 ` [PATCH v2 1/3] dt-bindings: hwmon: Document SMSC EMC1402/1403/1404/1428 Svyatoslav Ryhel
2026-06-19 10:40 ` sashiko-bot
2026-07-01 14:19 ` Guenter Roeck [this message]
2026-06-19 10:31 ` [PATCH v2 2/3] hwmon: (emc1403) Convert to use OF bindings Svyatoslav Ryhel
2026-06-19 10:45 ` sashiko-bot
2026-07-01 14:21 ` Guenter Roeck
2026-06-19 10:31 ` [PATCH v2 3/3] hwmon: (emc1403) Add regulator support Svyatoslav Ryhel
2026-06-19 10:41 ` sashiko-bot
2026-07-01 14:24 ` Guenter Roeck
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=86b84aaf-a5ad-41db-a765-eddfbfdb07f8@roeck-us.net \
--to=linux@roeck-us.net \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--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