summaryrefslogtreecommitdiff
path: root/include/driver
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2023-01-19 14:40:47 +1100
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-01-23 01:16:24 +0000
commit3f0f13bf489e6b201744d94114aff3fd6e52daea (patch)
treeb5ef3d371f572a06e95b96f8c1fbb14774c3d71a /include/driver
parent0bcc570cca713d3a5fad8d7adff054b92c8c85bb (diff)
downloadchrome-ec-3f0f13bf489e6b201744d94114aff3fd6e52daea.tar.gz
raa489000: Support AC_PRESENT when OTG mode
Flip the comparator inverter output when the charger chip is running in OTG mode so that the AC_PRESENT signal is correctly generated. The AC_PRESENT relies on the ACOK signal, but during OTG mode, ACOK is on when the charger is sourcing power to the port, so AC_PRESENT should be off. BUG=b:263691951 TEST=Verify with nivviks that AC_PRESENT is generated correctly BRANCH=none Change-Id: I004b8caaa63a902dd54288840c044bbe920e1347 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4179436 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Diffstat (limited to 'include/driver')
-rw-r--r--include/driver/charger/isl923x_public.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/driver/charger/isl923x_public.h b/include/driver/charger/isl923x_public.h
index c5d38f75c7..f582f188a5 100644
--- a/include/driver/charger/isl923x_public.h
+++ b/include/driver/charger/isl923x_public.h
@@ -64,6 +64,12 @@ void raa489000_hibernate(int chgnum, bool disable_adc);
*/
int raa489000_enable_asgate(int chgnum, bool enable);
+/**
+ * Check whether the comparator output needs to
+ * be inverted for the AC_PRESENT signal.
+ */
+void raa489000_check_ac_present(void);
+
enum ec_error_list isl9238c_hibernate(int chgnum);
enum ec_error_list isl9238c_resume(int chgnum);