diff options
author | Rajesh Kumar <rajesh3.kumar@intel.com> | 2021-12-02 11:05:14 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-03 00:50:46 +0000 |
commit | b30c15a73448eed93c6d6997a033d706c0541b50 (patch) | |
tree | 79fc0c0b24065036649b5c314541ebb09b153111 | |
parent | 5dac04933a787dd0c7c2ade40459c7ade563cb32 (diff) | |
download | chrome-ec-b30c15a73448eed93c6d6997a033d706c0541b50.tar.gz |
zephyr: brya: Enable ADC runtime configuration
Enable CONFIG_ADC_CHANNELS_RUNTIME_CONFIG for brya
and fixed compilation error in zephyr shim.
BUG=b:208785542
BRANCH=none
TEST=zmake configure -B ~/tmp/brya/ brya -b
Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com>
Change-Id: I69e89091aece1125d499f192a6124bf5277b8def
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3313321
Reviewed-by: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Tanu Malhotra <tanu.malhotra@intel.com>
Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r-- | zephyr/projects/brya/brya/prj.conf | 2 | ||||
-rw-r--r-- | zephyr/shim/include/zephyr_adc.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/zephyr/projects/brya/brya/prj.conf b/zephyr/projects/brya/brya/prj.conf index d6c934fedb..f7f85032a3 100644 --- a/zephyr/projects/brya/brya/prj.conf +++ b/zephyr/projects/brya/brya/prj.conf @@ -19,6 +19,8 @@ CONFIG_PLATFORM_EC_CONSOLE_CMD_SYSINFO=y CONFIG_PLATFORM_EC_I2C=y CONFIG_PLATFORM_EC_BACKLIGHT_LID=y +CONFIG_PLATFORM_EC_ADC_CHANNELS_RUNTIME_CONFIG=y + # SoC configuration CONFIG_AP=y CONFIG_AP_X86_INTEL_ADL=y diff --git a/zephyr/shim/include/zephyr_adc.h b/zephyr/shim/include/zephyr_adc.h index 7c0f3f3232..4d279bec86 100644 --- a/zephyr/shim/include/zephyr_adc.h +++ b/zephyr/shim/include/zephyr_adc.h @@ -30,8 +30,12 @@ struct adc_t { struct adc_channel_cfg channel_cfg; }; +#ifndef CONFIG_ADC_CHANNELS_RUNTIME_CONFIG extern const struct adc_t adc_channels[]; #else +extern struct adc_t adc_channels[]; +#endif /* CONFIG_ADC_CHANNELS_RUNTIME_CONFIG */ +#else /* Empty declaration to avoid warnings if adc.h is included */ enum adc_channel { ADC_CH_COUNT |