zephyr/projects/corsola/src/usbc_config.c: Format with clang-format
BRANCH=none
TEST=none
@@ -67,9 +67,10 @@ __override uint8_t board_get_usb_pd_port_count(void)
/* USB-A */
void usb_a0_interrupt(enum gpio_signal signal)
{
- enum usb_charge_mode mode = gpio_pin_get_dt(
- GPIO_DT_FROM_NODELABEL(gpio_ap_xhci_init_done)) ?
- USB_CHARGE_MODE_ENABLED : USB_CHARGE_MODE_DISABLED;
+ enum usb_charge_mode mode = gpio_pin_get_dt(GPIO_DT_FROM_NODELABEL(
+ gpio_ap_xhci_init_done)) ?
+ USB_CHARGE_MODE_ENABLED :
+ USB_CHARGE_MODE_DISABLED;
const int xhci_stat = gpio_get_level(signal);
@@ -96,16 +97,15 @@ void usb_a0_interrupt(enum gpio_signal signal)
__override enum pd_dual_role_states pd_get_drp_state_in_s0(void)
{
- if (gpio_pin_get_dt(
- GPIO_DT_FROM_NODELABEL(gpio_ap_xhci_init_done))) {
+ if (gpio_pin_get_dt(GPIO_DT_FROM_NODELABEL(gpio_ap_xhci_init_done))) {
return PD_DRP_TOGGLE_ON;
} else {
return PD_DRP_FORCE_SINK;
}
}
-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)
{
charge_set_input_current_limit(
MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT), charge_mv);
@@ -127,8 +127,8 @@ int debounced_hpd;
static void ps185_hdmi_hpd_deferred(void)
{
- const int new_hpd = gpio_pin_get_dt(
- GPIO_DT_FROM_ALIAS(gpio_ps185_ec_dp_hpd));
+ const int new_hpd =
+ gpio_pin_get_dt(GPIO_DT_FROM_ALIAS(gpio_ps185_ec_dp_hpd));
/* HPD status not changed, probably a glitch, just return. */
if (debounced_hpd == new_hpd) {
@@ -155,8 +155,7 @@ static void ps185_hdmi_hpd_deferred(void)
0, /* power low? ... no */
(!!DP_FLAGS_DP_ON));
/* update C1 virtual mux */
- usb_mux_set(USBC_PORT_C1,
- USB_PD_MUX_DP_ENABLED,
+ usb_mux_set(USBC_PORT_C1, USB_PD_MUX_DP_ENABLED,
USB_SWITCH_DISCONNECT,
0 /* polarity, don't care */);
@@ -171,8 +170,8 @@ DECLARE_DEFERRED(ps185_hdmi_hpd_deferred);
static void ps185_hdmi_hpd_disconnect_deferred(void)
{
- const int new_hpd = gpio_pin_get_dt(
- GPIO_DT_FROM_ALIAS(gpio_ps185_ec_dp_hpd));
+ const int new_hpd =
+ gpio_pin_get_dt(GPIO_DT_FROM_ALIAS(gpio_ps185_ec_dp_hpd));
if (debounced_hpd == new_hpd && !new_hpd) {
dp_status[USBC_PORT_C1] =
@@ -188,7 +187,6 @@ static void ps185_hdmi_hpd_disconnect_deferred(void)
USB_SWITCH_DISCONNECT,
0 /* polarity, don't care */);
}
-
}
DECLARE_DEFERRED(ps185_hdmi_hpd_disconnect_deferred);
