summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/spring/usb_charging.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/board/spring/usb_charging.c b/board/spring/usb_charging.c
index 56916527d5..5556886cd6 100644
--- a/board/spring/usb_charging.c
+++ b/board/spring/usb_charging.c
@@ -61,7 +61,7 @@
#define I_LIMIT_3000MA 0
/* PWM control loop parameters */
-#define PWM_CTRL_MAX_DUTY 96 /* Minimum current for dead battery */
+#define PWM_CTRL_MAX_DUTY I_LIMIT_100MA /* Minimum current */
#define PWM_CTRL_BEGIN_OFFSET 90
#define PWM_CTRL_OC_MARGIN 15
#define PWM_CTRL_OC_DETECT_TIME (1200 * MSEC)
@@ -443,17 +443,10 @@ DECLARE_HOOK(HOOK_SECOND, board_pwm_tweak, HOOK_PRIO_DEFAULT);
void board_pwm_nominal_duty_cycle(int percent)
{
- int dummy;
int new_percent = percent;
new_percent += PWM_CTRL_BEGIN_OFFSET;
-
- /*
- * If the battery is dead, leave a minimum amount of current
- * input to sustain the system.
- */
- if (battery_current(&dummy))
- new_percent = MIN(new_percent, PWM_CTRL_MAX_DUTY);
+ new_percent = MIN(new_percent, PWM_CTRL_MAX_DUTY);
board_pwm_duty_cycle(new_percent);
nominal_pwm_duty = percent;