From: Krzysztof Kozlowski <krzk@kernel.org>
To: Leo Yang <leo.yang.sy0@gmail.com>,
jdelvare@suse.com, linux@roeck-us.net, robh@kernel.org,
davem@davemloft.net, krzk+dt@kernel.org, conor+dt@kernel.org,
Leo-Yang@quantatw.com, corbet@lwn.net,
Delphine_CC_Chiu@Wiwynn.com, linux-hwmon@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org
Cc: kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2 2/2] hwmon: Add driver for TI INA232 Current and Power Monitor
Date: Fri, 10 Jan 2025 09:25:12 +0100 [thread overview]
Message-ID: <8a2f67d3-97e5-49eb-823f-480d59178e18@kernel.org> (raw)
In-Reply-To: <20250110081546.61667-3-Leo-Yang@quantatw.com>
On 10/01/2025 09:15, Leo Yang wrote:
> Support ina233 driver for Meta Yosemite V4.
>
> Driver for Texas Instruments INA233 Current and Power Monitor
> With I2C-, SMBus-, and PMBus-Compatible Interface
>
> Reported-by: kernel test robot <lkp@intel.com>
No, what did the robot report? Drop.
> Closes: https://lore.kernel.org/oe-kbuild-all/202501092213.X9mbPW5Q-lkp@intel.com/
Drop
> Closes: https://lore.kernel.org/oe-kbuild-all/202501061734.nPNdRKqO-lkp@intel.com/
Drop
> Signed-off-by: Leo Yang <Leo-Yang@quantatw.com>
> ---
> Documentation/hwmon/ina233.rst | 77 ++++++++++++++
> MAINTAINERS | 8 ++
> drivers/hwmon/pmbus/Kconfig | 9 ++
> drivers/hwmon/pmbus/Makefile | 1 +
> drivers/hwmon/pmbus/ina233.c | 184 +++++++++++++++++++++++++++++++++
> 5 files changed, 279 insertions(+)
> create mode 100644 Documentation/hwmon/ina233.rst
> create mode 100644 drivers/hwmon/pmbus/ina233.c
>
> diff --git a/Documentation/hwmon/ina233.rst b/Documentation/hwmon/ina233.rst
> new file mode 100644
> index 000000000000..41537f89bed5
> --- /dev/null
> +++ b/Documentation/hwmon/ina233.rst
> @@ -0,0 +1,77 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +Kernel driver ina233
> +====================
> +
> +Supported chips:
> +
> + * TI INA233
> +
> + Prefix: 'ina233'
> +
> + * Datasheet
> +
> + Publicly available at the TI website : https://www.ti.com/lit/ds/symlink/ina233.pdf
> +
> +Author:
> +
> + Leo Yang <Leo-Yang@quantatw.com>
> +
> +Usage Notes
> +-----------
> +
> +The shunt resistor value can be configured by a device tree property;
> +see Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml for details.
> +
> +
> +Description
> +-----------
> +
> +This driver supports hardware monitoring for TI INA233.
> +
> +The driver is a client driver to the core PMBus driver. Please see
> +Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
> +
> +The driver provides the following attributes for input voltage:
> +
> +**in1_input**
> +
> +**in1_label**
> +
> +**in1_max**
> +
> +**in1_max_alarm**
> +
> +**in1_min**
> +
> +**in1_min_alarm**
> +
> +The driver provides the following attributes for shunt voltage:
> +
> +**in2_input**
> +
> +**in2_label**
> +
> +The driver provides the following attributes for output voltage:
> +
> +**in3_input**
> +
> +**in3_label**
> +
> +**in3_alarm**
> +
> +The driver provides the following attributes for output current:
> +
> +**curr1_input**
> +
> +**curr1_label**
> +
> +**curr1_max**
> +
> +**curr1_max_alarm**
> +
> +The driver provides the following attributes for input power:
> +
> +**power1_input**
> +
> +**power1_label**
> \ No newline at end of file
You still have patch warnings. I already commented on this, so you have
to fix it everywhere.
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c575de4903db..fde1713dff9d 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -11226,6 +11226,14 @@ L: linux-fbdev@vger.kernel.org
> S: Orphan
> F: drivers/video/fbdev/imsttfb.c
>
> +INA233 HARDWARE MONITOR DRIVER
> +M: Leo Yang <Leo-Yang@quantatw.com>
> +M: Leo Yang <leo.yang.sy0@gmail.com>
One email.
> +L: linux-hwmon@vger.kernel.org
> +S: Odd Fixes
Why would we like to have unmaintained driver? Odd fixes is candidate to
removal, so shall we accept it and remove immediately?
> +F: Documentation/hwmon/ina233.rst
> +F: drivers/hwmon/pmbus/ina233.c
> +
...
> +
> + /* If INA233 skips current/power, shunt-resistor and current-lsb aren't needed. */
> + /* read rshunt value (uOhm) */
> + if (of_property_read_u32(client->dev.of_node, "shunt-resistor", &rshunt) < 0)
> + rshunt = INA233_RSHUNT_DEFAULT;
> +
> + /* read current_lsb value (uA) */
> + if (of_property_read_u16(client->dev.of_node, "ti,current-lsb", ¤t_lsb) < 0)
> + current_lsb = INA233_CURRENT_LSB_DEFAULT;
> +
> + if (!rshunt || !current_lsb) {
> + dev_err(&client->dev, "shunt-resistor and current-lsb cannot be zero.\n");
Then properties must have constraints in your schema.
> + return -EINVAL;
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-01-10 8:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 8:15 [PATCH v2 0/2] hwmon: Add support for INA233 Leo Yang
2025-01-10 8:15 ` [PATCH v2 1/2] dt-bindings: hwmon: ti,ina2xx: Add INA233 device Leo Yang
2025-01-10 8:22 ` Krzysztof Kozlowski
2025-01-10 8:36 ` Krzysztof Kozlowski
2025-01-10 8:15 ` [PATCH v2 2/2] hwmon: Add driver for TI INA232 Current and Power Monitor Leo Yang
2025-01-10 8:25 ` Krzysztof Kozlowski [this message]
2025-01-10 16:22 ` Guenter Roeck
2025-01-14 8:02 ` Leo Yang
2025-01-14 19:23 ` Guenter Roeck
2025-01-10 21:19 ` Christophe JAILLET
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=8a2f67d3-97e5-49eb-823f-480d59178e18@kernel.org \
--to=krzk@kernel.org \
--cc=Delphine_CC_Chiu@Wiwynn.com \
--cc=Leo-Yang@quantatw.com \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzk+dt@kernel.org \
--cc=leo.yang.sy0@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lkp@intel.com \
--cc=robh@kernel.org \
/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