diff options
author | Keith Short <keithshort@chromium.org> | 2022-11-10 15:19:52 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-11-11 19:42:09 +0000 |
commit | 6acfadf0df547a86b1dfddb3f5487d606774be6a (patch) | |
tree | 52b68732008c2e7f9cd1cda3a8da583d8926e576 | |
parent | 84ca1269ae0ad439141badd30c2b0e0d6e6d7783 (diff) | |
download | chrome-ec-6acfadf0df547a86b1dfddb3f5487d606774be6a.tar.gz |
usb_mux shim: Set a default flags value
The flags property is marked as not required, set the default flag field
to 0 if not specified in the devicetree.
BUG=none
BRANCH=none
TEST=twister
TEST=zmake compare-builds
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ibb4590645aa901bc874acb721fd0bbbb7671f409
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4023766
Reviewed-by: Yuval Peress <peress@google.com>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r-- | zephyr/shim/include/usbc/usb_muxes.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zephyr/shim/include/usbc/usb_muxes.h b/zephyr/shim/include/usbc/usb_muxes.h index f94aed488d..132ce77e91 100644 --- a/zephyr/shim/include/usbc/usb_muxes.h +++ b/zephyr/shim/include/usbc/usb_muxes.h @@ -177,14 +177,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 |