diff options
author | Peter Marheine <pmarheine@chromium.org> | 2021-11-30 13:41:01 +1100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-03 00:00:44 +0000 |
commit | a1bfe80a94eb3386057d80e5d765db8cea15d0fd (patch) | |
tree | e699bd2e8932f251ce0cc03280314bf0717e7b2b /zephyr/include/cros/nuvoton/npcx.dtsi | |
parent | 18f6c4d3b2a56635ce880788047083115637885c (diff) | |
download | chrome-ec-a1bfe80a94eb3386057d80e5d765db8cea15d0fd.tar.gz |
zephyr: use a chosen DT node to find ADC devices
This change adds a cros-ec,adc chosen node to the device tree, to be used
by the ADC shim to locate the device to which all analog channels are
bound (rather than assuming it is named adc0). It also makes the
configuration happen at compile-time, saving some runtime indirection and
failing faster (at build rather than runtime) if misconfigured.
BUG=b:205615358
TEST=zmake testall
BRANCH=none
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: I71bdf7329b76eb4cda06478f27bb76418e6b0b78
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3308335
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/include/cros/nuvoton/npcx.dtsi')
-rw-r--r-- | zephyr/include/cros/nuvoton/npcx.dtsi | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/zephyr/include/cros/nuvoton/npcx.dtsi b/zephyr/include/cros/nuvoton/npcx.dtsi index 705935d25e..1a59a1cb8d 100644 --- a/zephyr/include/cros/nuvoton/npcx.dtsi +++ b/zephyr/include/cros/nuvoton/npcx.dtsi @@ -12,6 +12,7 @@ / { chosen { cros-ec,flash = &fiu0; + cros-ec,adc = &adc0; }; named-bbram-regions { |