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: NHakan Berg <hakan.berg@stericsson.com> Signed-off-by: NLee Jones <lee.jones@linaro.org> Reviewed-by: NMarcus COOPER <marcus.xm.cooper@stericsson.com> Reviewed-by: NMartin SJOBLOM <martin.w.sjoblom@stericsson.com> Reviewed-by: NRabin VINCENT <rabin.vincent@stericsson.com>
Showing
想要评论请 注册 或 登录