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]
Message-ID: <f1e6c2b7-d668-9aa5-32fd-9a38c901cd3e@roeck-us.net>
Date:   Sat, 11 Sep 2021 21:03:21 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Oskar Senft <osk@...gle.com>
Cc:     linux-hwmon@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, Jean Delvare <jdelvare@...e.com>,
        Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH] dt-bindings: hwmon: Add nct7802 bindings

On 9/10/21 1:44 PM, Oskar Senft wrote:
> Hi Guenter
> 
> Thanks for the quick feedback!
> 
>>> +  nuvoton,rtd-modes:
>>> +    description: |
>>> +      Select modes for the three RTDs.
>>> +
>> At the very least, "RTD" should be defined. The datasheet doesn't say explicitly,
>> but I suspect it means "Remote Temperature Diode".
> Ha, good point. As I understand, RTD means "Resistance Temperature
> Detector". But TBH, I'm not sure how that squares with Nuvoton's use
> of "LTD" for the local sensor ... sigh.
> 
>>> +      Valid values for RTD1 and RTD2 are:
>>> +        "closed",
>>> +        "current",
>>> +        "thermistor",
>>> +        "voltage"
>> I am not sure what "closed" means (the datasheet doesn't say), but I suspect it means
>> that the sensor is disabled (?). For the other modes, the translation to the standard
>> ABI is:
> Thanks for that pointer, I now found that in
> Documentation/hwmon/sysfs-interface. Given that there's no definition
> for "disabled", I guess I'll just leave that out of the device tree
> binding for now? That way we'll stay consistent with the sysfs ABI.
> 

Sure there is. A possible set of bindings - in that case for tmp421 -
is suggested with the series at
https://lore.kernel.org/linux-hwmon/cover.1631021349.git.krzysztof.adamski@nokia.com/

That specifically includes the ability to enable or disable channels
using the standard 'status' property. While that series is primarily
for the n-factor property supported by the tmp421, the same approach
can be used for all temperature sensor properties.

Guenter

> That gives us the following mapping for sysfs / device tree -> nct7802 HW:
> 2 (3904 transistor) -> 3 (voltage)
> 3 (thermal diode) -> 1 (current)
> 4 (thermistor) -> 2 (thermistor)
> 
> I'll update the device tree binding to be an array then. I also update
> the temp_type functions to support all 3 values.
> 
> Oskar.
> 



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ