summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/charge_ramp.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/common/charge_ramp.c b/common/charge_ramp.c
index 68a9c8ef96..3ca5bd89bb 100644
--- a/common/charge_ramp.c
+++ b/common/charge_ramp.c
@@ -11,8 +11,6 @@
#include "usb_charge.h"
#include "util.h"
-#define TYPEC_DTS_RAMP_MAX 2400
-
test_mockable int chg_ramp_allowed(int supplier)
{
/* Don't allow ramping in RO when write protected. */
@@ -37,17 +35,16 @@ test_mockable int chg_ramp_allowed(int supplier)
test_mockable int chg_ramp_max(int supplier, int sup_curr)
{
switch (supplier) {
- case CHARGE_SUPPLIER_TYPEC_DTS:
- /*
- * Ramp DTS suppliers to advertised current or predetermined
- * limit, whichever is greater.
- */
- return MAX(TYPEC_DTS_RAMP_MAX, sup_curr);
#ifdef CONFIG_CHARGE_RAMP_HW
case CHARGE_SUPPLIER_PD:
case CHARGE_SUPPLIER_TYPEC:
- return sup_curr;
#endif
+ case CHARGE_SUPPLIER_TYPEC_DTS:
+ /*
+ * We should not ramp DTS beyond what they advertise, otherwise
+ * we may brownout the systems they are connected to.
+ */
+ return sup_curr;
/* default: fall through */
}