From 3b0e13173dc5f082488b7fa1fe774222ea6fa983 Mon Sep 17 00:00:00 2001 From: Rong Chang Date: Thu, 12 Jul 2012 18:45:34 +0800 Subject: Debounce charging voltage when cross 8.0V Link battery pack specification suggested a lower charging current when voltage pass 8.0V. But the lowering the current in constant current phase leads voltage drop. And the battery goes back to high current zone, < 8.0V. This CL adds a 10 seconds debounce time to prevent charging current change too quickly. Signed-off-by: Rong Chang BUG=chrome-os-partner:9572 TEST=manual watch battery V+ on oscilloscope when charging voltage cross 8.0V Change-Id: I002f941e33b029e38f813ab2e292c6b73a054352 Reviewed-on: https://gerrit.chromium.org/gerrit/27275 Commit-Ready: Rong Chang Reviewed-by: Rong Chang Tested-by: Rong Chang --- include/charge_state.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/charge_state.h') diff --git a/include/charge_state.h b/include/charge_state.h index 672dab3e8b..c9129c03a5 100644 --- a/include/charge_state.h +++ b/include/charge_state.h @@ -97,9 +97,10 @@ struct power_state_context { /* Charger and battery pack info */ const struct charger_info *charger; const struct battery_info *battery; - /* Charger update timestamp */ + /* Charging timestamps */ timestamp_t charger_update_time; timestamp_t trickle_charging_time; + timestamp_t voltage_debounce_time; }; /* Trickle charging state handler. -- cgit v1.2.1