summaryrefslogtreecommitdiff
path: root/board/panqueque
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 13:58:27 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-28 12:23:22 +0000
commitec4c53d121e335bac31caf4c3a39056ab9fdb54c (patch)
tree3f519bedb7375e682a649bd56689352d98392de9 /board/panqueque
parent723d875fd093f4392e73009cac3afaa54f85e0a3 (diff)
downloadchrome-ec-ec4c53d121e335bac31caf4c3a39056ab9fdb54c.tar.gz
board/panqueque/board.c: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: I16aeb82ad93f43f13fe0a5b6174fc269f24d4741 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728811 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'board/panqueque')
-rw-r--r--board/panqueque/board.c82
1 files changed, 37 insertions, 45 deletions
diff --git a/board/panqueque/board.c b/board/panqueque/board.c
index cea834c75e..c134105b1b 100644
--- a/board/panqueque/board.c
+++ b/board/panqueque/board.c
@@ -28,8 +28,8 @@
#include "usb_tc_sm.h"
#include "util.h"
-#define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ## args)
-#define CPRINTF(format, args...) cprintf(CC_SYSTEM, format, ## args)
+#define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ##args)
+#define CPRINTF(format, args...) cprintf(CC_SYSTEM, format, ##args)
#define QUICHE_PD_DEBUG_LVL 1
@@ -84,25 +84,25 @@ static void board_usbc_usb3_interrupt(enum gpio_signal signal)
* signals is driven by USB/MST hub power sequencing requirements.
*/
const struct power_seq board_power_seq[] = {
- {GPIO_EN_AC_JACK, 1, 20},
- {GPIO_EC_DFU_MUX_CTRL, 0, 0},
- {GPIO_EN_PP5000_A, 1, 31},
- {GPIO_MST_LP_CTL_L, 1, 0},
- {GPIO_EN_PP3300_B, 1, 1},
- {GPIO_EN_PP1100_A, 1, 100+30},
- {GPIO_EN_BB, 1, 30},
- {GPIO_EN_PP1050_A, 1, 30},
- {GPIO_EN_PP1200_A, 1, 20},
- {GPIO_EN_PP5000_C, 1, 20},
- {GPIO_EN_PP5000_HSPORT, 1, 31},
- {GPIO_EN_DP_SINK, 1, 80},
- {GPIO_MST_RST_L, 1, 61},
- {GPIO_EC_HUB2_RESET_L, 1, 41},
- {GPIO_EC_HUB3_RESET_L, 1, 33},
- {GPIO_DP_SINK_RESET, 1, 100},
- {GPIO_USBC_UF_RESET_L, 1, 33},
- {GPIO_DEMUX_DP_HDMI_PD_N, 1, 10},
- {GPIO_DEMUX_DP_HDMI_MODE, 1, 5},
+ { GPIO_EN_AC_JACK, 1, 20 },
+ { GPIO_EC_DFU_MUX_CTRL, 0, 0 },
+ { GPIO_EN_PP5000_A, 1, 31 },
+ { GPIO_MST_LP_CTL_L, 1, 0 },
+ { GPIO_EN_PP3300_B, 1, 1 },
+ { GPIO_EN_PP1100_A, 1, 100 + 30 },
+ { GPIO_EN_BB, 1, 30 },
+ { GPIO_EN_PP1050_A, 1, 30 },
+ { GPIO_EN_PP1200_A, 1, 20 },
+ { GPIO_EN_PP5000_C, 1, 20 },
+ { GPIO_EN_PP5000_HSPORT, 1, 31 },
+ { GPIO_EN_DP_SINK, 1, 80 },
+ { GPIO_MST_RST_L, 1, 61 },
+ { GPIO_EC_HUB2_RESET_L, 1, 41 },
+ { GPIO_EC_HUB3_RESET_L, 1, 33 },
+ { GPIO_DP_SINK_RESET, 1, 100 },
+ { GPIO_USBC_UF_RESET_L, 1, 33 },
+ { GPIO_DEMUX_DP_HDMI_PD_N, 1, 10 },
+ { GPIO_DEMUX_DP_HDMI_MODE, 1, 5 },
};
const size_t board_power_seq_count = ARRAY_SIZE(board_power_seq);
@@ -110,13 +110,13 @@ const size_t board_power_seq_count = ARRAY_SIZE(board_power_seq);
* Define the strings used in our USB descriptors.
*/
const void *const usb_strings[] = {
- [USB_STR_DESC] = usb_string_desc,
- [USB_STR_VENDOR] = USB_STRING_DESC("Plugable"),
- [USB_STR_PRODUCT] = USB_STRING_DESC("UC-MSTHDC"),
- [USB_STR_SERIALNO] = 0,
- [USB_STR_VERSION] =
- USB_STRING_DESC(CROS_EC_SECTION ":" CROS_EC_VERSION32),
- [USB_STR_UPDATE_NAME] = USB_STRING_DESC("Firmware update"),
+ [USB_STR_DESC] = usb_string_desc,
+ [USB_STR_VENDOR] = USB_STRING_DESC("Plugable"),
+ [USB_STR_PRODUCT] = USB_STRING_DESC("UC-MSTHDC"),
+ [USB_STR_SERIALNO] = 0,
+ [USB_STR_VERSION] =
+ USB_STRING_DESC(CROS_EC_SECTION ":" CROS_EC_VERSION32),
+ [USB_STR_UPDATE_NAME] = USB_STRING_DESC("Firmware update"),
};
BUILD_ASSERT(ARRAY_SIZE(usb_strings) == USB_STR_COUNT);
@@ -135,8 +135,7 @@ struct ppc_config_t ppc_chips[] = {
* PS8802 set mux board tuning.
* Adds in board specific gain and DP lane count configuration
*/
-static int board_ps8822_mux_set(const struct usb_mux *me,
- mux_state_t mux_state)
+static int board_ps8822_mux_set(const struct usb_mux *me, mux_state_t mux_state)
{
int rv = EC_SUCCESS;
@@ -167,16 +166,12 @@ const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
/* USB-C PPC Configuration */
struct ppc_config_t ppc_chips[CONFIG_USB_PD_PORT_MAX_COUNT] = {
- [USB_PD_PORT_HOST] = {
- .i2c_port = I2C_PORT_I2C1,
- .i2c_addr_flags = SN5S330_ADDR0_FLAGS,
- .drv = &sn5s330_drv
- },
- [USB_PD_PORT_USB3] = {
- .i2c_port = I2C_PORT_I2C3,
- .i2c_addr_flags = SN5S330_ADDR1_FLAGS,
- .drv = &sn5s330_drv
- },
+ [USB_PD_PORT_HOST] = { .i2c_port = I2C_PORT_I2C1,
+ .i2c_addr_flags = SN5S330_ADDR0_FLAGS,
+ .drv = &sn5s330_drv },
+ [USB_PD_PORT_USB3] = { .i2c_port = I2C_PORT_I2C3,
+ .i2c_addr_flags = SN5S330_ADDR1_FLAGS,
+ .drv = &sn5s330_drv },
};
unsigned int ppc_cnt = ARRAY_SIZE(ppc_chips);
@@ -284,14 +279,13 @@ static void board_usb_tc_disconnect(void)
if (port == USB_PD_PORT_HOST)
gpio_set_level(GPIO_UFP_PLUG_DET, 1);
}
-DECLARE_HOOK(HOOK_USB_PD_DISCONNECT, board_usb_tc_disconnect,\
+DECLARE_HOOK(HOOK_USB_PD_DISCONNECT, board_usb_tc_disconnect,
HOOK_PRIO_DEFAULT);
#endif /* SECTION_IS_RW */
static void board_init(void)
{
-
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
@@ -356,6 +350,4 @@ static int command_dplane(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(dplane, command_dplane,
- "<2 | 4>",
- "MST lane control.");
+DECLARE_CONSOLE_COMMAND(dplane, command_dplane, "<2 | 4>", "MST lane control.");