diff options
author | Yuval Peress <peress@google.com> | 2023-03-14 21:46:59 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-03-15 19:46:38 +0000 |
commit | b3eb71c602bb785c0fccd677ae375336dcfa3ecf (patch) | |
tree | ec3a7381255e5fa7e02c266a2094052d6409b793 /zephyr/shim/src/gpio_int.c | |
parent | 579c5e199bdd21c85097d70f9ab5c76c800bce60 (diff) | |
download | chrome-ec-b3eb71c602bb785c0fccd677ae375336dcfa3ecf.tar.gz |
gpio/i2c: Only use status okay for Zephyr interrupts/named-i2c
Replace calls for DT_FOREACH_CHILD with DT_FOREACH_CHILD_STATUS_OKAY.
This makes it possible for variants to disable some interrupts or
i2c buses without having to remove the nodes.
BRANCH=none
BUG=b:272529568,b:273308069
TEST=zmake build rex rex-sans-sensors
TEST=zmake compare-builds -a
Change-Id: I3bf9034fd3f5e70665598d9e0b503d5e76bc13e4
Signed-off-by: Yuval Peress <peress@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4339256
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/shim/src/gpio_int.c')
-rw-r--r-- | zephyr/shim/src/gpio_int.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zephyr/shim/src/gpio_int.c b/zephyr/shim/src/gpio_int.c index 761e7e7b3c..58b543912c 100644 --- a/zephyr/shim/src/gpio_int.c +++ b/zephyr/shim/src/gpio_int.c @@ -52,7 +52,7 @@ BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(cros_ec_gpio_interrupts) == 1, extern void DT_STRING_TOKEN(id, handler)(enum gpio_signal); #if DT_HAS_COMPAT_STATUS_OKAY(cros_ec_gpio_interrupts) -DT_FOREACH_CHILD(DT_IRQ_NODE, INT_HANDLER_DECLARE) +DT_FOREACH_CHILD_STATUS_OKAY(DT_IRQ_NODE, INT_HANDLER_DECLARE) #endif #undef INT_HANDLER_DECLARE @@ -85,7 +85,7 @@ struct gpio_callback int_cb_data[GPIO_INT_COUNT]; */ static const struct gpio_int_config gpio_int_data[] = { - DT_FOREACH_CHILD(DT_IRQ_NODE, INT_CONFIG_FROM_NODE) + DT_FOREACH_CHILD_STATUS_OKAY(DT_IRQ_NODE, INT_CONFIG_FROM_NODE) }; #endif @@ -107,7 +107,7 @@ static const struct gpio_int_config gpio_int_data[] = { #if DT_HAS_COMPAT_STATUS_OKAY(cros_ec_gpio_interrupts) -DT_FOREACH_CHILD(DT_IRQ_NODE, INT_CONFIG_PTR_DECLARE) +DT_FOREACH_CHILD_STATUS_OKAY(DT_IRQ_NODE, INT_CONFIG_PTR_DECLARE) #endif |