common/battery_fuel_gauge.c: Format with clang-format
BRANCH=none
TEST=none
@@ -40,17 +40,14 @@ static bool authenticate_battery_type(int index, char *manuf_name)
/* device name is specified in table */
if (fuel_gauge->device_name != NULL) {
-
/* Get the device name */
- if (battery_device_name(device_name,
- sizeof(device_name)))
+ if (battery_device_name(device_name, sizeof(device_name)))
return false;
len = strlen(fuel_gauge->device_name);
/* device name mismatch */
- if (strncasecmp(device_name, fuel_gauge->device_name,
- len))
+ if (strncasecmp(device_name, fuel_gauge->device_name, len))
return false;
}
@@ -144,7 +141,8 @@ static inline const struct board_batt_params *get_batt_params(void)
int type = get_battery_type();
return &board_battery_info[type == BATTERY_TYPE_COUNT ?
- board_get_default_battery_type() : type];
+ board_get_default_battery_type() :
+ type];
}
const struct battery_info *battery_get_info(void)
@@ -308,8 +306,7 @@ enum battery_disconnect_state battery_get_disconnect_state(void)
if ((reg & board_battery_info[type].fuel_gauge.fet.reg_mask) ==
board_battery_info[type].fuel_gauge.fet.disconnect_val) {
CPRINTS("Batt disconnected: reg 0x%04x mask 0x%04x disc 0x%04x",
- reg,
- board_battery_info[type].fuel_gauge.fet.reg_mask,
+ reg, board_battery_info[type].fuel_gauge.fet.reg_mask,
board_battery_info[type].fuel_gauge.fet.disconnect_val);
return BATTERY_DISCONNECTED;
}
@@ -326,7 +323,8 @@ int battery_imbalance_mv(void)
* If battery type is unknown, we cannot safely access non-standard
* registers.
*/
- return (type == BATTERY_TYPE_COUNT) ? 0 :
+ return (type == BATTERY_TYPE_COUNT) ?
+ 0 :
board_battery_info[type].fuel_gauge.imbalance_mv();
}
