LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Oskar Senft <osk@google.com>
To: Guenter Roeck <linux@roeck-us.net>
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: Fri, 10 Sep 2021 16:44:54 -0400	[thread overview]
Message-ID: <CABoTLcRZ43EUVzbqWniu64PkB7Yx4RMYKjaBxaSihk+k0Ca-gA@mail.gmail.com> (raw)
In-Reply-To: <71c17c47-ca9e-e9d2-7b89-cc25b512c06a@roeck-us.net>

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.

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.

  reply	other threads:[~2021-09-10 20:45 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 [this message]
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
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=CABoTLcRZ43EUVzbqWniu64PkB7Yx4RMYKjaBxaSihk+k0Ca-gA@mail.gmail.com \
    --to=osk@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@kernel.org \
    --subject='Re: [PATCH] dt-bindings: hwmon: Add nct7802 bindings' \
    /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

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).