summaryrefslogtreecommitdiff
path: root/driver/charger/isl923x.h
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2020-08-20 18:06:08 +0800
committerCommit Bot <commit-bot@chromium.org>2020-08-25 07:15:42 +0000
commit6f4bb4c9f8f252d749ade2ab809a362e2072c5d6 (patch)
tree9d638fe369a882d5494f1c2f0c7b57a3b6e04722 /driver/charger/isl923x.h
parent5482623ae79e97467576ad520c53273d412e9cc0 (diff)
downloadchrome-ec-6f4bb4c9f8f252d749ade2ab809a362e2072c5d6.tar.gz
isl9238c: implement hibernate/resume
Implemented isl9238c_hibernate/resume for ulp mode. And added a helper method raw_update16 for the read-update-write register flow. BUG=b:162790592 TEST=make BRANCH=master Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I0c3d80aaf6e1290da299b27d88961806295c90e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2366644 Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'driver/charger/isl923x.h')
-rw-r--r--driver/charger/isl923x.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/driver/charger/isl923x.h b/driver/charger/isl923x.h
index 036f93ccad..a09354d811 100644
--- a/driver/charger/isl923x.h
+++ b/driver/charger/isl923x.h
@@ -244,6 +244,9 @@
/* Control3: PSYS gain in uA/W (ISL9238 only) */
#define ISL9238_C3_PSYS_GAIN BIT(9)
+/* Control3: Enables or disables Battery Ship mode */
+#define ISL9238_C3_BGATE_OFF BIT(10)
+
/* Control3: Don't reload ACLIM on ACIN. */
#define ISL9238_C3_NO_RELOAD_ACLIM_ON_ACIN BIT(14)
@@ -408,6 +411,8 @@ int isl923x_set_comparator_inversion(int chgnum, int invert);
* @param chgnum index into chg_chips table.
*/
void raa489000_hibernate(int chgnum);
+enum ec_error_list isl9238c_hibernate(int chgnum);
+enum ec_error_list isl9238c_resume(int chgnum);
#define ISL923X_AC_PROCHOT_CURRENT_MAX 6400 /* mA */
#define ISL923X_DC_PROCHOT_CURRENT_MAX 12800 /* mA */