From 43b53e004573a56a255ca57d4a6d04ac4bed44d7 Mon Sep 17 00:00:00 2001 From: Peter Marheine Date: Mon, 14 Nov 2022 11:53:32 +1100 Subject: Add default implementation of board_set_charge_limit The majority of boards simply call charge_set_input_current_limit() from board_set_charge_limit() now that the minimum current limit and derating are available as config options. Make this the default behavior of the charge manager, overridable by boards as needed. Boards that have existing custom behavior retain it, with their versions of board_set_charge_limit() marked as __override as necessary. BUG=b:163093572 TEST=make buildall; zmake build -a BRANCH=none Signed-off-by: Peter Marheine Change-Id: I72475ca0e8381596cafbcda4b042c7f884ae0432 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4022857 Reviewed-by: Keith Short --- board/puff/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'board/puff/board.c') diff --git a/board/puff/board.c b/board/puff/board.c index d863b5fc0b..5475773aa0 100644 --- a/board/puff/board.c +++ b/board/puff/board.c @@ -88,8 +88,8 @@ uint16_t tcpc_get_alert_status(void) } /* Called when the charge manager has switched to a new port. */ -void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma, - int charge_mv) +__override void board_set_charge_limit(int port, int supplier, int charge_ma, + int max_ma, int charge_mv) { /* Blink alert if insufficient power per system_can_boot_ap(). */ int insufficient_power = -- cgit v1.2.1