linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: phinex <phinex@realtek.com>, jdelvare@suse.com
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] hwmon: drivetemp: support to be a platform driver for thermal_of
Date: Wed, 15 Mar 2023 07:16:20 -0700	[thread overview]
Message-ID: <64e3ecac-6684-1989-02c5-06fc0e755631@roeck-us.net> (raw)
In-Reply-To: <20230315121606.GA71707@threadripper>

On 3/15/23 05:16, phinex wrote:
> Support thermal zone so that we can just rely on dts to describe a
> thermal zone and do the cooling operations.
> 
> You can define a comptible string "drivetemp,hdd-sensors" to enable
> this, such as
> 
> 	sata_port0: sata-port@0 {
> 		compatible = "drivetemp,hdd-sensors";
> 		#thermal-sensor-cells = <0>;
> 	}
> 
> Then define a thermal with this sensor to get it work.
> 
>                 hdd_thermal: hdd-thermal {
>                         thermal-sensors = <&sata_port0>;
> 		}
> 
> In most of the SoC systems, using dts to handle cooling is common.
> This can eliminate the usage of user space application to check
> the value exported in hwmon and then through sysfs to cooling.
> 
> Signed-off-by: phinex <phinex@realtek.com>
> 

The driver registers drivetemp instances with the hwmon core using
HWMON_C_REGISTER_TZ. That means there should already be a thermal zone
for each instance. If that doesn't work, please find out why and fix it
instead of replicating what the hwmon core already is supposed to be
doing.

Guenter


  parent reply	other threads:[~2023-03-15 14:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 12:16 [PATCH v1] hwmon: drivetemp: support to be a platform driver for thermal_of phinex
2023-03-15 13:11 ` Krzysztof Kozlowski
2023-03-15 14:02   ` Phinex Hung
2023-03-15 14:06     ` Krzysztof Kozlowski
2023-03-15 14:16 ` Guenter Roeck [this message]
2023-03-15 15:06 ` kernel test robot
2023-03-15 15:36 ` Guenter Roeck
2023-03-16  2:21   ` Phinex Hung
2023-03-16  3:02     ` Guenter Roeck
2023-03-16  3:29       ` Phinex Hung
2023-03-16  5:07         ` Guenter Roeck
2023-03-16  7:35           ` Phinex Hung
2023-03-16  7:48             ` Phinex Hung
2023-03-16 13:22               ` Guenter Roeck
2023-03-16 14:17                 ` Phinex Hung
2023-03-16 18:17                   ` Guenter Roeck
2023-03-17  2:25                     ` Phinex Hung
2023-03-15 21:15 ` kernel test robot
2023-03-15 22:28 ` kernel test robot
2023-03-21  6:02 ` [PATCH v2] hwmon: fix potential sensor registration fail if of_node is missing Phinex Hung

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=64e3ecac-6684-1989-02c5-06fc0e755631@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phinex@realtek.com \
    /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).