diff options
author | Simon Glass <sjg@chromium.org> | 2021-04-02 10:04:05 +1300 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-02 01:39:08 +0000 |
commit | 96800710a6da778e5bfa5ad2c4e41fd72b0d51ea (patch) | |
tree | 5f0baafd223b1720acaaa7b722bcb621547e0fd5 /include | |
parent | d39996589382eee70a7b459a742954422e57faf9 (diff) | |
download | chrome-ec-96800710a6da778e5bfa5ad2c4e41fd72b0d51ea.tar.gz |
zephyr: Move ADC-shim code into zephyr/shim
Most of the shim code is in zephyr/ rather than in the ECOS code. Move
the ADC one as well, to keep it consistent.
BUG=b:175881324
BRANCH=none
TEST=build Zephyr with lazor and some other CLs and see that the ADC
enum is now available and there are not build errors
Change-Id: Ib1b31c1b885e3ca5b184f4f708776357ac87cbbf
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2801171
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/adc.h | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/include/adc.h b/include/adc.h index 2ead96f5b3..e3d0692b87 100644 --- a/include/adc.h +++ b/include/adc.h @@ -13,24 +13,7 @@ #define ADC_READ_ERROR -1 /* Value returned by adc_read_channel() on error */ #ifdef CONFIG_ZEPHYR -#ifdef CONFIG_PLATFORM_EC_ADC -#define NODE_ID_AND_COMMA(node_id) node_id, -enum adc_channel { -#if DT_NODE_EXISTS(DT_INST(0, named_adc_channels)) - DT_FOREACH_CHILD(DT_INST(0, named_adc_channels), NODE_ID_AND_COMMA) -#endif /* named_adc_channels */ - ADC_CH_COUNT -}; - -struct adc_t { - const char *name; - uint8_t input_ch; - int factor_mul; - int factor_div; -}; - -extern const struct adc_t adc_channels[]; -#endif /* CONFIG_PLATFORM_EC_ADC */ +#include <zephyr_adc.h> #endif /* CONFIG_ZEPHYR */ /* |