common/peripheral_charger.c: Format with clang-format
BRANCH=none
TEST=none
@@ -118,7 +118,8 @@ static void _clear_port(struct pchg *ctx)
}
__overridable void board_pchg_power_on(int port, bool on)
-{}
+{
+}
static enum pchg_state pchg_reset(struct pchg *ctx)
{
@@ -538,7 +539,6 @@ void pchg_irq(enum gpio_signal signal)
}
}
-
static void pchg_startup(void)
{
struct pchg *ctx;
@@ -630,8 +630,8 @@ static enum ec_status hc_pchg(struct host_cmd_handler_args *args)
ctx = &pchgs[port];
- if (ctx->state == PCHG_STATE_CONNECTED
- && ctx->battery_percent >= ctx->cfg->full_percent)
+ if (ctx->state == PCHG_STATE_CONNECTED &&
+ ctx->battery_percent >= ctx->cfg->full_percent)
r->state = PCHG_STATE_FULL;
else
r->state = ctx->state;
@@ -643,7 +643,8 @@ static enum ec_status hc_pchg(struct host_cmd_handler_args *args)
r->dropped_host_event_count = ctx->dropped_host_event_count;
args->response_size = args->version == 1 ?
- sizeof(struct ec_response_pchg) : sizeof(*r);
+ sizeof(struct ec_response_pchg) :
+ sizeof(*r);
return EC_RES_SUCCESS;
}
@@ -758,11 +759,11 @@ static int cc_pchg(int argc, char **argv)
ctx = &pchgs[port];
if (argc == 2) {
- ccprintf("P%d STATE_%s EVENT_%s SOC=%d%%\n",
- port, _text_state(ctx->state), _text_event(ctx->event),
+ ccprintf("P%d STATE_%s EVENT_%s SOC=%d%%\n", port,
+ _text_state(ctx->state), _text_event(ctx->event),
ctx->battery_percent);
- ccprintf("error=0x%x dropped=%u fw_version=0x%x\n",
- ctx->error, ctx->dropped_event_count, ctx->fw_version);
+ ccprintf("error=0x%x dropped=%u fw_version=0x%x\n", ctx->error,
+ ctx->dropped_event_count, ctx->fw_version);
return EC_SUCCESS;
}
