misc: therm_est: Robustify history management
authorJinyoung Park <jinyoungp@nvidia.com>
Mon, 30 Sep 2013 03:33:38 +0000 (12:33 +0900)
committerHarry Hong <hhong@nvidia.com>
Mon, 13 Jan 2014 00:45:35 +0000 (16:45 -0800)
commit85ba3c70fd78cfb674ca557180325d8ca790a24e
tree4e0601653d9e5edaa5d599e321782b715b7f26db
parentaec358d727fcfec2702b828f0540a5fa8413f3e7
misc: therm_est: Robustify history management

Added below things to prevent bad temp estimation by wrong history management.
- Set current temp estimation with 25C if history initialization is failed.
- Store last temp as current history if temp reading is failed.

Bug 1375775

Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/280251
(cherry picked from commit d498f2502ba9135bfaf137aecfd2576f39b88463)

Change-Id: If97275cc3ba36914b43afc2b98ba3163e2ac8255
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/353272
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
drivers/misc/therm_est.c