diff options
author | Edward Hill <ecgh@chromium.org> | 2018-03-16 14:49:09 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-03-19 12:04:00 -0700 |
commit | 0e224bf94f238aebea81b0c200778a1c3095095f (patch) | |
tree | b6e722934b7407d32a39177b7418bb14a5728219 /board/grunt | |
parent | 699a1fb9f47f6934a3e0ff59d668fdc0ef5b8b8d (diff) | |
download | chrome-ec-0e224bf94f238aebea81b0c200778a1c3095095f.tar.gz |
grunt: Tiny fix to board_get_temp
Fix argument to adc_read_channel() to be enum adc_channel.
No change in behavior since this ends up being a different
name for the same value (0/1).
BUG=none
BRANCH=none
TEST=none
Change-Id: I0e8b3066122f3789d043b98aad98d8a32c2607bc
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/967242
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/grunt')
-rw-r--r-- | board/grunt/board.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/board/grunt/board.c b/board/grunt/board.c index b302ce63d1..0d057f98dd 100644 --- a/board/grunt/board.c +++ b/board/grunt/board.c @@ -534,7 +534,9 @@ static const struct thermistor_info thermistor_info = { static int board_get_temp(int idx, int *temp_k) { - int mv = adc_read_channel(idx ? NPCX_ADC_CH1 : NPCX_ADC_CH0); + /* idx is the sensor index set below in temp_sensors[] */ + int mv = adc_read_channel( + idx ? ADC_TEMP_SENSOR_SOC : ADC_TEMP_SENSOR_CHARGER); int temp_c; if (mv < 0) |