diff options
author | Ting Shen <phoenixshen@google.com> | 2022-09-15 12:49:00 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-10-07 11:08:54 +0000 |
commit | 48ed43a6f372ea3588ccc7e14ff5da1501050216 (patch) | |
tree | 49b1065390ecb222ee9f69673497567652169c39 /driver/charger | |
parent | 63e345964e4b6df941db0ac0a3d1a7869ab29199 (diff) | |
download | chrome-ec-48ed43a6f372ea3588ccc7e14ff5da1501050216.tar.gz |
rt9490: remove set_mode function
The flags we implemented is not used anywhere in the codebase.
BUG=none
TEST=zmake
BRANCH=none
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I72b01806463aec903b1bfe23bb1c12a58a97265d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3896556
Tested-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'driver/charger')
-rw-r--r-- | driver/charger/rt9490.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/driver/charger/rt9490.c b/driver/charger/rt9490.c index 14b8449d35..9a6e8b301a 100644 --- a/driver/charger/rt9490.c +++ b/driver/charger/rt9490.c @@ -231,15 +231,6 @@ static int rt9490_is_sourcing_otg_power(int chgnum, int port) } #endif -/* Reset all registers' value to default */ -static int rt9490_reset_chip(int chgnum) -{ - /* disable hz before reset chip */ - RETURN_ERROR(rt9490_enable_hz(chgnum, false)); - - return rt9490_set_bit(chgnum, RT9490_REG_EOC_CTRL, RT9490_RST_ALL_MASK); -} - static inline int rt9490_enable_chgdet_flow(int chgnum, bool en) { return rt9490_update8(chgnum, RT9490_REG_CHG_CTRL2, RT9490_BC12_EN, @@ -390,24 +381,6 @@ static enum ec_error_list rt9490_get_status(int chgnum, int *status) return EC_SUCCESS; } -static int rt9490_reset_to_zero(int chgnum) -{ - RETURN_ERROR(rt9490_set_current(chgnum, 0)); - RETURN_ERROR(rt9490_set_voltage(chgnum, 0)); - RETURN_ERROR(rt9490_enable_hz(chgnum, true)); - - return EC_SUCCESS; -} - -static enum ec_error_list rt9490_set_mode(int chgnum, int mode) -{ - if (mode & CHARGE_FLAG_POR_RESET) - RETURN_ERROR(rt9490_reset_chip(chgnum)); - if (mode & CHARGE_FLAG_RESET_TO_ZERO) - RETURN_ERROR(rt9490_reset_to_zero(chgnum)); - return EC_SUCCESS; -} - static enum ec_error_list rt9490_get_actual_current(int chgnum, int *current) { uint16_t reg_val; @@ -568,7 +541,6 @@ const struct charger_drv rt9490_drv = { .init = &rt9490_init, .get_info = &rt9490_get_info, .get_status = &rt9490_get_status, - .set_mode = &rt9490_set_mode, #ifdef CONFIG_CHARGER_OTG .enable_otg_power = &rt9490_enable_otg_power, .set_otg_current_voltage = &rt9490_set_otg_current_voltage, |