ab8500-btemp: Filter btemp readings
authorHakan Berg <hakan.berg@stericsson.com>
Tue, 17 Jul 2012 12:17:16 +0000 (14:17 +0200)
committerLee Jones <lee.jones@linaro.org>
Thu, 7 Mar 2013 04:35:44 +0000 (12:35 +0800)
commit908fe8d6a575e2bdf349ba8635b862eeb91f7ade
tree863d1d0caffb4dfb84a118c0d885ce0c773b080a
parentd4f510f6c3f579bac0dbeaa8dc7c2dc768c31786
ab8500-btemp: Filter btemp readings

Battery tempreature readings sometimes fail and results in
a value far from recent values. This patch adds a software
filter that disposes such readings, by allowing direct
updates on temperature only if two samples result in the
same temperature. Else only allow 1 degree change from previous
reported value in the direction of the new measurement.

Signed-off-by: Hakan Berg <hakan.berg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Martin SJOBLOM <martin.w.sjoblom@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
drivers/power/ab8500_btemp.c
This page took 0.027586 seconds and 5 git commands to generate.