From d814285d6f6fc36ddc948ed9d65b451bcd0e2b21 Mon Sep 17 00:00:00 2001 From: Peter Marheine Date: Thu, 4 May 2023 13:07:16 +1000 Subject: sm5803: restore load-bearing ERROR_UNIMPLEMENTED The OCPC code seems to use ERROR_UNIMPLEMENTED as a signal that it should do some work, and SUCCESS as a signal that everything has been done. Always returning success appears to cause incorrect charging behavior: restore the unconditional ERROR_UNIMPLEMENTED that was removed in commit ae68afbb5d58ce7af0be3e04f833900b105021cd and change the test to reflect this. A note is added to the definition of this driver field to document that ERROR_UNIMPLEMENTED is an expected normal result. BUG=b:280530115 TEST=Battery once again charges on Yaviks port C1 when connected to a charger. Change-Id: I491247148c523123206fefcdbcde62a92ea8caf4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4506012 Reviewed-by: Aseda Aboagye Tested-by: Peter Marheine Commit-Queue: Peter Marheine --- driver/charger/sm5803.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'driver') diff --git a/driver/charger/sm5803.c b/driver/charger/sm5803.c index 313a3cd321..391c60956a 100644 --- a/driver/charger/sm5803.c +++ b/driver/charger/sm5803.c @@ -1952,7 +1952,7 @@ static enum ec_error_list sm5803_set_vsys_compensation(int chgnum, if (rv) return EC_ERROR_UNKNOWN; - return EC_SUCCESS; + return EC_ERROR_UNIMPLEMENTED; } /* Hardware current ramping (aka DPM: Dynamic Power Management) */ -- cgit v1.2.1