dojo: Set max input current limit to 2944mA
Limit input current lower than 2944mA for safety.
BRANCH=cherry
TEST=make sure safety test pass.
@@ -380,6 +380,9 @@ const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
void board_set_charge_limit(int port, int supplier, int charge_ma,
int max_ma, int charge_mv)
{
+ /* Limit input current lower than 2944 mA for safety */
+ charge_ma = MIN(charge_ma, 2944);
+
charge_set_input_current_limit(
MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT), charge_mv);
}
