hwmon: lm75: expose to thermal fw via DT nodes
authorEduardo Valentin <eduardo.valentin@ti.com>
Tue, 16 Jul 2013 18:54:55 +0000 (14:54 -0400)
committerAlex Shi <alex.shi@linaro.org>
Mon, 31 Mar 2014 07:47:21 +0000 (15:47 +0800)
commit42d63a4b831f8b68c474d72d25dbcf911eabd666
tree032072163e90498674bb36fd643e420b522cf911
parent17dcbf41efd82fd7a1c997d87e23e97f6c993c2e
hwmon: lm75: expose to thermal fw via DT nodes

This patch adds to lm75 temperature sensor the possibility
to expose itself as thermal zone device, registered on the
thermal framework.

The thermal zone is built only if a device tree node
describing a thermal zone for this sensor is present
inside the lm75 DT node. Otherwise, the driver behavior
will be the same.

Note: This patch has also been reviewed by Jean D. He has
requested to perform a wider inspection of possible
users of thermal and hwmon interaction API. On the other
hand, the change on this patch is acceptable on first
step of overall code change.

Cc: Jean Delvare <khali@linux-fr.org>
Cc: lm-sensors@lm-sensors.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
(cherry picked from commit 22e731838b0e337fed5f16c67aa0b954028dfe93)

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