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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 22 Aug 2022 09:31:42 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     "Farber, Eliav" <farbere@...zon.com>
Cc:     jdelvare@...e.com, robh+dt@...nel.org, mark.rutland@....com,
        linux-hwmon@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, talel@...zon.com, hhhawa@...zon.com,
        jonnyc@...zon.com, hanochu@...zon.com, ronenk@...zon.com,
        itamark@...zon.com, shellykz@...zon.com, shorer@...zon.com,
        amitlavi@...zon.com, almogbs@...zon.com, dwmw@...zon.co.uk,
        rtanwar@...linear.com
Subject: Re: [PATCH v2 14/16] hwmon: (mr75203) parse thermal coefficients
 from device-tree

On Mon, Aug 22, 2022 at 04:41:07PM +0300, Farber, Eliav wrote:
> On 8/19/2022 2:38 PM, Guenter Roeck wrote:
> > On Fri, Aug 19, 2022 at 10:57:58AM +0300, Farber, Eliav wrote:
> > > On 8/18/2022 11:28 PM, Guenter Roeck wrote:
> > > > The calculation was just changed to use new defaults in a previous
> > > > patch. This patch makes it quite clear that the coefficients
> > > > are implementation (?) dependent. So the previous patch just changes
> > > > the defaults to (presumably) the coefficients used in your system.
> > > > That is inappropriate. Adding non-default corefficients is ok
> > > > and makes sense is supported by the chip, but changing defaults
> > > > isn't.
> > > The calculation was changed in previous patch to match series 5 of the
> > > Moortec Embedded Temperature Sensor (METS) datasheet.
> > > In our SOC we use series 6 which has a slightly different equation and
> > > different coefficients.
> > 
> > If the coefficients are different based on the series, it would probably
> > make sense to create a separate devicetree compatible property for
> > series 6
> > instead or requiring the user to list the actual coefficients. Those can
> > still be present, but the code should be able to use the defaults for
> > each series.
> There is a different set of coefficients for series 5 and for series 6,
> so it would make sense to add a single property (e.g. series) instead
> of adding 4 properties, one for each coefficient.
> But that would not always be enough.
> The Moortec datasheet explicitly says that coefficients can vary between
> product and product, and be different from the default values.
> That is the situation in our SOC.
> The coefficients we use are slightly different from the defaults for
> series 6.
> So just adding a single series property would not be enough, and we would
> anyway want to have the option to specifically determine the coefficient
> values.
> Do you suggest to add both, also series and also coefficients? (and I can
> fail the probe in case both are set, to avoid conflicts).
> 

It should not be necessary to provide explicit default values for any of the
series. Yes, default values can be overwritten with explicit coefficient
properties, but it should not be necessary to provide those if the defaults
are used. So I would expect separate compatible properties for each of the
supported series plus separate coefficient properties.

However, since we are discussiong DT properties here, I'll step back and let
DT maintainers decide.

Thanks,
Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ