Thermal/int340x: Add common thermal zone handler
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Fri, 16 Jan 2015 23:59:03 +0000 (15:59 -0800)
committerZhang Rui <rui.zhang@intel.com>
Tue, 20 Jan 2015 01:29:35 +0000 (09:29 +0800)
commit5fbf7f27fa3da2c7b538772cfe3340391ef8b3b9
tree4258a014545ddf26bc29a86ef91dff9b37aa15a6
parentec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc
Thermal/int340x: Add common thermal zone handler

Most of the processing for each int340x driver to add a thermal zone
is very similar and every driver has to duplicate code.
Created a common module, which exports API to add and remove zones.
In this way, we not only avoid duplicate code but also helps in
bug fixes and enhancements.
If for some driver default processing for thermal zone callback is
not enough they can overide individual callback.
The code for this driver is primarily copied from int3402_thermal.c.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/int340x_thermal/Makefile
drivers/thermal/int340x_thermal/int340x_thermal_zone.c [new file with mode: 0644]
drivers/thermal/int340x_thermal/int340x_thermal_zone.h [new file with mode: 0644]