board/herobrine/usbc_config.c: Format with clang-format
BRANCH=none
TEST=none
@@ -84,16 +84,12 @@ void ppc_interrupt(enum gpio_signal signal)
/* Power Path Controller */
struct ppc_config_t ppc_chips[] = {
- {
- .i2c_port = I2C_PORT_TCPC0,
+ { .i2c_port = I2C_PORT_TCPC0,
.i2c_addr_flags = SN5S330_ADDR0_FLAGS,
- .drv = &sn5s330_drv
- },
- {
- .i2c_port = I2C_PORT_TCPC1,
+ .drv = &sn5s330_drv },
+ { .i2c_port = I2C_PORT_TCPC1,
.i2c_addr_flags = SN5S330_ADDR0_FLAGS,
- .drv = &sn5s330_drv
- },
+ .drv = &sn5s330_drv },
};
unsigned int ppc_cnt = ARRAY_SIZE(ppc_chips);
@@ -232,8 +228,7 @@ void board_overcurrent_event(int port, int is_overcurrented)
int board_set_active_charge_port(int port)
{
- int is_real_port = (port >= 0 &&
- port < CONFIG_USB_PD_PORT_MAX_COUNT);
+ int is_real_port = (port >= 0 && port < CONFIG_USB_PD_PORT_MAX_COUNT);
int i;
if (!is_real_port && port != CHARGE_PORT_NONE)
@@ -261,7 +256,6 @@ int board_set_active_charge_port(int port)
return EC_ERROR_INVAL;
}
-
CPRINTS("New charge port: p%d", port);
/*
@@ -285,23 +279,21 @@ int board_set_active_charge_port(int port)
return EC_SUCCESS;
}
-void board_set_charge_limit(int port, int supplier, int charge_ma,
- int max_ma, int charge_mv)
+void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma,
+ int charge_mv)
{
/*
* Ignore lower charge ceiling on PD transition if our battery is
* critical, as we may brownout.
*/
- if (supplier == CHARGE_SUPPLIER_PD &&
- charge_ma < 1500 &&
+ if (supplier == CHARGE_SUPPLIER_PD && charge_ma < 1500 &&
charge_get_percent() < CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON) {
CPRINTS("Using max ilim %d", max_ma);
charge_ma = max_ma;
}
- charge_set_input_current_limit(MAX(charge_ma,
- CONFIG_CHARGER_INPUT_CURRENT),
- charge_mv);
+ charge_set_input_current_limit(
+ MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT), charge_mv);
}
uint16_t tcpc_get_alert_status(void)
