lkml.org 
[lkml]   [2023]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v1] hwmon: drivetemp: support to be a platform driver for thermal_of
    From
    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

    \
     
     \ /
      Last update: 2023-03-27 01:01    [W:3.172 / U:0.868 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site