All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oskar Senft <osk@google.com>
To: linux-hwmon@vger.kernel.org
Cc: Guenter Roeck <linux@roeck-us.net>, Jean Delvare <jdelvare@suse.com>
Subject: nct7802 mode selection for RTD1,2,3 via device tree?
Date: Wed, 8 Sep 2021 20:39:23 -0400	[thread overview]
Message-ID: <CABoTLcTEjKYwnFS1dB+-rGCM9BYvFBY1T1_M0OpdjqAy+M8SCQ@mail.gmail.com> (raw)

Hi everyone

We're successfully using the nct7802 driver on a TYAN S7106 mainboard
connected to an Aspeed AST2500 BMC running OpenBMC. However, on this
board the NCT7802Y has 3 thermistors connected. For that to work, we
reconfigured the "Mode Selection Register" (0x22) to have RTD1_MD,
RTD2_MD and RTD3_MD set as 0x2 (Thermistor mode). So far we simply had
a one line patch in our internal kernel repo, but we'd like to
upstream it and make it configurable.

We explicitly reference the nct7802 in our device tree. Example:

&i2c0 {
    status = "okay";

    /* Hardware monitor with temperature sensors */
    nct7802@28 {
        compatible = "nuvoton,nct7802";
        reg = <0x28>;
    };
};

Note that the DTS validator complains about not knowing about
"nuvoton,nct7802". Is that because the driver doesn't specify a
MODULE_DEVICE_TABLE of type "struct of_device_id"? I'd be happy to fix
that, too!

Anyway, I was wondering if there would be a nice way to set the
configuration for RTD1,2,3 from the device tree. I'll be happy to make
the necessary changes (there are plenty of examples), but I wanted to
check with the community and maintainers before going down any such
road.

Thanks
Oskar.

             reply	other threads:[~2021-09-09  0:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09  0:39 Oskar Senft [this message]
2021-09-09 17:02 ` nct7802 mode selection for RTD1,2,3 via device tree? Guenter Roeck
2021-09-10 13:09   ` Oskar Senft
2021-09-10 15:36     ` Guenter Roeck
2021-09-10 15:54       ` Oskar Senft

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=CABoTLcTEjKYwnFS1dB+-rGCM9BYvFBY1T1_M0OpdjqAy+M8SCQ@mail.gmail.com \
    --to=osk@google.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.