From: Guenter Roeck <linux@roeck-us.net>
To: wenswang@yeah.net
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
jdelvare@suse.com, corbet@lwn.net, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 2/2] hwmon: add MP2925 and MP2929 driver
Date: Thu, 25 Sep 2025 08:07:55 -0700 [thread overview]
Message-ID: <ae5ad599-e857-4124-b6a0-61196a763109@roeck-us.net> (raw)
In-Reply-To: <20250918080603.1154497-2-wenswang@yeah.net>
On Thu, Sep 18, 2025 at 04:06:03PM +0800, wenswang@yeah.net wrote:
> From: Wensheng Wang <wenswang@yeah.net>
>
> Add support for MPS VR mp2925 and mp2929 controller. This driver exposes
> telemetry and limit value readings and writtings.
>
> Signed-off-by: Wensheng Wang <wenswang@yeah.net>
I'll have to drop this series. Reason:
> --- /dev/null
> +++ b/drivers/hwmon/pmbus/mp2925.c
...
> +
> +static int mp2925_write_word_data(struct i2c_client *client, int page, int reg,
> + u16 word)
> +{
> + int ret;
> +
> + switch (reg) {
> + case PMBUS_VIN_OV_FAULT_LIMIT:
> + case PMBUS_VIN_OV_WARN_LIMIT:
> + case PMBUS_VIN_UV_WARN_LIMIT:
> + case PMBUS_VIN_UV_FAULT_LIMIT:
> + /*
> + * The PMBUS_VIN_OV_FAULT_LIMIT, PMBUS_VIN_OV_WARN_LIMIT,
> + * PMBUS_VIN_UV_WARN_LIMIT and PMBUS_VIN_UV_FAULT_LIMIT
> + * of MP2925 is linear11 format, and the exponent is a
> + * constant value(5'b11100), so the exponent of word
> + * parameter should be converted to 5'b11100(0x1C).
> + */
> + ret = pmbus_write_word_data(client, page, reg,
> + mp2925_linear_exp_transfer(word, 0x1C));
> + if (ret < 0)
> + return ret;
> + break;
> + case PMBUS_VOUT_OV_FAULT_LIMIT:
> + case PMBUS_VOUT_UV_FAULT_LIMIT:
> + ret = pmbus_write_word_data(client, page, reg,
> + (ret & ~GENMASK(11, 0)) |
^^^
As 0-day rightfully reports, ret is not initialized here. Datasheets for both chips
are not published (actually the chips don't officially exist), so I can not figure out
the expected behavior myself. FWIW, available datasheets suggest that the bits are unused,
so if that is not correct please provide evidence that writing anything but 0 into those
bits is needed.
While at it, please also provide evidence that the chips exist in the first place
and that this is not a "let's see what he accepts" submission.
Guenter
next prev parent reply other threads:[~2025-09-25 15:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 8:03 [PATCH v2 0/2] hwmon: Add support for MPS mp2925 and mp2929 chip wenswang
2025-09-18 8:06 ` [PATCH v2 1/2] dt-bindings: hwmon: Add MPS mp2925 and mp2929 wenswang
2025-09-18 8:06 ` [PATCH v2 2/2] hwmon: add MP2925 and MP2929 driver wenswang
2025-09-24 14:55 ` Guenter Roeck
2025-09-25 15:07 ` Guenter Roeck [this message]
2025-09-24 14:53 ` [PATCH v2 1/2] dt-bindings: hwmon: Add MPS mp2925 and mp2929 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=ae5ad599-e857-4124-b6a0-61196a763109@roeck-us.net \
--to=linux@roeck-us.net \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzk+dt@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=wenswang@yeah.net \
/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
all inboxes | Powered by JetHome®