From: Guenter Roeck <linux@roeck-us.net>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>,
"jdelvare@suse.com" <jdelvare@suse.com>,
"robh@kernel.org" <robh@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>
Cc: "linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] hwmon: (ina238) Add support for INA780
Date: Thu, 28 Aug 2025 14:52:23 -0700 [thread overview]
Message-ID: <af0f9569-6d27-415e-b11d-8a66a9d05c78@roeck-us.net> (raw)
In-Reply-To: <d5725c87-ff96-4a25-995a-d4c3cbcc13a9@alliedtelesis.co.nz>
On 8/28/25 14:22, Chris Packham wrote:
>
> On 29/08/2025 00:09, Guenter Roeck wrote:
>> On 8/7/25 20:05, Chris Packham wrote:
>>> Add support for the TI INA780 Digital Power Monitor. The INA780 uses
>>> EZShunt(tm) technology, which means there are fixed LSB conversions for
>>> a number of fields rather than needing to be calibrated.
>>>
>>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>>
>> Your patch does not apply, and I can't figure out its baseline. Please
>> reparent on top of the current mainline and resubmit.
> Sure no problem. The ina238 changes were done on top of my initial
> ina780 stuff so the sha1 recorded in the patch will be a local sha1 that
> you don't have. I'll clean things up on top of master without any local
> junk.
>>
>> To simplify review, the patch should be split into preparation patches
>> (such as adding .has_shunt and .temp_max options), followed by the actual
>> added chip support.
> Sure.
>>
>> Other (not a complete review):
>>
>> I don't see the value of adding INA780_COL and INA780_CUL defines;
>> those are really the same as the shunt voltage limits. Actually,
>> the current limits _are_ available for existing chips, only they
>> are expressed as voltage limits on the shunt voltages.
>
> My main motivation was trying to match the terms used in the INA780
> datasheet. INA780 uses COL/CUL, INA238 uses SOVL/SUVL. I can kind of
Yeah, only those change all the time. Just try to match register names
(or pin names, for that matter) for the chips supported by the lm90 driver.
I'd rather just add a note explaining the differences in cases like this one,
where it isn't entirely obvious.
> squint and see how they are similar the INA238 is just more complicated
> because of the external shunt. I did kind of think it must be possible
> to express the INA780 behaviour with some fixed values but my math
> skills failed me.
>
That is why I ordered those evaluation boards. Forget the math, just look
at the registers. Fortunately the TI evaluation boards are not that expensive.
Guenter
prev parent reply other threads:[~2025-08-28 21:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-08 3:05 [PATCH v2 0/2] hwmon: Add support for INA780 Chris Packham
2025-08-08 3:05 ` [PATCH v2 1/2] dt-bindings: hwmon: ti,ina2xx: Add INA780 device Chris Packham
2025-08-08 15:52 ` Conor Dooley
2025-08-08 3:05 ` [PATCH v2 2/2] hwmon: (ina238) Add support for INA780 Chris Packham
2025-08-27 16:04 ` Guenter Roeck
2025-08-27 23:28 ` Chris Packham
2025-08-28 12:09 ` Guenter Roeck
2025-08-28 20:28 ` Guenter Roeck
2025-08-28 21:22 ` Chris Packham
2025-08-28 21:52 ` Guenter Roeck [this message]
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=af0f9569-6d27-415e-b11d-8a66a9d05c78@roeck-us.net \
--to=linux@roeck-us.net \
--cc=Chris.Packham@alliedtelesis.co.nz \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzk+dt@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).