Common: Fix factory mode hook by override function

1. factory mode is blocked by the override function.

BUG=chrome-os-partner:60338
BRANCH=master
TEST=`make -j buildall`,`ectool chargecontrol discharge will work`

Change-Id: I0570a15351d1a5a08797749906b000e7bfc0534b
Signed-off-by: Ryan Zhang <Ryan.Zhang@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/414969
Commit-Ready: Ryan Zhang <ryan.zhang.quanta@gmail.com>
Tested-by: Ryan Zhang <ryan.zhang.quanta@gmail.com>
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
Ryan Zhang
2016-11-29 15:13:30 +08:00
committed by chrome-bot
parent b1014fc6bf
commit 46ed8a026f

View File

@@ -835,9 +835,11 @@ void charger_task(void)
wait_for_it:
#ifdef CONFIG_CHARGER_PROFILE_OVERRIDE
sleep_usec = charger_profile_override(&curr);
if (sleep_usec < 0)
problem(PR_CUSTOM, sleep_usec);
if (chg_ctl_mode == CHARGE_CONTROL_NORMAL) {
sleep_usec = charger_profile_override(&curr);
if (sleep_usec < 0)
problem(PR_CUSTOM, sleep_usec);
}
#endif
/* Keep the AP informed */