power_supply: Register power supply for thermal cooling device

This patch registers the power supply as a cooling device if the power
supply has support for charge throttling.

Now with this change low level drivers need not register with thermal
framework as it is automatically done by power supply framework.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
This commit is contained in:
Ramakrishna Pallala
2012-10-09 22:25:59 +05:30
committed by Anton Vorontsov
parent ea2ce92e44
commit 952aeeb3ee
2 changed files with 97 additions and 0 deletions

View File

@@ -188,6 +188,7 @@ struct power_supply {
struct work_struct changed_work;
#ifdef CONFIG_THERMAL
struct thermal_zone_device *tzd;
struct thermal_cooling_device *tcd;
#endif
#ifdef CONFIG_LEDS_TRIGGERS