diff options
author | Edward Hill <ecgh@chromium.org> | 2020-09-28 17:08:39 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-29 02:44:42 +0000 |
commit | 485c236b2c0d455c673d1d6677055a3e801b41bb (patch) | |
tree | b5d8964d151404bc4a3149d3b72ef6d424b6bca0 /driver/charger | |
parent | eb5cd2171cd377ac86cca1417f716d0ab5a8e414 (diff) | |
download | chrome-ec-485c236b2c0d455c673d1d6677055a3e801b41bb.tar.gz |
Revert "Zork: Workaround for bad ISL9241 CONTROL1 read"
This reverts commit 61d40d6eaa88437d48e06fba9b773f7eb99f6ecc.
Revert the workaround since CL:2393404 solved the problem.
BUG=b:163076059
BRANCH=zork
TEST=none
Change-Id: I0397141b5b4e15736172474cb073842e18c3a71d
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2437194
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'driver/charger')
-rw-r--r-- | driver/charger/isl9241.c | 16 | ||||
-rw-r--r-- | driver/charger/isl9241.h | 5 |
2 files changed, 5 insertions, 16 deletions
diff --git a/driver/charger/isl9241.c b/driver/charger/isl9241.c index 7d724d24be..d6dbf395d8 100644 --- a/driver/charger/isl9241.c +++ b/driver/charger/isl9241.c @@ -60,7 +60,7 @@ static const struct charger_info isl9241_charger_info = { static enum ec_error_list isl9241_discharge_on_ac(int chgnum, int enable); -inline enum ec_error_list isl9241_read(int chgnum, int offset, +static inline enum ec_error_list isl9241_read(int chgnum, int offset, int *value) { return i2c_read16(chg_chips[chgnum].i2c_port, @@ -68,7 +68,7 @@ inline enum ec_error_list isl9241_read(int chgnum, int offset, offset, value); } -inline enum ec_error_list isl9241_write(int chgnum, int offset, +static inline enum ec_error_list isl9241_write(int chgnum, int offset, int value) { return i2c_write16(chg_chips[chgnum].i2c_port, @@ -304,21 +304,15 @@ static enum ec_error_list isl9241_post_init(int chgnum) return EC_SUCCESS; } -__overridable int isl9241_update_learn_mode(int chgnum, int enable) -{ - return isl9241_update(chgnum, ISL9241_REG_CONTROL1, - ISL9241_CONTROL1_LEARN_MODE, - (enable) ? MASK_SET : MASK_CLR); -} - static enum ec_error_list isl9241_discharge_on_ac(int chgnum, int enable) { int rv; mutex_lock(&control1_mutex); - rv = isl9241_update_learn_mode(chgnum, enable); - + rv = isl9241_update(chgnum, ISL9241_REG_CONTROL1, + ISL9241_CONTROL1_LEARN_MODE, + (enable) ? MASK_SET : MASK_CLR); if (!rv) learn_mode = enable; diff --git a/driver/charger/isl9241.h b/driver/charger/isl9241.h index 17e98cfaaf..1110f11b8a 100644 --- a/driver/charger/isl9241.h +++ b/driver/charger/isl9241.h @@ -122,11 +122,6 @@ extern const struct charger_drv isl9241_drv; -enum ec_error_list isl9241_read(int chgnum, int offset, - int *value); -enum ec_error_list isl9241_write(int chgnum, int offset, - int value); -__override_proto int isl9241_update_learn_mode(int chgnum, int enable); /** * Set AC prochot threshold * |