summaryrefslogtreecommitdiff
path: root/include/battery.h
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@chromium.org>2019-09-10 17:58:16 +0000
committerCommit Bot <commit-bot@chromium.org>2019-10-01 12:52:59 +0000
commit2d592c8b467b99061dad3f0b7552bc4b184f444a (patch)
tree077c4b0d73fd187c20738e8233ca7d1cd564f211 /include/battery.h
parent1db81be6d747c8c90ddb3f1e93dadc230506b859 (diff)
downloadchrome-ec-2d592c8b467b99061dad3f0b7552bc4b184f444a.tar.gz
battery: add precharge voltage
Add a precharge_voltage field to batt_info in case we need its value differ from voltage_min, and set precharge_voltage = 3.4V according to battery spec. BUG=b:139012899 TEST=observe the charging curve (see issue link above for test result) BRANCH=master Change-Id: I2e4b240a12cd023ed90aaeda922e10b262508624 Signed-off-by: Ting Shen <phoenixshen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1795491 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/battery.h')
-rw-r--r--include/battery.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/battery.h b/include/battery.h
index 85f8f2cc2b..7052e2d663 100644
--- a/include/battery.h
+++ b/include/battery.h
@@ -125,11 +125,17 @@ int battery_get_avg_voltage(void); /* in mV */
/* Battery constants */
struct battery_info {
- /* Design voltage in mV */
+ /* Operation voltage in mV */
int voltage_max;
int voltage_normal;
int voltage_min;
/* (TODO(chromium:756700): add desired_charging_current */
+ /**
+ * Pre-charge to fast charge threshold in mV,
+ * default to voltage_min if not specified.
+ * This option is only available on isl923x and rt946x.
+ */
+ int precharge_voltage;
/* Pre-charge current in mA */
int precharge_current;
/* Working temperature ranges in degrees C */