mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 00:21:46 +00:00
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
This commit is contained in:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user