From: sashiko-bot@kernel.org
To: "Alexis Czezar Torreno" <alexisczezar.torreno@analog.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org,
linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v5 3/4] dt-bindings: hwmon: (pmbus/max20830): add max20830c and max20840c support
Date: Thu, 30 Jul 2026 01:11:03 +0000 [thread overview]
Message-ID: <20260730011103.5BC7B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260730-dev-max20830c-v5-3-a7553f84ee74@analog.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The dt-bindings introduce `adi,max20840c` with a fallback to `adi,max20830`, asserting compatibility, but the existing `max20830` driver explicitly rejects MAX20840C hardware during probe due to a strict `IC_DEVICE_ID` string check.
--
--- Patch [3]: [PATCH v5 3/4] dt-bindings: hwmon: (pmbus/max20830): add max20830c and max20840c support ---
commit 6c40a5eeb4c4be3695032dfafd53c9b3d0333b47
Author: Alexis Czezar Torreno <alexisczezar.torreno@analog.com>
dt-bindings: hwmon: (pmbus/max20830): add max20830c and max20840c support
This commit adds compatible strings for MAX20830C and MAX20840C to the MAX20830
PMBus hardware monitoring driver bindings. It uses a fallback to adi,max20830
for the new variants.
> diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml
> index 01b7275f5b341..cc50a4ee44a27 100644
> --- a/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml
> @@ -22,7 +22,13 @@ allOf:
>
> properties:
> compatible:
> - const: adi,max20830
> + oneOf:
> + - const: adi,max20830
> + - items:
> + - enum:
> + - adi,max20830c
> + - adi,max20840c
> + - const: adi,max20830
[Severity: Medium]
Will the existing driver actually be able to probe the MAX20840C hardware
using this fallback?
Looking at max20830_probe() in drivers/hwmon/pmbus/max20830.c, there is a
strict device ID string check:
drivers/hwmon/pmbus/max20830.c:max20830_probe() {
...
if (strncmp(buf, "MAX20830", MAX20830_IC_DEVICE_ID_LENGTH - 1))
return dev_err_probe(&client->dev, -ENODEV,
"Unsupported device: '%s'\n", buf);
...
}
Will this actively reject a MAX20840C device since its ID presumably starts
with "MAX20840"?
Additionally, the commit message mentions a longer IC_DEVICE_ID, but the
I2C block read in max20830_probe() hardcodes the read length:
drivers/hwmon/pmbus/max20830.c:max20830_probe() {
...
ret = i2c_smbus_read_i2c_block_data(client, PMBUS_IC_DEVICE_ID,
MAX20830_IC_DEVICE_ID_LENGTH + 1,
buf);
...
}
Will the longer ID be truncated before validation?
>
> reg:
> maxItems: 1
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-dev-max20830c-v5-0-a7553f84ee74@analog.com?part=3
next prev parent reply other threads:[~2026-07-30 1:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 1:03 [PATCH v5 0/4] Add support for MAX20830C and MAX20840C step-down DC-DC switching regulator Alexis Czezar Torreno
2026-07-30 1:03 ` [PATCH v5 1/4] dt-bindings: hwmon: (pmbus/max20830): add VOUT feedback resistor properties and complete examples Alexis Czezar Torreno
2026-07-30 1:10 ` sashiko-bot
2026-07-30 2:36 ` Guenter Roeck
2026-07-30 1:03 ` [PATCH v5 2/4] hwmon: (pmbus/max20830): add VOUT feedback resistor scaling support Alexis Czezar Torreno
2026-07-30 1:14 ` sashiko-bot
2026-07-30 2:33 ` Guenter Roeck
2026-07-30 2:40 ` Guenter Roeck
2026-07-30 1:03 ` [PATCH v5 3/4] dt-bindings: hwmon: (pmbus/max20830): add max20830c and max20840c support Alexis Czezar Torreno
2026-07-30 1:11 ` sashiko-bot [this message]
2026-07-30 2:41 ` Guenter Roeck
2026-07-30 1:03 ` [PATCH v5 4/4] hwmon: (pmbus/max20830): add support for max20830c and max20840c Alexis Czezar Torreno
2026-07-30 1:14 ` sashiko-bot
2026-07-30 2:35 ` Guenter Roeck
2026-07-30 2:42 ` 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=20260730011103.5BC7B1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexisczezar.torreno@analog.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.