From 1fd7062b29c685d98be8586ded4587e5e1e169ee Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Fri, 16 Mar 2012 16:15:23 -0700 Subject: Tidy ADC channel definitions We moved a while ago to a table of ADC channels, so having a meaningless constant defined in board.h is more harmful than helpful. BUG=none TEST=build link, bds Change-Id: I651a609c9ed13f879bb943c90731275407d77e50 Signed-off-by: Randall Spangler --- board/bds/board.c | 5 ++++- board/bds/board.h | 4 ---- board/link/board.c | 2 +- board/link/board.h | 4 ---- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/board/bds/board.c b/board/bds/board.c index 28e23e67bb..6a76c03e03 100644 --- a/board/bds/board.c +++ b/board/bds/board.c @@ -29,9 +29,12 @@ const struct adc_t adc_channels[ADC_CH_COUNT] = /* Charger current is mapped from 0~4000mA to 0~1.6V. * And ADC maps 0~3.3V to ADC_READ_MAX. + * + * Note that on BDS, this is really just the turn pot on the Badger + * board, but that's good enough for debugging the ADC. */ {"ChargerCurrent", LM4_ADC_SEQ1, 33 * 4000, ADC_READ_MAX * 16, 0, - LM4_AIN(ADC_IN0), 0x06 /* IE0 | END0 */}, + LM4_AIN(0), 0x06 /* IE0 | END0 */}, }; diff --git a/board/bds/board.h b/board/bds/board.h index 6ec010e221..0b96e493c2 100644 --- a/board/bds/board.h +++ b/board/bds/board.h @@ -45,10 +45,6 @@ /* LPC COMx I/O address (in x86 I/O address space) */ #define LPC_COMX_ADDR 0x2f8 /* COM2, since superIO uses COM1 */ -/* ADC inputs */ -/* TODO: really just need a lookup table for channels to inputs */ -#define ADC_IN0 0 /* Turn POT on badger board */ - enum adc_channel { /* EC internal die temperature in degrees K. */ diff --git a/board/link/board.c b/board/link/board.c index e9e0cd8208..faee2863fa 100644 --- a/board/link/board.c +++ b/board/link/board.c @@ -118,7 +118,7 @@ const struct adc_t adc_channels[ADC_CH_COUNT] = * And ADC maps 0~3.3V to ADC_READ_MAX. */ {"ChargerCurrent", LM4_ADC_SEQ1, 33 * 4000, ADC_READ_MAX * 16, 0, - LM4_AIN(ADC_IN0), 0x06 /* IE0 | END0 */}, + LM4_AIN(11), 0x06 /* IE0 | END0 */}, }; void configure_board(void) diff --git a/board/link/board.h b/board/link/board.h index 72a7e7bd7b..d98f2ce7ac 100644 --- a/board/link/board.h +++ b/board/link/board.h @@ -55,10 +55,6 @@ /* LPC COMx I/O address (in x86 I/O address space) */ #define LPC_COMX_ADDR 0x3f8 /* COM1 */ -/* ADC inputs */ -/* TODO: assign real ADC inputs */ -#define ADC_IN0 11 /* Charger current */ - enum adc_channel { /* EC internal die temperature in degrees K. */ -- cgit v1.2.1