thermal: allow registering without .get_temp
authorEduardo Valentin <eduardo.valentin@ti.com>
Thu, 12 Sep 2013 23:15:44 +0000 (19:15 -0400)
committerAlex Shi <alex.shi@linaro.org>
Mon, 31 Mar 2014 07:47:20 +0000 (15:47 +0800)
commit510a773b0f771bb320d2a59af049e1c0e7e12d4c
treed570d7f2bd22c9a2433c2a1eac9ebad6a365cf72
parentd3222d77b27a07a4b200d1b0b792e8e3bdf30396
thermal: allow registering without .get_temp

This patch changes the thermal core driver to allow
registration of thermal zones without the .get_temp callback.

The idea behind this change is to allow lazy registration
of sensor callbacks.

The thermal zone will be disabled whenever the ops
does not contain a .get_temp callback. The sysfs interface
will be returning -EINVAL on any temperature read operation.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
(cherry picked from commit 81bd4e1cebed5efb85bd94a15342ee4d6965a416)

Signed-off-by: Alex Shi <alex.shi@linaro.org>
drivers/thermal/thermal_core.c