Commit Graph

5 Commits

Author SHA1 Message Date
Vic Yang
feb5a62d79 Make TMP006 polling check for power first.
Currently if ENABLE_VS is off, each time we poll TMP006 sensors, it
takes 1 second for each sensor to return ERROR. Checking for power
before polling help to reduce the time spent on temperature polling.

Signed-off-by: Vic Yang <victoryang@chromium.org>

BUG=chrome-os-partner:8275
TEST=Manual test

Change-Id: I2da83f09cccc331074f9bb5483b2ba92c0865742
2012-03-01 13:30:08 -08:00
Vic Yang
52ac826a2b Fix a bug causing TMP006 debug message truncated.
The debug message is larger than UART transmit buffer so we have to
flush the output manually.

Signed-off-by: Vic Yang <victoryang@chromium.org>

BUG=chrome-os-partner:8265
TEST='tmp006' shows debug message of all TMP006 sensors.

Change-Id: I81793504e1a345b172567d3e877ee8740b85640c
2012-02-29 13:46:57 -08:00
Vic Yang
c55b1527ae Remove unused temperature command
'tempremote' is a debug command used to assess temperature calculation of
TMP006 sensor. Remove it since we have finished TMP006 module.

Also add back the fixed-point algorithm that is lost in rebasing earlier.

Signed-off-by: Vic Yang <victoryang@chromium.org>

BUG=chrome-os-partner:7801
TEST=none

Change-Id: Ic3555c1a04d2c0483075262e3ab53842f7bd43d8
2012-02-28 10:52:32 -08:00
Vic Yang
1570eafad0 Have TMP006 sensor report -1 on sensor failure.
Temperature reading should be -1 on sensor failure.

Signed-off-by: Vic Yang <victoryang@chromium.org>

BUG=chrome-os-partner:8241
TEST="gpioset enable_vs 0" and "temps" gives "Error"
"gpioset enable_vs 1" and "temps" gives correct reading.

Change-Id: Ide82bd3433d3de12a749b0ee85f1ae1c6b12c5e5
2012-02-27 15:09:11 -08:00
Vic Yang
0fefd25c0c Temperature polling and temporal correction
A temperature polling task is added to achieve temporal correction and
also reduce the latency of reading temperature.

Factor out sensor specific part to keep code clean.

Signed-off-by: Vic Yang <victoryang@chromium.org>

BUG=chrome-os-partner:7801
TEST=On link, 'temps' shows all temperature readings.
Cover each sensor with hand and see object temperature rise.
Compilation succeeded on bds/adv/daisy/discovery.

Change-Id: I3c44c8b2e3ab2aa9ce640d3fc25e7fba56534b86
2012-02-18 13:37:53 +08:00