summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.adc
Commit message (Collapse)AuthorAgeFilesLines
* zephyr: adc: add a dedicated NAMED_ADC_CHANNELS optionFabio Baltieri2022-12-191-3/+10
| | | | | | | | | | | | | | | | | | | | | Add a dedicated NAMED_ADC_CHANNELS option to decouple the platforms setting from the Zephyr ADC one. This allows running tests for code that uses only the Zephyr APIs without having to define named channels as well. Also allows dropping some #if guards that made no sense since they were guarding a data structure used outside of the guard. BRANCH=none BUG=none TEST=cq dry run TEST=zmake compare-builds -a Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I4193a8c41d3bfd684ec03407eee57660aba2c56c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4111644 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Sam Hurst <shurst@google.com>
* zephyr: Kconfig: enable CONFIG_ADC automaticallyFabio Baltieri2022-11-091-0/+4
| | | | | | | | | | | | | | Enable CONFIG_ADC automatically based devicetree compatible nodes. BRANCH=none BUG=none TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I6ed3e352cf442d260c55073ec5e7cb82a5b3d52d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3999721 Reviewed-by: Yuval Peress <peress@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* Update license boilerplate text in source code filesMike Frysinger2022-09-121-1/+1
| | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Delete CONFIG_PLATFORM_EC_ADCKeith Short2022-08-011-11/+3
| | | | | | | | | | | | | | | | | | | CONFIG_PLATFORM_EC_ADC is redundant with the Zephyr Kconfig option, CONFIG_ADC. Use the Zephyr option directly. Note - projects based on the "minimal" config do not compare. The minimal config disabled CONFIG_ADC, but the CONFIG_PLATFORM_EC_ADC_CMD was still enabled. With this CL, CONFIG_PLATFORM_EC_ADC_CMD now depends on CONFIG_ADC. BUG=none BRANCH=none TEST=zmake testall --static; compare binaries Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I129a3f490abd5c8234bc06ed6f86f2d7ff8a13b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3791659 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* adc: Allow runtime config of adc_channelsCaveh Jalali2021-08-271-0/+14
| | | | | | | | | | | | | | | This adds the CONFIG_ADC_CHANNELS_RUNTIME_CONFIG config option to allow the adc_channels array to be tweaked at runtime. BRANCH=none BUG=b:183452273,b:181271666 TEST=buildall passes Change-Id: I1241012b6e36c19baa7fe80853a6c6de4affeefa Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3116990 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: adc: PLATFORM_EC_ADC and ADC_shellDenis Brockus2021-05-171-0/+7
| | | | | | | | | | | | | | | | | | tie CONFIG_PLATFORM_EC_ADC to CONFIG_ADC Disable the zephyr adc_shell command as there is already one present in Chromium EC BUG=none BRANCH=none TEST=submit build should verify it is ok Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I3db30f674e917e8b55a90cec2b746939374d6767 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2895790 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* zephyr: add shim ADCDawid Niedzwiecki2021-02-091-0/+41
Add ADC shim to connect the platform/ec ADC API to the Zephyr ADC API. Generate needed global variables/types: enum adc_channel and adc_channels from dts. Once ADC_CMD config is enabled, it replaces the "adc" Zephyr console function. The shim assues only ADC_0 module. More specific channel options can be added to named-adc.yaml e.g. shift or gain. BUG=b:175881324 BRANCH=none TEST=build Zephyr TEST=Run "adc" command, it should return current levels in mv of configured channels Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ic9c03223e611f916bebc1296cbee614401098994 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2673418 Reviewed-by: Simon Glass <sjg@chromium.org>