lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250117-kind-poodle-of-economy-c0e7c8@krzk-bin>
Date: Fri, 17 Jan 2025 09:30:53 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Leo Yang <leo.yang.sy0@...il.com>
Cc: jdelvare@...e.com, linux@...ck-us.net, robh@...nel.org, 
	krzk+dt@...nel.org, conor+dt@...nel.org, Leo-Yang@...ntatw.com, corbet@....net, 
	Delphine_CC_Chiu@...ynn.com, linux-hwmon@...r.kernel.org, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v4 1/2] dt-bindings: hwmon: ti,ina2xx: Add INA233 device

On Thu, Jan 16, 2025 at 09:52:08PM +0800, Leo Yang wrote:
> Hi Krzysztof,
> 
> On Thu, Jan 16, 2025 at 6:47 PM Krzysztof Kozlowski <krzk@...nel.org> wrote:
> >
> > > +      This value will be used to calculate the Current_LSB and current/power
> > > +      coefficient for the pmbus and to calibrate the IC.
> > > +    minimum: 32768
> > > +    maximum: 4294967295
> >
> > Uh, are these real values measurable by the device? The last one looks
> > like UINT_MAX.
> 
> According to the spec I don't see a definition of the upper limit of the
> current measurement, it all depends on how low the shunt resistance can
> be, so I'll use the upper limit of the u32 as the maximum for now, even
> though it's unlikely that this number will be present in the actual circuit.
> 
> >
> > > +    default: 32768000
> >
> > Default is 32 A? For what applications is this sensor used?
> >
> 
> According to spec 8.2.2.1 Programming the Calibration Register example,
> a Current_LSB with a maximum expected current of 15A is approximately
> 457.7uA.
> The example shows that a Current_LSB of 500 or 1000uA/bit can be used.
> So I choose 1000uA as the default value here, this value corresponds to
> the expected maximum current which is 32A (with some loss of accuracy to
>  have a larger measurement range), and yes maybe the user doesn't
> need such a large current, so the accuracy-sensitive use of the scene
> can be adjusted according to the actual measurement range of the
> expected maximum current, I'm trying to retain some flexibility for the
> user.
>

Datasheet indeed does not describe actual limits, expect 5 mA on the
pin, but that depends on shunt resistor, so fine with me:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ