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: Thu, 16 Sep 2021 15:53:33 -0400 [thread overview]
Message-ID: <CABoTLcST=74wRbtMA2SdmeHd0WmU7id05ouSfw4PFw2nJt_gLw@mail.gmail.com> (raw)
In-Reply-To: <382858f5-e833-d4b9-f189-449671992ba5@roeck-us.net>
> Ah, using the node name as indication for both sensor type and
> index ? SGTM, though we'd really need input from Rob.
> I guess one could also consider something more generic like
> "temperature-sensor@0", "voltage-sensor@0", and so on (instead
> of [mis-]using reg and a sensor-type field).
Hmm, in that case, maybe we should just remove the "sensors" section.
i2c {
#address-cells = <1>;
#size-cells = <0>;
nct7802@28 {
compatible = "nuvoton,nct7802";
reg = <0x28>;
#address-cells = <1>;
#size-cells = <0>;
temperature-sensor@0 { /* LTD */
status = "okay";
label = "my local temperature";
};
temperature-sensor@1 { /* RTD1 */
status = "okay";
mode = <0x2>; /* 3904 transistor */
label = "other temperature";
};
temperature-sensor@3 { */ RTD3 */
status = "okay";
mode = <0x3>; /* thermal diode */
label = "3rd temperature";
};
};
};
Now, with "sensors" removed and everything at "top-level", we'll need
to decide what to do if individual sensors are missing. I guess in
that case I would just leave the affected sensors alone, i.e. neither
configure nor disable them and instead read their status from HW. That
way prior uses of the nct7802 in device trees will continue to behave
as before as does the EEPROM-style configuration.
I would like to focus on the implementation of the temperature-sensor
entries for now (i.e. LTD, RTD1, RTD2, RTD3). Support for other sensor
types could be added in a separate change. Would that be acceptable?
Thanks
Oskar.
next prev parent reply other threads:[~2021-09-16 19:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 13:03 [PATCH] dt-bindings: hwmon: Add nct7802 bindings 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 [this message]
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='CABoTLcST=74wRbtMA2SdmeHd0WmU7id05ouSfw4PFw2nJt_gLw@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 \
/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;
as well as URLs for NNTP newsgroup(s).