summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 14:53:58 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-29 11:19:28 +0000
commit4270f6ae6e9aeb65e3930e2c5d0dcd3b1a8a21fa (patch)
tree6d50f880e23bb7eae3554253e1a4878a95eba854
parent285df5930f4332ebeb182dfc8ab8c962bbfb0634 (diff)
downloadchrome-ec-4270f6ae6e9aeb65e3930e2c5d0dcd3b1a8a21fa.tar.gz
driver/retimer/tusb544.h: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: I40d01a40c796fe2fc8cd84a634938c6f7a269a2b Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730061 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--driver/retimer/tusb544.h113
1 files changed, 56 insertions, 57 deletions
diff --git a/driver/retimer/tusb544.h b/driver/retimer/tusb544.h
index e1599c78ca..2a5f50f051 100644
--- a/driver/retimer/tusb544.h
+++ b/driver/retimer/tusb544.h
@@ -9,55 +9,54 @@
#ifndef __CROS_EC_USB_REDRIVER_TUSB544_H
#define __CROS_EC_USB_REDRIVER_TUSB544_H
-
#define TUSB544_I2C_ADDR_FLAGS0 0x44
-#define TUSB544_REG_GENERAL4 0x0A
-#define TUSB544_GEN4_CTL_SEL GENMASK(1, 0)
-#define TUSB544_GEN4_FLIP_SEL BIT(2)
-#define TUSB544_GEN4_HPDIN BIT(3)
-#define TUSB544_GEN4_EQ_OVRD BIT(4)
-#define TUSB544_GEN4_SWAP_SEL BIT(5)
+#define TUSB544_REG_GENERAL4 0x0A
+#define TUSB544_GEN4_CTL_SEL GENMASK(1, 0)
+#define TUSB544_GEN4_FLIP_SEL BIT(2)
+#define TUSB544_GEN4_HPDIN BIT(3)
+#define TUSB544_GEN4_EQ_OVRD BIT(4)
+#define TUSB544_GEN4_SWAP_SEL BIT(5)
-#define TUSB544_REG_DISPLAYPORT_1 0x10
-#define TUSB544_REG_DISPLAYPORT_2 0x11
-#define TUSB544_REG_USB3_1_1 0x20
-#define TUSB544_REG_USB3_1_2 0x21
-#define TUSB544_EQ_RX_DFP_MINUS14_UFP_MINUS33 (0)
-#define TUSB544_EQ_RX_DFP_04_UFP_MINUS15 (1)
-#define TUSB544_EQ_RX_DFP_17_UFP_0 (2)
-#define TUSB544_EQ_RX_DFP_32_UFP_14 (3)
-#define TUSB544_EQ_RX_DFP_41_UFP_24 (4)
-#define TUSB544_EQ_RX_DFP_52_UFP_35 (5)
-#define TUSB544_EQ_RX_DFP_61_UFP_43 (6)
-#define TUSB544_EQ_RX_DFP_69_UFP_52 (7)
-#define TUSB544_EQ_RX_DFP_77_UFP_60 (8)
-#define TUSB544_EQ_RX_DFP_83_UFP_66 (9)
-#define TUSB544_EQ_RX_DFP_88_UFP_72 (10)
-#define TUSB544_EQ_RX_DFP_94_UFP_77 (11)
-#define TUSB544_EQ_RX_DFP_98_UFP_81 (12)
-#define TUSB544_EQ_RX_DFP_103_UFP_86 (13)
-#define TUSB544_EQ_RX_DFP_106_UFP_90 (14)
-#define TUSB544_EQ_RX_DFP_110_UFP_94 (15)
-#define TUSB544_EQ_RX_MASK (0x0F)
+#define TUSB544_REG_DISPLAYPORT_1 0x10
+#define TUSB544_REG_DISPLAYPORT_2 0x11
+#define TUSB544_REG_USB3_1_1 0x20
+#define TUSB544_REG_USB3_1_2 0x21
+#define TUSB544_EQ_RX_DFP_MINUS14_UFP_MINUS33 (0)
+#define TUSB544_EQ_RX_DFP_04_UFP_MINUS15 (1)
+#define TUSB544_EQ_RX_DFP_17_UFP_0 (2)
+#define TUSB544_EQ_RX_DFP_32_UFP_14 (3)
+#define TUSB544_EQ_RX_DFP_41_UFP_24 (4)
+#define TUSB544_EQ_RX_DFP_52_UFP_35 (5)
+#define TUSB544_EQ_RX_DFP_61_UFP_43 (6)
+#define TUSB544_EQ_RX_DFP_69_UFP_52 (7)
+#define TUSB544_EQ_RX_DFP_77_UFP_60 (8)
+#define TUSB544_EQ_RX_DFP_83_UFP_66 (9)
+#define TUSB544_EQ_RX_DFP_88_UFP_72 (10)
+#define TUSB544_EQ_RX_DFP_94_UFP_77 (11)
+#define TUSB544_EQ_RX_DFP_98_UFP_81 (12)
+#define TUSB544_EQ_RX_DFP_103_UFP_86 (13)
+#define TUSB544_EQ_RX_DFP_106_UFP_90 (14)
+#define TUSB544_EQ_RX_DFP_110_UFP_94 (15)
+#define TUSB544_EQ_RX_MASK (0x0F)
-#define TUSB544_EQ_TX_DFP_MINUS14_UFP_MINUS33 (0 << 4)
-#define TUSB544_EQ_TX_DFP_04_UFP_MINUS15 (1 << 4)
-#define TUSB544_EQ_TX_DFP_17_UFP_0 (2 << 4)
-#define TUSB544_EQ_TX_DFP_32_UFP_14 (3 << 4)
-#define TUSB544_EQ_TX_DFP_41_UFP_24 (4 << 4)
-#define TUSB544_EQ_TX_DFP_52_UFP_35 (5 << 4)
-#define TUSB544_EQ_TX_DFP_61_UFP_43 (6 << 4)
-#define TUSB544_EQ_TX_DFP_69_UFP_52 (7 << 4)
-#define TUSB544_EQ_TX_DFP_77_UFP_60 (8 << 4)
-#define TUSB544_EQ_TX_DFP_83_UFP_66 (9 << 4)
-#define TUSB544_EQ_TX_DFP_88_UFP_72 (10 << 4)
-#define TUSB544_EQ_TX_DFP_94_UFP_77 (11 << 4)
-#define TUSB544_EQ_TX_DFP_98_UFP_81 (12 << 4)
-#define TUSB544_EQ_TX_DFP_103_UFP_86 (13 << 4)
-#define TUSB544_EQ_TX_DFP_106_UFP_90 (14 << 4)
-#define TUSB544_EQ_TX_DFP_110_UFP_94 (15 << 4)
-#define TUSB544_EQ_TX_MASK (0xF0)
+#define TUSB544_EQ_TX_DFP_MINUS14_UFP_MINUS33 (0 << 4)
+#define TUSB544_EQ_TX_DFP_04_UFP_MINUS15 (1 << 4)
+#define TUSB544_EQ_TX_DFP_17_UFP_0 (2 << 4)
+#define TUSB544_EQ_TX_DFP_32_UFP_14 (3 << 4)
+#define TUSB544_EQ_TX_DFP_41_UFP_24 (4 << 4)
+#define TUSB544_EQ_TX_DFP_52_UFP_35 (5 << 4)
+#define TUSB544_EQ_TX_DFP_61_UFP_43 (6 << 4)
+#define TUSB544_EQ_TX_DFP_69_UFP_52 (7 << 4)
+#define TUSB544_EQ_TX_DFP_77_UFP_60 (8 << 4)
+#define TUSB544_EQ_TX_DFP_83_UFP_66 (9 << 4)
+#define TUSB544_EQ_TX_DFP_88_UFP_72 (10 << 4)
+#define TUSB544_EQ_TX_DFP_94_UFP_77 (11 << 4)
+#define TUSB544_EQ_TX_DFP_98_UFP_81 (12 << 4)
+#define TUSB544_EQ_TX_DFP_103_UFP_86 (13 << 4)
+#define TUSB544_EQ_TX_DFP_106_UFP_90 (14 << 4)
+#define TUSB544_EQ_TX_DFP_110_UFP_94 (15 << 4)
+#define TUSB544_EQ_TX_MASK (0xF0)
enum tusb544_ct_sel {
TUSB544_CTL_SEL_DISABLED,
@@ -66,10 +65,10 @@ enum tusb544_ct_sel {
TUSB544_CTL_SEL_DP_USB,
};
-#define TUSB544_REG_GENERAL6 0x0C
-#define TUSB544_GEN6_DIR_SEL GENMASK(1, 0)
-#define TUSB544_VOD_DCGAIN_SEL GENMASK(5, 2)
-#define TUSB544_VOD_DCGAIN_OVERRIDE BIT(6)
+#define TUSB544_REG_GENERAL6 0x0C
+#define TUSB544_GEN6_DIR_SEL GENMASK(1, 0)
+#define TUSB544_VOD_DCGAIN_SEL GENMASK(5, 2)
+#define TUSB544_VOD_DCGAIN_OVERRIDE BIT(6)
enum tusb544_dir_sel {
TUSB544_DIR_SEL_USB_DP_SRC,
@@ -93,17 +92,17 @@ enum tusb544_vod_dcgain_sel {
* Note: TUSB544 automatically snoops DP lanes to enable, but may be manually
* directed which lanes to turn on when snoop is disabled
*/
-#define TUSB544_REG_DP4 0x13
-#define TUSB544_DP4_DP0_DISABLE BIT(0)
-#define TUSB544_DP4_DP1_DISABLE BIT(1)
-#define TUSB544_DP4_DP2_DISABLE BIT(2)
-#define TUSB544_DP4_DP3_DISABLE BIT(3)
-#define TUSB544_DP4_AUX_SBU_OVR GENMASK(5, 4)
-#define TUSB544_DP4_AUX_SNOOP_DISABLE BIT(7)
+#define TUSB544_REG_DP4 0x13
+#define TUSB544_DP4_DP0_DISABLE BIT(0)
+#define TUSB544_DP4_DP1_DISABLE BIT(1)
+#define TUSB544_DP4_DP2_DISABLE BIT(2)
+#define TUSB544_DP4_DP3_DISABLE BIT(3)
+#define TUSB544_DP4_AUX_SBU_OVR GENMASK(5, 4)
+#define TUSB544_DP4_AUX_SNOOP_DISABLE BIT(7)
extern const struct usb_mux_driver tusb544_drv;
int tusb544_i2c_field_update8(const struct usb_mux *me, int offset,
- uint8_t field_mask, uint8_t set_value);
+ uint8_t field_mask, uint8_t set_value);
#endif