board/reef_mchp/battery.c: Format with clang-format
BRANCH=none
TEST=none
@@ -413,7 +413,8 @@ static int batt_sony_corp_init(void)
* : 0b - Allowed to Discharge
* : 1b - Not Allowed to Discharge
*/
- return sb_read(SB_MANUFACTURER_ACCESS, &batt_status) ? 0 :
+ return sb_read(SB_MANUFACTURER_ACCESS, &batt_status) ?
+ 0 :
!(batt_status & SONY_DISCHARGE_DISABLE_FET_BIT);
}
@@ -427,7 +428,8 @@ static int batt_panasonic_init(void)
* : 0b - Not Allowed to Discharge
* : 1b - Allowed to Discharge
*/
- return sb_read(SB_MANUFACTURER_ACCESS, &batt_status) ? 0 :
+ return sb_read(SB_MANUFACTURER_ACCESS, &batt_status) ?
+ 0 :
!!(batt_status & PANASONIC_DISCHARGE_ENABLE_FET_BIT);
}
@@ -441,7 +443,8 @@ static int batt_c22n1626_init(void)
* : 0b - Not Allowed to Discharge
* : 1b - Allowed to Discharge
*/
- return sb_read(SB_PACK_STATUS, &batt_status) ? 0 :
+ return sb_read(SB_PACK_STATUS, &batt_status) ?
+ 0 :
!!(batt_status & C22N1626_DISCHARGE_ENABLE_FET_BIT);
}
@@ -515,7 +518,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];
}
enum battery_present battery_hw_present(void)
@@ -545,8 +549,9 @@ static int board_get_battery_type(void)
/* Initialize fast charging parameters */
chg_params = board_get_batt_params()->fast_chg_params;
- prev_chg_profile_info = &chg_params->chg_profile_info[
- chg_params->default_temp_range_profile];
+ prev_chg_profile_info =
+ &chg_params->chg_profile_info
+ [chg_params->default_temp_range_profile];
return board_battery_type;
}
@@ -561,8 +566,7 @@ static int board_get_battery_type(void)
static void board_init_battery_type(void)
{
if (board_get_battery_type() != BATTERY_TYPE_COUNT)
- CPRINTS("found batt:%s",
- info[board_battery_type].manuf_name);
+ CPRINTS("found batt:%s", info[board_battery_type].manuf_name);
else
CPUTS("battery not found");
}
@@ -650,8 +654,8 @@ int charger_profile_override(struct charge_state_data *curr)
return 0;
}
- return charger_profile_override_common(curr,
- board_get_batt_params()->fast_chg_params,
+ return charger_profile_override_common(
+ curr, board_get_batt_params()->fast_chg_params,
&prev_chg_profile_info,
board_get_batt_params()->batt_info->voltage_max);
}
