baseboard/kukui/battery_bq27541.c: Format with clang-format
BRANCH=none
TEST=none
#define CPRINTS(format, args...) cprints(CC_CHARGER, format, ##args)
-enum battery_type {
- BATTERY_CPT = 0,
- BATTERY_COUNT
-};
+enum battery_type { BATTERY_CPT = 0, BATTERY_COUNT };
static const struct battery_info info[] = {
[BATTERY_CPT] = {
@@ -159,12 +156,10 @@ int charger_profile_override(struct charge_state_data *curr)
curr->requested_voltage -= rcv;
/* Should not keep charging voltage > 4250mV for 48hrs. */
- if ((curr->state == ST_DISCHARGE) ||
- curr->chg.voltage < 4250) {
+ if ((curr->state == ST_DISCHARGE) || curr->chg.voltage < 4250) {
deadline_48.val = 0;
/* Starting count 48hours */
- } else if (curr->state == ST_CHARGE ||
- curr->state == ST_PRECHARGE) {
+ } else if (curr->state == ST_CHARGE || curr->state == ST_PRECHARGE) {
if (deadline_48.val == 0)
deadline_48.val = get_time().val +
CHARGER_LIMIT_TIMEOUT_HOURS * HOUR;
@@ -177,14 +172,13 @@ int charger_profile_override(struct charge_state_data *curr)
/* Should not keeep battery voltage > 4100mV and
* battery temperature > 45C for two hour
*/
- if (curr->state == ST_DISCHARGE ||
- curr->batt.voltage < 4100 ||
+ if (curr->state == ST_DISCHARGE || curr->batt.voltage < 4100 ||
bat_temp_c < 450) {
deadline_2.val = 0;
- } else if (curr->state == ST_CHARGE ||
- curr->state == ST_PRECHARGE) {
+ } else if (curr->state == ST_CHARGE || curr->state == ST_PRECHARGE) {
if (deadline_2.val == 0)
- deadline_2.val = get_time().val +
+ deadline_2.val =
+ get_time().val +
CHARGER_LIMIT_TIMEOUT_HOURS_TEMP * HOUR;
else if (timestamp_expired(deadline_2, NULL)) {
/* Set discharge and charging voltage = 4100mV */
