Files
OpenCellular/driver/temp_sensor
David Hendricks 201211f2dc thermistor: Add generic linear interpolation algorithm
The existing algorithm makes several assumptions for a particular
thermistor circuit. This patch introduces a more generic version
that can be used for multiple thermistors on a single board.

The idea is to approximate a curve produced by solving for voltage
measued by an ADC using the Steinhart-Hart equation. For a straight
line one only needs two data points. For a steady curve data
points can be distributed evenly. For the most part, though, data
points should be provided after a significant change in slope.

More data points give more accuracy at the expense of memory, and
we mostly only care about accuracy in the range between "warm"
and "too hot" so only a few data points should be used.

BUG=chrome-os-partner:54818
BRANCH=none
TEST=added unit test, needs real testing

Change-Id: I046e61dbfd1e8c26c2a533777f222f5413938556
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/344781
Reviewed-by: Shawn N <shawnn@chromium.org>
2016-08-01 20:01:49 -07:00
..
2016-04-03 10:27:40 -07:00
2016-04-03 10:27:40 -07:00