summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2021-08-25 16:20:28 -0700
committerCommit Bot <commit-bot@chromium.org>2021-08-27 01:27:33 +0000
commit199a41cadb9e748d65d946b5c9eaf17d5b168260 (patch)
tree900652fa4ca12fb9edd30164d25fefabfc35857b /include
parent4f9ecfc0861ec20e315934bce6e390b9ea4b3a3e (diff)
downloadchrome-ec-199a41cadb9e748d65d946b5c9eaf17d5b168260.tar.gz
adc: Include adc_chip.h from adc.h
This reorganizes adc.h and adc_chip.h so that general code only needs to know about adc.h. adc_chip.h is now included by adc.h directly and does not need to be included in general code. BRANCH=none BUG=b:181271666 TEST=buildall passes (with next patch in series) Cq-Depend: chromium:3120316 Change-Id: I8bc107c6900e831a57f7a7fb8668eb08bb179d6c Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3120315 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/adc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/adc.h b/include/adc.h
index e3d0692b87..b52798419a 100644
--- a/include/adc.h
+++ b/include/adc.h
@@ -8,6 +8,7 @@
#ifndef __CROS_EC_ADC_H
#define __CROS_EC_ADC_H
+#include "adc_chip.h"
#include "common.h"
#define ADC_READ_ERROR -1 /* Value returned by adc_read_channel() on error */
@@ -17,6 +18,12 @@
#endif /* CONFIG_ZEPHYR */
/*
+ * Boards must provide this list of ADC channel definitions. This must match
+ * the enum adc_channel list provided by the board.
+ */
+extern const struct adc_t adc_channels[];
+
+/*
* Boards which use the ADC interface must provide enum adc_channel in the
* board.h file. See chip/$CHIP/adc_chip.h for additional chip-specific
* requirements.