summaryrefslogtreecommitdiff
path: root/board/reef/battery.c
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2016-11-17 13:58:41 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-11-18 20:07:32 -0800
commit30d27606120cefd11cfe2efc3d506002198e5969 (patch)
tree4b31db173f20222f96f9cccd9ad6cc8c6fbcd0b6 /board/reef/battery.c
parent14421571ca39459e96bc97e53694a4592a3be384 (diff)
downloadchrome-ec-30d27606120cefd11cfe2efc3d506002198e5969.tar.gz
reef: Enable battery learn-mode when battery charging not allowed
When the battery charging is not allowed and charging at high load audible noise is observed from the BD9995X charger. To prevent this issue enable the battery-learn mode when battery charging is not allowed. This audible noise is related to the fact that in light load (<450mA being withdrawn from VSYS) the DCDC of the charger operates intermittently i.e. DCDC switches continuously and then stops to regulate the output voltage and current, and sometimes to prevent reverse current from flowing to the input. This causes a slight voltage ripple on VSYS that falls in the audible noise frequency (single digit kHz range). This small ripple generates audible noise in the output ceramic capacitors (caps on VSYS and any input of DCDC under VSYS). BUG=chrome-os-partner:56695 BRANCH=none TEST=When battery charging not allowed, battery is put in battery learn-mode & audible noise is not observed. Change-Id: Ia22779fe4cf70dd9dd4f799a9698264e44c4c7d2 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/412382 Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'board/reef/battery.c')
-rw-r--r--board/reef/battery.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/board/reef/battery.c b/board/reef/battery.c
index 9480dfd548..1f11dd390c 100644
--- a/board/reef/battery.c
+++ b/board/reef/battery.c
@@ -154,6 +154,8 @@ int charger_profile_override(struct charge_state_data *curr)
int batt_voltage;
static int prev_batt_voltage;
+ charger_discharge_on_ac(!(curr->batt.flags & BATT_FLAG_WANT_CHARGE));
+
/*
* Determine temperature range. The five ranges are:
* < 0C