From: Guenter Roeck <linux@roeck-us.net>
To: Oskar Senft <osk@google.com>
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH] dt-bindings: hwmon: Add nct7802 bindings
Date: Sat, 11 Sep 2021 21:03:21 -0700 [thread overview]
Message-ID: <f1e6c2b7-d668-9aa5-32fd-9a38c901cd3e@roeck-us.net> (raw)
In-Reply-To: <CABoTLcRZ43EUVzbqWniu64PkB7Yx4RMYKjaBxaSihk+k0Ca-gA@mail.gmail.com>
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.
>
next prev parent reply other threads:[~2021-09-12 4:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 13:03 Oskar Senft
2021-09-10 16:10 ` Guenter Roeck
2021-09-10 20:44 ` Oskar Senft
2021-09-10 21:28 ` Guenter Roeck
2021-09-14 12:41 ` Oskar Senft
2021-09-14 15:08 ` Guenter Roeck
2021-09-14 17:11 ` Oskar Senft
2021-09-14 17:33 ` Guenter Roeck
2021-09-16 19:19 ` Oskar Senft
2021-09-16 19:34 ` Guenter Roeck
2021-09-16 19:53 ` Oskar Senft
2021-09-16 20:07 ` Guenter Roeck
2021-09-16 20:10 ` Oskar Senft
2021-09-17 3:09 ` Oskar Senft
2021-09-17 3:29 ` Guenter Roeck
2021-09-12 4:03 ` Guenter Roeck [this message]
2021-09-10 21:03 ` Rob Herring
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=f1e6c2b7-d668-9aa5-32fd-9a38c901cd3e@roeck-us.net \
--to=linux@roeck-us.net \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=osk@google.com \
--cc=robh+dt@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
all inboxes | Powered by JetHome®