Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Alexis Czezar Torreno" <alexisczezar.torreno@analog.com>
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v3 3/4] dt-bindings: hwmon: (pmbus/max20830): add max20830c and max20840c support
Date: Mon, 20 Jul 2026 03:21:44 +0000	[thread overview]
Message-ID: <20260720032145.B5A6C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260720-dev-max20830c-v3-3-9d06d27d6da3@analog.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The max20830 driver will reject the newly added MAX20840C device during probe due to a hardcoded IC_DEVICE_ID check.
--

--- Patch [3]: [PATCH v3 3/4] dt-bindings: hwmon: (pmbus/max20830): add max20830c and max20840c support ---
commit b032b17e50351faefc688ad31e1428a3c641197a
Author: Alexis Czezar Torreno <alexisczezar.torreno@analog.com>

dt-bindings: hwmon: (pmbus/max20830): add max20830c and max20840c support

This commit adds compatible strings for the MAX20830C and MAX20840C variants
to the max20830 device tree binding, using a fallback to adi,max20830.

> diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml
> index 214adf1a3b9e9..b7d3b6152b582 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

[Severity: Medium]
Will the driver correctly probe for the 'adi,max20840c' variant?

Looking at max20830_probe() in drivers/hwmon/pmbus/max20830.c, there is a
hardcoded string comparison for the device ID:

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);
    ...
}

If a MAX20840C device is probed via the 'adi,max20830' fallback, it seems the
buffer will start with "MAX20840", causing this check to fail and return
-ENODEV.

Does the driver need to be updated to recognize this new device ID so it does
not reject the device?

> +          - const: adi,max20830

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260720-dev-max20830c-v3-0-9d06d27d6da3@analog.com?part=3

  reply	other threads:[~2026-07-20  3:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20  3:14 [PATCH v3 0/4] Add support for MAX20830C and MAX20840C step-down DC-DC switching regulator Alexis Czezar Torreno
2026-07-20  3:14 ` [PATCH v3 1/4] dt-bindings: hwmon: (pmbus/max20830): add VOUT feedback resistor properties and complete examples Alexis Czezar Torreno
2026-07-20  3:22   ` sashiko-bot
2026-07-20  3:28     ` Torreno, Alexis Czezar
2026-07-20  3:41   ` Torreno, Alexis Czezar
2026-07-20  4:38   ` Rob Herring (Arm)
2026-07-20  3:14 ` [PATCH v3 2/4] hwmon: (pmbus/max20830): add VOUT feedback resistor scaling support Alexis Czezar Torreno
2026-07-20  3:25   ` sashiko-bot
2026-07-21  0:44     ` Torreno, Alexis Czezar
2026-07-21  1:05       ` Guenter Roeck
2026-07-21  1:13         ` Torreno, Alexis Czezar
2026-07-20  3:14 ` [PATCH v3 3/4] dt-bindings: hwmon: (pmbus/max20830): add max20830c and max20840c support Alexis Czezar Torreno
2026-07-20  3:21   ` sashiko-bot [this message]
2026-07-21  0:44     ` Torreno, Alexis Czezar
2026-07-20  4:38   ` Rob Herring (Arm)
2026-07-20  3:14 ` [PATCH v3 4/4] hwmon: (pmbus/max20830): add support for max20830c and max20840c Alexis Czezar Torreno
2026-07-20  3:29   ` sashiko-bot
2026-07-21  0:44     ` Torreno, Alexis Czezar

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=20260720032145.B5A6C1F000E9@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox