summaryrefslogtreecommitdiff
path: root/board/nocturne/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/nocturne/board.c')
-rw-r--r--board/nocturne/board.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/nocturne/board.c b/board/nocturne/board.c
index 1c0b2b3397..d32f036844 100644
--- a/board/nocturne/board.c
+++ b/board/nocturne/board.c
@@ -760,6 +760,19 @@ int board_set_active_charge_port(int port)
return EC_SUCCESS;
}
+void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma,
+ int charge_mv)
+{
+ int icl = MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT);
+
+ /*
+ * Nocturne seems to overdraw its set input current limit by about 5%.
+ * Request at most 95% of what's desired.
+ */
+ icl = icl * 95 / 100;
+ charge_set_input_current_limit(icl, charge_mv);
+}
+
static void board_chipset_reset(void)
{
board_report_pmic_fault("CHIPSET RESET");