diff options
author | Simon Glass <sjg@chromium.org> | 2021-04-21 09:43:59 +1200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-21 16:02:36 +0000 |
commit | 9ef1edbc3bc25988acf8d40c24002d961ccea86d (patch) | |
tree | 838bbb8f36ae50bbe353a0c562f1a7e63d06dff9 | |
parent | a82fafebccb3d2829af0699a5018adcab0a3ac23 (diff) | |
download | chrome-ec-9ef1edbc3bc25988acf8d40c24002d961ccea86d.tar.gz |
zephyr: adc: Add an empty enum when not ADC is present
At present we get warnings when adc.h is included but there is no
ADC available, such as with posix-ec. Correct this by adding an empty
enum in this case.
BUG=none
BRANCH=none
TEST=CQ
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I139c48d0de860657036d071e596dea426225b52d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2842205
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | zephyr/shim/include/zephyr_adc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zephyr/shim/include/zephyr_adc.h b/zephyr/shim/include/zephyr_adc.h index 25ef530e17..fb63407c16 100644 --- a/zephyr/shim/include/zephyr_adc.h +++ b/zephyr/shim/include/zephyr_adc.h @@ -28,6 +28,11 @@ struct adc_t { }; extern const struct adc_t adc_channels[]; +#else +/* Empty declaration to avoid warnings if adc.h is included */ +enum adc_channel { + ADC_CH_COUNT +}; #endif /* CONFIG_PLATFORM_EC_ADC */ #endif /* __CROS_EC_ZEPHYR_ADC_H */ |