All of lore.kernel.org
 help / color / mirror / Atom feed
* nct7802 mode selection for RTD1,2,3 via device tree?
@ 2021-09-09  0:39 Oskar Senft
  2021-09-09 17:02 ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Oskar Senft @ 2021-09-09  0:39 UTC (permalink / raw)
  To: linux-hwmon; +Cc: Guenter Roeck, Jean Delvare

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-10 15:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09  0:39 nct7802 mode selection for RTD1,2,3 via device tree? Oskar Senft
2021-09-09 17:02 ` Guenter Roeck
2021-09-10 13:09   ` Oskar Senft
2021-09-10 15:36     ` Guenter Roeck
2021-09-10 15:54       ` Oskar Senft

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.