board/coral/battery.c: Format with clang-format
BRANCH=none
TEST=none
@@ -412,7 +412,8 @@ BUILD_ASSERT(ARRAY_SIZE(info) == BATTERY_TYPE_COUNT);
static inline const struct board_batt_params *board_get_batt_params(void)
{
return &info[board_battery_type == BATTERY_TYPE_COUNT ?
- DEFAULT_BATTERY_TYPE : board_battery_type];
+ DEFAULT_BATTERY_TYPE :
+ board_battery_type];
}
/* Get type of the battery connected on the board */
@@ -428,10 +429,12 @@ static int board_get_battery_type(void)
if (info[i].fuel_gauge.device_name == NULL) {
board_battery_type = i;
break;
- } else if (!battery_device_name(device_name,
+ } else if (!battery_device_name(
+ device_name,
sizeof(device_name))) {
if (!strcasecmp(device_name,
- info[i].fuel_gauge.device_name)) {
+ info[i].fuel_gauge
+ .device_name)) {
board_battery_type = i;
break;
}
@@ -548,12 +551,12 @@ enum battery_present battery_hw_present(void)
return gpio_get_level(GPIO_EC_BATT_PRES_L) ? BP_NO : BP_YES;
}
-
static int battery_init(void)
{
int batt_status;
- return battery_status(&batt_status) ? 0 :
+ return battery_status(&batt_status) ?
+ 0 :
!!(batt_status & STATUS_INITIALIZED);
}
@@ -595,7 +598,8 @@ static int battery_check_disconnect(void)
/* Read the status of charge/discharge FETs */
if (info[board_battery_type].fuel_gauge.fet.mfgacc_support == 1) {
rv = sb_read_mfgacc(PARAM_OPERATION_STATUS,
- SB_ALT_MANUFACTURER_ACCESS, data, sizeof(data));
+ SB_ALT_MANUFACTURER_ACCESS, data,
+ sizeof(data));
/* Get the lowest 16bits of the OperationStatus() data */
reg = data[2] | data[3] << 8;
} else
@@ -674,7 +678,6 @@ int board_battery_initialized(void)
return battery_hw_present() == batt_pres_prev;
}
-
/* Customs options controllable by host command. */
#define PARAM_FASTCHARGE (CS_PARAM_CUSTOM_PROFILE_MIN + 0)
#define PARAM_LEARN_MODE 0x10001
