common/usb_port_power_smart.c: Format with clang-format
BRANCH=none
TEST=none
@@ -34,7 +34,9 @@ static struct charge_mode_t charge_mode[CONFIG_USB_PORT_POWER_SMART_PORT_COUNT];
* If we only support CDP and SDP, the control signals are hard-wired so
* there's nothing to do. The only to do is set ILIM_SEL.
*/
-static void usb_charge_set_control_mode(int port_id, int mode) {}
+static void usb_charge_set_control_mode(int port_id, int mode)
+{
+}
#else /* !defined(CONFIG_USB_PORT_POWER_SMART_CDP_SDP_ONLY) */
static void usb_charge_set_control_mode(int port_id, int mode)
{
@@ -188,14 +190,13 @@ usb_charge_command_set_mode(struct host_cmd_handler_args *args)
{
const struct ec_params_usb_charge_set_mode *p = args->params;
- if (usb_charge_set_mode(p->usb_port_id, p->mode,
- p->inhibit_charge) != EC_SUCCESS)
+ if (usb_charge_set_mode(p->usb_port_id, p->mode, p->inhibit_charge) !=
+ EC_SUCCESS)
return EC_RES_ERROR;
return EC_RES_SUCCESS;
}
-DECLARE_HOST_COMMAND(EC_CMD_USB_CHARGE_SET_MODE,
- usb_charge_command_set_mode,
+DECLARE_HOST_COMMAND(EC_CMD_USB_CHARGE_SET_MODE, usb_charge_command_set_mode,
EC_VER_MASK(0));
/*****************************************************************************/
@@ -213,8 +214,8 @@ static void usb_charge_init(void)
const struct charge_mode_t *prev;
int version, size, i;
- prev = (const struct charge_mode_t *)system_get_jump_tag(USB_SYSJUMP_TAG,
- &version, &size);
+ prev = (const struct charge_mode_t *)system_get_jump_tag(
+ USB_SYSJUMP_TAG, &version, &size);
if (!prev || version != USB_HOOK_VERSION ||
size != sizeof(charge_mode)) {
@@ -234,8 +235,7 @@ static void usb_charge_resume(void)
/* Turn on USB ports on as we go into S0 from S3 or S5. */
for (i = 0; i < CONFIG_USB_PORT_POWER_SMART_PORT_COUNT; i++)
- usb_charge_set_mode(i,
- CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE,
+ usb_charge_set_mode(i, CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE,
charge_mode[i].inhibit_charging_in_suspend);
}
DECLARE_HOOK(HOOK_CHIPSET_RESUME, usb_charge_resume, HOOK_PRIO_DEFAULT);
