From 5cc3cac589d3e869266c18ed7e538a769496478f Mon Sep 17 00:00:00 2001 From: Nick Sanders Date: Tue, 26 Apr 2016 19:00:17 -0700 Subject: servo_v4: Fix ADC console command The console adc command prints adc values in the order they appear in hardware, however they are lableled in the order they are enumerated in board.h, which is not necessarily the same. This prints the correct name and value pairs, and removes the adc_read_all_channels function which is not otherwise used. BUG=chromium:571476 BRANCH=None TEST="adc" command associates correct values with names now. Change-Id: I688641953d20082224b4120eaefe0d634ad4c74c Signed-off-by: Nick Sanders Reviewed-on: https://chromium-review.googlesource.com/340892 Commit-Ready: Nick Sanders Tested-by: Nick Sanders Reviewed-by: Shawn N --- chip/lm4/adc.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'chip/lm4') diff --git a/chip/lm4/adc.c b/chip/lm4/adc.c index 40d5b3770d..82f28153e4 100644 --- a/chip/lm4/adc.c +++ b/chip/lm4/adc.c @@ -174,18 +174,6 @@ int adc_read_channel(enum adc_channel ch) return rv * adc->factor_mul / adc->factor_div + adc->shift; } -int adc_read_all_channels(int *data) -{ - int i; - - for (i = 0; i < ADC_CH_COUNT; ++i) { - data[i] = adc_read_channel(i); - if (data[i] == ADC_READ_ERROR) - return EC_ERROR_UNKNOWN; - } - return EC_SUCCESS; -} - /*****************************************************************************/ /* Interrupt handlers */ -- cgit v1.2.1