Commit a0907422 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

thermal: core: Update thermal zone registration documentation

The thermal sysfs API document is outdated.  One of the problems with
it is that is still documents thermal_zone_device_register() which
does not exit any more and it does not reflect the current thermal
zone operations definition.

Replace the thermal_zone_device_register() description in it with
a thermal_zone_device_register_with_trips() description, including
an update of the thermal zone operations list.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/2767845.mvXUDI8C0e@rjwysocki.net
parent d955d7ce
...@@ -4,8 +4,6 @@ Generic Thermal Sysfs driver How To ...@@ -4,8 +4,6 @@ Generic Thermal Sysfs driver How To
Written by Sujith Thomas <sujith.thomas@intel.com>, Zhang Rui <rui.zhang@intel.com> Written by Sujith Thomas <sujith.thomas@intel.com>, Zhang Rui <rui.zhang@intel.com>
Updated: 2 January 2008
Copyright (c) 2008 Intel Corporation Copyright (c) 2008 Intel Corporation
...@@ -38,23 +36,23 @@ temperature) and throttle appropriate devices. ...@@ -38,23 +36,23 @@ temperature) and throttle appropriate devices.
:: ::
struct thermal_zone_device struct thermal_zone_device *
*thermal_zone_device_register(char *type, thermal_zone_device_register_with_trips(const char *type,
int trips, int mask, void *devdata, const struct thermal_trip *trips,
struct thermal_zone_device_ops *ops, int num_trips, void *devdata,
const struct thermal_zone_params *tzp, const struct thermal_zone_device_ops *ops,
int passive_delay, int polling_delay)) const struct thermal_zone_params *tzp,
unsigned int passive_delay,
unsigned int polling_delay)
This interface function adds a new thermal zone device (sensor) to This interface function adds a new thermal zone device (sensor) to the
/sys/class/thermal folder as `thermal_zone[0-*]`. It tries to bind all the /sys/class/thermal folder as `thermal_zone[0-*]`. It tries to bind all the
thermal cooling devices registered at the same time. thermal cooling devices registered to it at the same time.
type: type:
the thermal zone type. the thermal zone type.
trips: trips:
the total number of trip points this thermal zone supports. the table of trip points for this thermal zone.
mask:
Bit string: If 'n'th bit is set, then trip point 'n' is writable.
devdata: devdata:
device private data device private data
ops: ops:
...@@ -67,32 +65,29 @@ temperature) and throttle appropriate devices. ...@@ -67,32 +65,29 @@ temperature) and throttle appropriate devices.
.get_temp: .get_temp:
get the current temperature of the thermal zone. get the current temperature of the thermal zone.
.set_trips: .set_trips:
set the trip points window. Whenever the current temperature set the trip points window. Whenever the current temperature
is updated, the trip points immediately below and above the is updated, the trip points immediately below and above the
current temperature are found. current temperature are found.
.get_mode: .change_mode:
get the current mode (enabled/disabled) of the thermal zone. change the mode (enabled/disabled) of the thermal zone.
.set_trip_temp:
- "enabled" means the kernel thermal management is set the temperature of a given trip point.
enabled. .get_crit_temp:
- "disabled" will prevent kernel thermal driver action get the critical temperature for this thermal zone.
upon trip points so that user applications can take
charge of thermal management.
.set_mode:
set the mode (enabled/disabled) of the thermal zone.
.get_trip_type:
get the type of certain trip point.
.get_trip_temp:
get the temperature above which the certain trip point
will be fired.
.set_emul_temp: .set_emul_temp:
set the emulation temperature which helps in debugging set the emulation temperature which helps in debugging
different threshold temperature points. different threshold temperature points.
.get_trend:
get the trend of most recent zone temperature changes.
.hot:
hot trip point crossing handler.
.critical:
critical trip point crossing handler.
tzp: tzp:
thermal zone platform parameters. thermal zone platform parameters.
passive_delay: passive_delay:
number of milliseconds to wait between polls when number of milliseconds to wait between polls when performing passive
performing passive cooling. cooling.
polling_delay: polling_delay:
number of milliseconds to wait between polls when checking number of milliseconds to wait between polls when checking
whether trip points have been crossed (0 for interrupt driven systems). whether trip points have been crossed (0 for interrupt driven systems).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment