Changed the low temp to 0C since 20C is very easy to trigger thermal
alert under -15C to 15C environment temperature. And the thermal alert
will run into endless alert from tsensor_work_func.
Also revised suspend and resume routine to cancel the work when suspending
and disable/enable irq.
Bug 999175
Signed-off-by: Linqiang Pu <dpu@nvidia.com>
(cherry picked from commit
6a909bfa690991438be298d4933946a92e4929c4)
Change-Id: Icafc6d5f0164204cc0cb7bea64bef2fadadbfbfd
Reviewed-on: http://git-master/r/111550
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
long *milli_temp)
{
/* temp to counter below 20C seems to be inaccurate */
- *milli_temp = 20000;
+ *milli_temp = 0;
return 0;
}
struct tegra_tsensor_data *data = platform_get_drvdata(pdev);
unsigned int config0;
+ disable_irq(data->irq);
+ cancel_delayed_work_sync(&data->work);
/* set STOP bit, else OVERFLOW interrupt seen in LP1 */
config0 = tsensor_readl(data, ((data->instance << 16) | SENSOR_CFG0));
config0 |= (1 << SENSOR_CFG0_STOP_SHIFT);
if (data->is_edp_supported)
schedule_delayed_work(&data->work, 0);
+ enable_irq(data->irq);
return 0;
}
#endif