From: Guenter Roeck <linux@roeck-us.net>
To: Charles Hsu <ythsu0511@gmail.com>,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, jdelvare@suse.com, corbet@lwn.net,
Delphine_CC_Chiu@Wiwynn.com, naresh.solanki@9elements.com,
peteryin.openbmc@gmail.com, patrick.rudolph@9elements.com,
alexander.stein@ew.tq-group.com, lakshmiy@us.ibm.com,
bhelgaas@google.com, michal.simek@amd.com, lukas@wunner.de,
festevam@denx.de
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,
linux-i2c@vger.kernel.org, ytshu0511@gmail.com
Subject: Re: [PATCH v2] hwmon: Add driver for MPS MPQ8785 Synchronous Step-Down Converter
Date: Mon, 29 Jan 2024 07:16:52 -0800 [thread overview]
Message-ID: <ee2f4758-0b50-449a-b74b-492814a9cc8a@roeck-us.net> (raw)
In-Reply-To: <20240129083115.2107466-1-ythsu0511@gmail.com>
On 1/29/24 00:31, Charles Hsu wrote:
> Add support for mpq8785 device from Monolithic Power Systems, Inc.
> (MPS) vendor. This is synchronous step-down controller.
>
> Signed-off-by: Charles Hsu <ythsu0511@gmail.com>
>
> ---
> Change in v1:
> Initial patchset.
> Change in v2:
> 1.Add pmbus support status registers.
> 2.Add mpq8785 in trivial-devices.yaml.
> 3.Remove format[PSC_VOLTAGE_OUT]
This is insufficient, sorry. Problem is that pmbus_identify_common()
compares the more reported by PMBUS_VOUT_MODE with the configured mode.
Not setting format[PSC_VOLTAGE_OUT] means that the mode is the default (0),
which is linear mode. If the chip is configured for direct or vid mode
this again will result in probe failure.
I can see two options:
- Add a chip configuration flag such as PMBUS_DETECT_VOUT_MODE (for lack
of a better idea) and use it in pmbus_identify_common() to actually
_set_ the mode from the VOUT_MODE command instead of expecting it
to be already set. This would require providing the coefficients for
output voltage direct mode in mpq8785_info. This would be my preferred
solution (but require a separate patch to add the code to pmbus_core.c).
- Select a fixed mode and write code to convert affected register readings
to that mode if needed. See mp5990.c for an example.
> 4.Fix MODULE_DESCRIPTION
> ---
> .../devicetree/bindings/trivial-devices.yaml | 2 +
> Documentation/hwmon/index.rst | 1 +
> Documentation/hwmon/mpq8785.rst | 94 +++++++++++++++++++
> drivers/hwmon/pmbus/Kconfig | 9 ++
> drivers/hwmon/pmbus/Makefile | 1 +
> drivers/hwmon/pmbus/mpq8785.c | 62 ++++++++++++
> 6 files changed, 169 insertions(+)
> create mode 100644 Documentation/hwmon/mpq8785.rst
> create mode 100644 drivers/hwmon/pmbus/mpq8785.c
>
> diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
> index 79dcd92c4a43..088b23ed2ae6 100644
> --- a/Documentation/devicetree/bindings/trivial-devices.yaml
> +++ b/Documentation/devicetree/bindings/trivial-devices.yaml
> @@ -129,6 +129,8 @@ properties:
> - mps,mp2975
> # Monolithic Power Systems Inc. multi-phase hot-swap controller mp5990
> - mps,mp5990
> + # Monolithic Power Systems Inc. synchronous step-down converter mpq8785
> + - mps,mpq8785
> # Honeywell Humidicon HIH-6130 humidity/temperature sensor
> - honeywell,hi6130
> # IBM Common Form Factor Power Supply Versions (all versions)
Sorry, devicetree changes require a separate patch.
Thanks,
Guenter
next prev parent reply other threads:[~2024-01-29 15:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 8:31 Charles Hsu
2024-01-29 15:16 ` Guenter Roeck [this message]
2024-01-29 15:49 ` Guenter Roeck
2024-01-31 19:04 ` Rob Herring
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=ee2f4758-0b50-449a-b74b-492814a9cc8a@roeck-us.net \
--to=linux@roeck-us.net \
--cc=Delphine_CC_Chiu@Wiwynn.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=festevam@denx.de \
--cc=jdelvare@suse.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lakshmiy@us.ibm.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=michal.simek@amd.com \
--cc=naresh.solanki@9elements.com \
--cc=patrick.rudolph@9elements.com \
--cc=peteryin.openbmc@gmail.com \
--cc=robh+dt@kernel.org \
--cc=ythsu0511@gmail.com \
--cc=ytshu0511@gmail.com \
/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®