baseboard/honeybuns/usbc_support.c: Format with clang-format
BRANCH=none
TEST=none
@@ -48,17 +48,13 @@ __maybe_unused static __const_data const char * const usbc_state_names[] = {
static int read_reg(uint8_t port, int reg, int *regval)
{
return i2c_read8(ppc_chips[port].i2c_port,
- ppc_chips[port].i2c_addr_flags,
- reg,
- regval);
+ ppc_chips[port].i2c_addr_flags, reg, regval);
}
static int write_reg(uint8_t port, int reg, int regval)
{
return i2c_write8(ppc_chips[port].i2c_port,
- ppc_chips[port].i2c_addr_flags,
- reg,
- regval);
+ ppc_chips[port].i2c_addr_flags, reg, regval);
}
static int baseboard_ppc_enable_sink_path(int port)
@@ -147,7 +143,6 @@ static void baseboard_ucpd_apply_rd(int port)
STM32_PWR_CR3 |= STM32_PWR_CR3_UCPD1_DBDIS;
}
-
static void baseboard_ucpd_get_cc(int port, enum tcpc_cc_voltage_status *cc1,
enum tcpc_cc_voltage_status *cc2)
{
@@ -325,10 +320,8 @@ int c1_ps8805_is_sourcing_vbus(int port)
return level;
}
-
int c1_ps8805_vbus_source_enable(int port, int enable)
{
-
return ps8805_gpio_set_level(port, PS8805_GPIO_1, enable);
}
@@ -359,10 +352,11 @@ static void baseboard_usb3_manage_vbus(void)
#ifdef GPIO_USB_HUB_OCP_NOTIFY
/*
- * In the case of an OCP event on this port, the usb hub should be
- * notified via a GPIO signal. Following, an OCP, the attached.src state
- * for the usb3 only port is checked again. If it's attached, then make
- * sure the OCP notify signal is reset.
+ * In the case of an OCP event on this port, the usb hub should
+ * be notified via a GPIO signal. Following, an OCP, the
+ * attached.src state for the usb3 only port is checked again.
+ * If it's attached, then make sure the OCP notify signal is
+ * reset.
*/
gpio_set_level(GPIO_USB_HUB_OCP_NOTIFY, 1);
#endif
@@ -436,7 +430,8 @@ static void baseboard_usbc_usb3_handle_interrupt(void)
CPRINTS("usb3_ppc: VBUS OC!");
gpio_set_level(GPIO_USB_HUB_OCP_NOTIFY, 0);
if (++ppc_ocp_count < 5)
- hook_call_deferred(&baseboard_usb3_manage_vbus_data,
+ hook_call_deferred(
+ &baseboard_usb3_manage_vbus_data,
USB_HUB_OCP_RESET_MSEC);
else
CPRINTS("usb3_ppc: VBUS OC limit reached!");
@@ -466,7 +461,6 @@ static void baseboard_usbc_usb3_handle_interrupt(void)
/* Clear the interrupt sources. */
write_reg(port, SN5S330_INT_TRIP_RISE_REG2, rise);
write_reg(port, SN5S330_INT_TRIP_FALL_REG2, fall);
-
}
}
DECLARE_DEFERRED(baseboard_usbc_usb3_handle_interrupt);
