diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 14:10:23 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-01 13:08:38 +0000 |
commit | 4b37da1eaeb9642685a9ec5e08c4c33d238861ba (patch) | |
tree | 0b2cfbc860002edb1e9363d469086762936904f0 /board/voema | |
parent | ae80fc82d10c3927a29f8be1b8281baa36b08ed0 (diff) | |
download | chrome-ec-4b37da1eaeb9642685a9ec5e08c4c33d238861ba.tar.gz |
board/voema/board.c: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: Iaaa5f7eaa1d962dd3fd8a1c4f4dbd8299510c9fc
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729071
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'board/voema')
-rw-r--r-- | board/voema/board.c | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/board/voema/board.c b/board/voema/board.c index c5afc2dee7..b2f2a5ea3e 100644 --- a/board/voema/board.c +++ b/board/voema/board.c @@ -42,7 +42,7 @@ #include "gpio_list.h" /* Must come after other header files. */ -#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) /* Keyboard scan setting */ __override struct keyboard_scan_config keyscan_config = { @@ -77,8 +77,8 @@ static const struct ec_response_keybd_config voema_kb = { .capabilities = KEYBD_CAP_SCRNLOCK_KEY, }; -__override const struct ec_response_keybd_config -*board_vivaldi_keybd_config(void) +__override const struct ec_response_keybd_config * +board_vivaldi_keybd_config(void) { return &voema_kb; } @@ -89,16 +89,15 @@ __override const struct ec_response_keybd_config * that we don't have pin 0. */ const int keyboard_factory_scan_pins[][2] = { - {-1, -1}, {0, 5}, {1, 1}, {1, 0}, {0, 6}, - {0, 7}, {-1, -1}, {-1, -1}, {1, 4}, {1, 3}, - {-1, -1}, {1, 6}, {1, 7}, {3, 1}, {2, 0}, - {1, 5}, {2, 6}, {2, 7}, {2, 1}, {2, 4}, - {2, 5}, {1, 2}, {2, 3}, {2, 2}, {3, 0}, - {-1, -1}, {0, 4}, {-1, -1}, {8, 2}, {-1, -1}, - {-1, -1}, + { -1, -1 }, { 0, 5 }, { 1, 1 }, { 1, 0 }, { 0, 6 }, { 0, 7 }, + { -1, -1 }, { -1, -1 }, { 1, 4 }, { 1, 3 }, { -1, -1 }, { 1, 6 }, + { 1, 7 }, { 3, 1 }, { 2, 0 }, { 1, 5 }, { 2, 6 }, { 2, 7 }, + { 2, 1 }, { 2, 4 }, { 2, 5 }, { 1, 2 }, { 2, 3 }, { 2, 2 }, + { 3, 0 }, { -1, -1 }, { 0, 4 }, { -1, -1 }, { 8, 2 }, { -1, -1 }, + { -1, -1 }, }; const int keyboard_factory_scan_pins_used = - ARRAY_SIZE(keyboard_factory_scan_pins); + ARRAY_SIZE(keyboard_factory_scan_pins); /******************************************************************************/ /* @@ -124,8 +123,8 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); /* * TODO(b/202062363): Remove when clang is fixed. */ -#define THERMAL_CPU \ - { \ +#define THERMAL_CPU \ + { \ .temp_host = { \ [EC_TEMP_THRESH_HIGH] = C_TO_K(70), \ [EC_TEMP_THRESH_HALT] = C_TO_K(80), \ @@ -150,8 +149,8 @@ __maybe_unused static const struct ec_thermal_config thermal_cpu = THERMAL_CPU; /* * TODO(b/202062363): Remove when clang is fixed. */ -#define THERMAL_INDUCTOR \ - { \ +#define THERMAL_INDUCTOR \ + { \ .temp_host = { \ [EC_TEMP_THRESH_HIGH] = C_TO_K(75), \ [EC_TEMP_THRESH_HALT] = C_TO_K(80), \ @@ -241,8 +240,7 @@ static void ps8815_reset(void) int val; gpio_set_level(GPIO_USB_C1_RT_RST_ODL, 0); - msleep(GENERIC_MAX(PS8XXX_RESET_DELAY_MS, - PS8815_PWR_H_RST_H_DELAY_MS)); + msleep(GENERIC_MAX(PS8XXX_RESET_DELAY_MS, PS8815_PWR_H_RST_H_DELAY_MS)); gpio_set_level(GPIO_USB_C1_RT_RST_ODL, 1); msleep(PS8815_FW_INIT_DELAY_MS); @@ -253,16 +251,16 @@ static void ps8815_reset(void) CPRINTS("%s: patching ps8815 registers", __func__); - if (i2c_read8(I2C_PORT_USB_C1, - PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, &val) == EC_SUCCESS) + if (i2c_read8(I2C_PORT_USB_C1, PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, &val) == + EC_SUCCESS) CPRINTS("ps8815: reg 0x0f was %02x", val); - if (i2c_write8(I2C_PORT_USB_C1, - PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, 0x31) == EC_SUCCESS) + if (i2c_write8(I2C_PORT_USB_C1, PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, + 0x31) == EC_SUCCESS) CPRINTS("ps8815: reg 0x0f set to 0x31"); - if (i2c_read8(I2C_PORT_USB_C1, - PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, &val) == EC_SUCCESS) + if (i2c_read8(I2C_PORT_USB_C1, PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, &val) == + EC_SUCCESS) CPRINTS("ps8815: reg 0x0f now %02x", val); } @@ -272,7 +270,7 @@ void board_reset_pd_mcu(void) /* Daughterboard specific reset for port 1 */ ps8815_reset(); usb_mux_hpd_update(USBC_PORT_C1, USB_PD_MUX_HPD_LVL_DEASSERTED | - USB_PD_MUX_HPD_IRQ_DEASSERTED); + USB_PD_MUX_HPD_IRQ_DEASSERTED); } __override void board_cbi_init(void) |