diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 15:36:53 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-28 16:52:29 +0000 |
commit | da32c377100a8fc585d7b6e73fac42a590b42d4b (patch) | |
tree | 717f4dd9c3705d12532b6677b8b6f1858057e1a3 /zephyr/shim/include/usbc | |
parent | 09348e29a688ce005c69bed27e2159af90d36581 (diff) | |
download | chrome-ec-da32c377100a8fc585d7b6e73fac42a590b42d4b.tar.gz |
zephyr/shim/include/usbc/tcpci_usb_mux.h: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: Icdb71dc2d42379c9d5091869fc64854ff15fdb1b
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730843
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr/shim/include/usbc')
-rw-r--r-- | zephyr/shim/include/usbc/tcpci_usb_mux.h | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/zephyr/shim/include/usbc/tcpci_usb_mux.h b/zephyr/shim/include/usbc/tcpci_usb_mux.h index 9fa29c7c85..74a2fe8ffc 100644 --- a/zephyr/shim/include/usbc/tcpci_usb_mux.h +++ b/zephyr/shim/include/usbc/tcpci_usb_mux.h @@ -10,41 +10,40 @@ #include "tcpm/ps8xxx_public.h" #include "tcpm/tcpci.h" -#define TCPCI_TCPM_USB_MUX_COMPAT cros_ec_usbc_mux_tcpci -#define PS8XXX_USB_MUX_COMPAT parade_usbc_mux_ps8xxx +#define TCPCI_TCPM_USB_MUX_COMPAT cros_ec_usbc_mux_tcpci +#define PS8XXX_USB_MUX_COMPAT parade_usbc_mux_ps8xxx /** * Add I2C configuration and USB_MUX_FLAG_NOT_TCPC to enforce it when * mux_read()/mux_write() functions are used. */ -#define USB_MUX_CONFIG_TCPCI_TCPM_WITH_I2C(mux_id, port_id, idx) \ - { \ - USB_MUX_COMMON_FIELDS_WITH_FLAGS(mux_id, port_id, idx, \ - USB_MUX_FLAG_NOT_TCPC, \ - USB_MUX_FLAG_NOT_TCPC),\ - .driver = &tcpci_tcpm_usb_mux_driver, \ - .hpd_update = USB_MUX_CALLBACK_OR_NULL(mux_id, \ - hpd_update), \ - .i2c_port = I2C_PORT(DT_PHANDLE(mux_id, port)), \ - .i2c_addr_flags = DT_PROP(mux_id, i2c_addr_flags), \ +#define USB_MUX_CONFIG_TCPCI_TCPM_WITH_I2C(mux_id, port_id, idx) \ + { \ + USB_MUX_COMMON_FIELDS_WITH_FLAGS(mux_id, port_id, idx, \ + USB_MUX_FLAG_NOT_TCPC, \ + USB_MUX_FLAG_NOT_TCPC), \ + .driver = &tcpci_tcpm_usb_mux_driver, \ + .hpd_update = \ + USB_MUX_CALLBACK_OR_NULL(mux_id, hpd_update), \ + .i2c_port = I2C_PORT(DT_PHANDLE(mux_id, port)), \ + .i2c_addr_flags = DT_PROP(mux_id, i2c_addr_flags), \ } /** Use I2C configuration from TCPC */ -#define USB_MUX_CONFIG_TCPCI_TCPM_WO_I2C(mux_id, port_id, idx) \ - { \ - USB_MUX_COMMON_FIELDS(mux_id, port_id, idx), \ - .driver = &tcpci_tcpm_usb_mux_driver, \ - .hpd_update = USB_MUX_CALLBACK_OR_NULL(mux_id, \ - hpd_update), \ +#define USB_MUX_CONFIG_TCPCI_TCPM_WO_I2C(mux_id, port_id, idx) \ + { \ + USB_MUX_COMMON_FIELDS(mux_id, port_id, idx), \ + .driver = &tcpci_tcpm_usb_mux_driver, \ + .hpd_update = \ + USB_MUX_CALLBACK_OR_NULL(mux_id, hpd_update), \ } /** This macro will fail if only port or i2c_addr_flags property is present */ -#define USB_MUX_CONFIG_TCPCI_TCPM(mux_id, port_id, idx) \ - COND_CODE_1(UTIL_OR(DT_NODE_HAS_PROP(mux_id, port), \ - DT_NODE_HAS_PROP(mux_id, i2c_addr_flags)), \ - (USB_MUX_CONFIG_TCPCI_TCPM_WITH_I2C(mux_id, port_id,\ - idx)), \ - (USB_MUX_CONFIG_TCPCI_TCPM_WO_I2C(mux_id, port_id, \ - idx))) +#define USB_MUX_CONFIG_TCPCI_TCPM(mux_id, port_id, idx) \ + COND_CODE_1( \ + UTIL_OR(DT_NODE_HAS_PROP(mux_id, port), \ + DT_NODE_HAS_PROP(mux_id, i2c_addr_flags)), \ + (USB_MUX_CONFIG_TCPCI_TCPM_WITH_I2C(mux_id, port_id, idx)), \ + (USB_MUX_CONFIG_TCPCI_TCPM_WO_I2C(mux_id, port_id, idx))) #endif /* __ZEPHYR_SHIM_TCPCI_USB_MUX_H */ |