diff options
author | Joshua Primero <jprimero@nvidia.com> | 2012-07-03 19:37:55 -0700 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-07-11 06:13:16 -0700 |
commit | a1ffbfd7ffecf7806cac3537ead90eaf48c53d71 (patch) | |
tree | 1a786062a4c9794500b17b30f65c4bd987816dcd /arch | |
parent | 4dcc319339a6a7e2685775607332f16945ac6117 (diff) |
ARM: tegra: thermal: fixed some skin thermal bugs
Fixed bug where skin cooling device is being bound to nct
device instead of skin thermal device.
bug 1007726
Change-Id: Ia6316735da8895fd4f4c20c0a76cd6796dafdf9b
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/113563
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/tegra3_thermal.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/tegra3_thermal.c b/arch/arm/mach-tegra/tegra3_thermal.c index 788a5d7b26f8..f36f84ccddf4 100644 --- a/arch/arm/mach-tegra/tegra3_thermal.c +++ b/arch/arm/mach-tegra/tegra3_thermal.c @@ -104,7 +104,7 @@ static int tegra_thermal_zone_bind(struct thermal_zone_device *thz, #ifdef CONFIG_TEGRA_SKIN_THROTTLE if ((bthrot->id == BALANCED_THROTTLE_ID_SKIN) && - (device->id == therm->throttle_edp_device_id)) + (device->id == therm->skin_device_id)) return thermal_zone_bind_cooling_device(thz, 0, cdevice); #endif @@ -288,15 +288,25 @@ static void tegra_thermal_alert_unlocked(void *data) #endif } +#ifdef CONFIG_TEGRA_THERMAL_THROTTLE /* Make sure this function remains stateless */ -void tegra_thermal_alert(void *data) +static void tegra_thermal_alert(void *data) { mutex_lock(&tegra_therm_mutex); tegra_thermal_alert_unlocked(data); mutex_unlock(&tegra_therm_mutex); } +#endif #ifdef CONFIG_TEGRA_SKIN_THROTTLE +static void tegra_skin_thermal_alert(void *data) +{ + struct tegra_thermal_device *dev = data; + + if (!dev->thz->passive) + thermal_zone_device_update(dev->thz); +} + static int tegra_skin_device_register(struct tegra_thermal_device *device) { int i; @@ -410,8 +420,8 @@ int tegra_thermal_device_register(struct tegra_thermal_device *device) if (device->id == therm->skin_device_id) { if (create_thz) device->set_alert(device->data, - (void (*)(void *))thermal_zone_device_update, - thz); + tegra_skin_thermal_alert, + device); device->set_limits(device->data, 0, therm->temp_throttle_skin); } #endif |