When registering a thermal zone device using platform information
via bind_params, the thermal framework will always perform the
cdev binding using the lowest and highest limits (THERMAL_NO_LIMIT).
This patch changes the data structures so that it is possible
to inform what are the desired limits for each trip point
inside a bind_param. The way the binding is performed is also
changed so that it uses the new data structure.
Cc: Zhang Rui <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Eduardo Valentin <[email protected]>
When registering a new thermal_device, the thermal framework
will always add a hwmon sysfs interface.
This patch adds a flag to make this behavior optional. Now
when registering a new thermal device, the caller can
optionally inform if hwmon interface is desirable. This can
be done by means of passing a thermal_zone_params.no_hwmon == true.
In order to keep same behavior as of today, all current
calls will by default create the hwmon interface.
Cc: David Woodhouse <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Zhang Rui <[email protected]>
Suggested-by: Wei Ni <[email protected]>
Signed-off-by: Eduardo Valentin <[email protected]>
To follow the prefix names used by the thermal functions,
this patch renames notify_thermal_framework to thermal_notify_framework.
Signed-off-by: Eduardo Valentin <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
The thermal governors are part of the thermal framework,
rather than a seperate feature/module.
Because the generic thermal layer can not work without
thermal governors, and it must load the thermal governors
during its initialization.
Build them into one module in this patch.
This also fix a problem that the generic thermal layer does not
work when CONFIG_THERMAL=m and CONFIG_THERMAL_GOV_XXX=y.
Signed-off-by: Zhang Rui <[email protected]>
Acked-by: Eduardo Valentin <[email protected]>
Acked-by: Durgadoss R <[email protected]>
Because this feature is for debuging purposes, it is highly
recommended to do not enable this on production systems.
This patch adds warnings for system integrators, so that
people are aware of this potential security issue.
Signed-off-by: Eduardo Valentin <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
This patch adds support to set the emulated temperature method in
thermal zone (sensor). After setting this feature thermal zone may
report this temperature and not the actual temperature. The emulation
implementation may be based on sensor capability through platform
specific handler or pure software emulation if no platform handler defined.
This is useful in debugging different temperature threshold and its
associated cooling action. Critical threshold's cannot be emulated.
Writing 0 on this node should disable emulation.
Signed-off-by: Amit Daniel Kachhap <[email protected]>
Acked-by: Kukjin Kim <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
This patch changes the function thermal_generate_netlink_event
to receive a thermal zone device instead of a originator id.
This way, the messages will always be bound to a thermal zone.
Signed-off-by: Eduardo Valentin <[email protected]>
Reviewed-by: Durgadoss R <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
This patch adds documentation for thermal_bind_params
and thermal_zone_params structures. Also, adds details
on EXPORT_SYMBOL APIs.
Signed-off-by: Durgadoss R <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
set upper and lower limits when binding
a thermal cooling device to a thermal zone device.
Signed-off-by: Zhang Rui <[email protected]>
Reviewed-by: Rafael J. Wysocki <[email protected]>
Reviewed-by: Eduardo Valentin <[email protected]>
With commit 6503e5df08,
the value of /sys/class/thermal/thermal_zoneX/mode has been changed
from user/kernel to enabled/disabled.
Update the documentation so that users won't be confused.
Signed-off-by: Zhang Rui <[email protected]>
Signed-off-by: Len Brown <[email protected]>
The Linux Thermal Framework does not support hysteresis
attributes. Most thermal sensors, today, have a
hysteresis value associated with trip points.
This patch adds hysteresis attributes on a per-trip-point
basis, to the Thermal Framework. These attributes are
optionally writable.
Signed-off-by: Durgadoss R <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
Signed-off-by: Len Brown <[email protected]>
Some of the thermal drivers using the Generic Thermal Framework
require (all/some) trip points to be writeable. This patch makes
the trip point temperatures writeable on a per-trip point basis,
and modifies the required function call in thermal.c. This patch
also updates the Documentation to reflect the new change.
Signed-off-by: Durgadoss R <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
Signed-off-by: Len Brown <[email protected]>
It doesn't seem right for the thermal subsystem to export a symbol
named generate_netlink_event. This function is thermal-specific and
its name should reflect that fact. Rename it to
thermal_generate_netlink_event.
Signed-off-by: Jean Delvare <[email protected]>
Acked-by: Rafael J. Wysocki <[email protected]>
Acked-by: R.Durgadoss <[email protected]>
Signed-off-by: Len Brown <[email protected]>
This patch adds event notification support to the generic
thermal sysfs framework in the kernel. The notification is in the
form of a netlink event.
Signed-off-by: R.Durgadoss <[email protected]>
Signed-off-by: Len Brown <[email protected]>
Values below 1000 milli-celsius don't make sense and can cause the
system to go into a thermal heart attack: the actual temperature
will always be lower and thus the system will be throttled down to
its lowest setting.
An additional problem is that values below 1000 will show as 0 in
/proc/acpi/thermal/TZx/trip_points:passive.
cat passive
0
echo -n 90 >passive
bash: echo: write error: Invalid argument
echo -n 90000 >passive
cat passive
90000
Signed-off-by: Frans Pop <[email protected]>
Acked-by: Zhang Rui <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Len Brown <[email protected]>
The document currently uses large indentations which make the text
too wide for easy readability. Also improve general consistency.
Signed-off-by: Frans Pop <[email protected]>
Acked-by: Zhang Rui <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Len Brown <[email protected]>
Update the documentation for the thermal driver hwmon sys I/F.
Change the ACPI thermal zone type to be consistent with hwmon.
Signed-off-by: Zhang Rui <[email protected]>
Acked-by: Jean Delvare <[email protected]>
Signed-off-by: Len Brown <[email protected]>