summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-03-16 16:15:23 -0700
committerRandall Spangler <rspangler@chromium.org>2012-03-19 09:05:16 -0700
commit1fd7062b29c685d98be8586ded4587e5e1e169ee (patch)
tree4b5282a04543561962fa80a2308f7ed4bdce52b7
parent9ff6f390b9584e2b6e08a08096abc386d7832adb (diff)
downloadchrome-ec-1fd7062b29c685d98be8586ded4587e5e1e169ee.tar.gz
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 <rspangler@chromium.org>
-rw-r--r--board/bds/board.c5
-rw-r--r--board/bds/board.h4
-rw-r--r--board/link/board.c2
-rw-r--r--board/link/board.h4
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. */