summaryrefslogtreecommitdiff
path: root/zephyr/shim/include/usbc/usb_muxes.h
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/shim/include/usbc/usb_muxes.h')
-rw-r--r--zephyr/shim/include/usbc/usb_muxes.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/zephyr/shim/include/usbc/usb_muxes.h b/zephyr/shim/include/usbc/usb_muxes.h
index f94aed488d..6ee9c691a8 100644
--- a/zephyr/shim/include/usbc/usb_muxes.h
+++ b/zephyr/shim/include/usbc/usb_muxes.h
@@ -6,8 +6,6 @@
#ifndef ZEPHYR_CHROME_USBC_USB_MUXES_H
#define ZEPHYR_CHROME_USBC_USB_MUXES_H
-#include <zephyr/devicetree.h>
-#include <zephyr/sys/util_macro.h>
#include "usb_mux.h"
#include "usbc/amd_fp6_usb_mux.h"
#include "usbc/anx7447_usb_mux.h"
@@ -21,6 +19,9 @@
#include "usbc/utils.h"
#include "usbc/virtual_usb_mux.h"
+#include <zephyr/devicetree.h>
+#include <zephyr/sys/util_macro.h>
+
/**
* @brief List of USB mux drivers compatibles and their configurations. Each
* element of list has to have (compatible, config) format.
@@ -177,14 +178,14 @@
* @brief Set struct usb_mux fields common for all USB muxes and alter flags
*
* @param mux_id USB mux node ID
- * @param flags_mask Mask for bits that should be igonred in flags property
+ * @param flags_mask Mask for bits that should be ignored in flags property
* @param flags_val Value that should be used instead for masked bits
*/
#define USB_MUX_COMMON_FIELDS_WITH_FLAGS(mux_id, flags_mask, flags_val) \
.usb_port = USB_MUX_PORT(mux_id), \
.board_init = USB_MUX_CALLBACK_OR_NULL(mux_id, board_init), \
.board_set = USB_MUX_CALLBACK_OR_NULL(mux_id, board_set), \
- .flags = (DT_PROP(mux_id, flags) & ~(flags_mask)) | (flags_val)
+ .flags = (DT_PROP_OR(mux_id, flags, 0) & ~(flags_mask)) | (flags_val)
/**
* @brief Set struct usb_mux fields common for all USB muxes