summaryrefslogtreecommitdiff
path: root/zephyr/shim/src/usba.c
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/shim/src/usba.c')
-rw-r--r--zephyr/shim/src/usba.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/zephyr/shim/src/usba.c b/zephyr/shim/src/usba.c
index a7360a9ddb..4db8c31e6a 100644
--- a/zephyr/shim/src/usba.c
+++ b/zephyr/shim/src/usba.c
@@ -5,9 +5,10 @@
#define DT_DRV_COMPAT cros_ec_usba_port_enable_pins
+#include <zephyr/devicetree.h>
#include "hooks.h"
-#include <zephyr/devicetree.h>
+#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)
#define PIN(node_id, prop, idx) \
GPIO_SIGNAL(DT_PHANDLE_BY_IDX(node_id, prop, idx)),
@@ -22,3 +23,5 @@ const
#endif
int usb_port_enable[] = { DT_INST_FOREACH_STATUS_OKAY(
USBA_ENABLE_PINS) };
+
+#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */