summaryrefslogtreecommitdiff
path: root/board/dojo
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 13:30:41 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-01 10:17:42 +0000
commit3df35c400b19625b65707fbefe44088ab7a9b19d (patch)
tree0f3fd2dc0738bb1c73c63f494b40b1eb576879d5 /board/dojo
parent595cac322979f9ac8551e314f2342f505d7fe239 (diff)
downloadchrome-ec-3df35c400b19625b65707fbefe44088ab7a9b19d.tar.gz
board/dojo/battery.c: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: I4489ca95b446dc9e8708819accb49e5936f8c4c7 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728249 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'board/dojo')
-rw-r--r--board/dojo/battery.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/board/dojo/battery.c b/board/dojo/battery.c
index 290bf6067c..40d1290309 100644
--- a/board/dojo/battery.c
+++ b/board/dojo/battery.c
@@ -178,19 +178,18 @@ int charger_profile_override(struct charge_state_data *curr)
chg_temp = K_TO_C(chg_temp);
prev_chg_lvl = chg_lvl;
- if (chg_temp <= temp_chg_table[chg_lvl].lo_thre &&
- chg_lvl > 0)
+ if (chg_temp <= temp_chg_table[chg_lvl].lo_thre && chg_lvl > 0)
chg_lvl--;
else if (chg_temp >= temp_chg_table[chg_lvl].hi_thre &&
- chg_lvl < CHG_LEVEL_COUNT - 1)
+ chg_lvl < CHG_LEVEL_COUNT - 1)
chg_lvl++;
curr->requested_current = MIN(curr->requested_current,
- temp_chg_table[chg_lvl].chg_curr);
+ temp_chg_table[chg_lvl].chg_curr);
- if(chg_lvl != prev_chg_lvl)
+ if (chg_lvl != prev_chg_lvl)
ccprints("Override chg curr to %dmA by chg LEVEL_%d",
- curr->requested_current, chg_lvl);
+ curr->requested_current, chg_lvl);
}
return 0;