summaryrefslogtreecommitdiff
path: root/include/driver
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2021-05-17 20:20:31 -0700
committerCommit Bot <commit-bot@chromium.org>2021-05-19 20:26:17 +0000
commit477dda563e0ee3bb831ebb8883cb72903bbb8141 (patch)
treec431526540fb66b4993a4c47ee16f91e04b88a65 /include/driver
parentdef759427d9bc1781e7b23a536694fd0ab8bb01f (diff)
downloadchrome-ec-477dda563e0ee3bb831ebb8883cb72903bbb8141.tar.gz
raa489000: Add raa489000_is_acok()
This commit adds a function to return the status of the ACOK pin in FW. BUG=b:187965740 BRANCH=dedede TEST=Build and flash madoo, verify that "AC on" is on printed when we actually decide to charge from a port and not just when VBUS is present. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Iacff19542587d102798c645d66a0ea15aaa51439 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2901252 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/driver')
-rw-r--r--include/driver/charger/isl923x_public.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/driver/charger/isl923x_public.h b/include/driver/charger/isl923x_public.h
index d8cc9cf662..2ee5f62cdb 100644
--- a/include/driver/charger/isl923x_public.h
+++ b/include/driver/charger/isl923x_public.h
@@ -8,6 +8,7 @@
#ifndef __CROS_EC_DRIVER_CHARGER_ISL923X_PUBLIC_H
#define __CROS_EC_DRIVER_CHARGER_ISL923X_PUBLIC_H
+#include "common.h"
#include "stdbool.h"
#define ISL923X_ADDR_FLAGS (0x09)
@@ -38,6 +39,15 @@ int isl923x_set_dc_prochot(int chgnum, uint16_t ma);
int isl923x_set_comparator_inversion(int chgnum, int invert);
/**
+ * Return whether ACOK is high or low.
+ *
+ * @param chgnum index into chg_chips table.
+ * @param acok will be set to true if ACOK is asserted, otherwise false.
+ * @return EC_SUCCESS, error otherwise.
+ */
+enum ec_error_list raa489000_is_acok(int chgnum, bool *acok);
+
+/**
* Prepare the charger IC for battery ship mode. Battery ship mode sets the
* lowest power state for the IC. Battery ship mode can only be entered from
* battery only mode.