driver/battery/bq27541.c: Format with clang-format
BRANCH=none
TEST=none
@@ -273,10 +273,9 @@ enum battery_present battery_is_present(void)
void battery_get_params(struct batt_params *batt)
{
int v;
- const uint32_t flags_to_check = BATT_FLAG_BAD_TEMPERATURE |
- BATT_FLAG_BAD_STATE_OF_CHARGE |
- BATT_FLAG_BAD_VOLTAGE |
- BATT_FLAG_BAD_CURRENT;
+ const uint32_t flags_to_check =
+ BATT_FLAG_BAD_TEMPERATURE | BATT_FLAG_BAD_STATE_OF_CHARGE |
+ BATT_FLAG_BAD_VOLTAGE | BATT_FLAG_BAD_CURRENT;
/* Reset flags */
batt->flags = 0;
@@ -287,8 +286,8 @@ void battery_get_params(struct batt_params *batt)
if (bq27541_read8(REG_STATE_OF_CHARGE, &v) && fake_state_of_charge < 0)
batt->flags |= BATT_FLAG_BAD_STATE_OF_CHARGE;
- batt->state_of_charge = fake_state_of_charge >= 0 ?
- fake_state_of_charge : v;
+ batt->state_of_charge =
+ fake_state_of_charge >= 0 ? fake_state_of_charge : v;
if (bq27541_read(REG_VOLTAGE, &batt->voltage))
batt->flags |= BATT_FLAG_BAD_VOLTAGE;
@@ -312,7 +311,6 @@ void battery_get_params(struct batt_params *batt)
batt->flags |= BATT_FLAG_RESPONSIVE;
batt->is_present = BP_YES;
} else {
-
/* If all of those reads error, the battery is not present */
batt->is_present = BP_NO;
}
@@ -405,8 +403,7 @@ static int command_battfake(int argc, char **argv)
}
if (fake_state_of_charge >= 0)
- ccprintf("Fake batt %d%%\n",
- fake_state_of_charge);
+ ccprintf("Fake batt %d%%\n", fake_state_of_charge);
return EC_SUCCESS;
}
