diff options
author | Vic Yang <victoryang@chromium.org> | 2013-05-25 11:52:02 +0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-05-25 21:51:08 -0700 |
commit | 455fc92b195d1c0f58c84808bcc7a30ca0cc31e7 (patch) | |
tree | 72e9d3a6f8b7dc0e09f100a3c0657a072c955427 /common | |
parent | 006731860e490dc07bb3530b5d1dca0810309ccc (diff) | |
download | chrome-ec-455fc92b195d1c0f58c84808bcc7a30ca0cc31e7.tar.gz |
spring: Avoid over-current on the same PWM duty cycle
While in fast mode, we step on the same PWM duty cycle which caused
over-current. We should avoid this.
BUG=chrome-os-partner:18301
TEST=None
BRANCH=spring
Change-Id: Ib22eb7244d1f6173d4486dce7b85a55678318490
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/56674
Diffstat (limited to 'common')
-rw-r--r-- | common/extpower_usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/extpower_usb.c b/common/extpower_usb.c index 719527f4a3..97f74c64bb 100644 --- a/common/extpower_usb.c +++ b/common/extpower_usb.c @@ -318,8 +318,8 @@ static int pwm_get_next_lower(void) if (current_limit_mode == LIMIT_AGGRESSIVE) { if (pwm_fast_mode && - fast_next >= nominal_pwm_duty - PWM_CTRL_OC_MARGIN && - fast_next >= over_current_pwm_duty) + fast_next > nominal_pwm_duty - PWM_CTRL_OC_MARGIN && + fast_next > over_current_pwm_duty) return MAX(fast_next, 0); if (current_pwm_duty > nominal_pwm_duty - PWM_CTRL_OC_MARGIN && |