]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
Thermal: initialize thermal zone device correctly
authorZhang Rui <rui.zhang@intel.com>
Fri, 30 Oct 2015 08:31:47 +0000 (16:31 +0800)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:23:47 +0000 (10:23 +0100)
commit5d526db5b2a3fdbb8a769e90a5b3037dad6671a3
tree6db838429c862b448369fb9d78be94927c13b20e
parentfe490700bbb12db33e0e35bcfc31c7dbe7207e54
Thermal: initialize thermal zone device correctly

BugLink: http://bugs.launchpad.net/bugs/1553179
commit bb431ba26c5cd0a17c941ca6c3a195a3a6d5d461 upstream.

After thermal zone device registered, as we have not read any
temperature before, thus tz->temperature should not be 0,
which actually means 0C, and thermal trend is not available.
In this case, we need specially handling for the first
thermal_zone_device_update().

Both thermal core framework and step_wise governor is
enhanced to handle this. And since the step_wise governor
is the only one that uses trends, so it's the only thermal
governor that needs to be updated.

Tested-by: Manuel Krause <manuelkrause@netscape.net>
Tested-by: szegad <szegadlo@poczta.onet.pl>
Tested-by: prash <prash.n.rao@gmail.com>
Tested-by: amish <ammdispose-arch@yahoo.com>
Tested-by: Matthias <morpheusxyz123@yahoo.de>
Reviewed-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/thermal/step_wise.c
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.h
include/linux/thermal.h