mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
charger: bq24773: Fix read input current error
'ectool chargestate show' shows the wrong input current since
the function charger_get_input_current() uses REG8_TO_CURRENT.
BUG=None
TEST=Use 'ectool chargestate show' or UART command 'charger'
check the input current value.
BRANCH=None
Signed-off-by: james_chao <james_chao@asus.com>
Change-Id: I29229ea1ef22811035b500c7a33fedee6562db35
Reviewed-on: https://chromium-review.googlesource.com/259842
Reviewed-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Divya Jyothi <divya.jyothi@intel.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Divya Jyothi <divya.jyothi@intel.com>
Commit-Queue: Shawn N <shawnn@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
0db4de8d68
commit
e846dcf892
@@ -69,9 +69,9 @@ int charger_get_input_current(int *input_current)
|
||||
return rv;
|
||||
|
||||
#ifdef CONFIG_CHARGER_BQ24770
|
||||
*input_current = REG8_TO_CURRENT(reg, R_AC);
|
||||
#elif defined(CONFIG_CHARGER_BQ24773)
|
||||
*input_current = REG_TO_CURRENT(reg, R_AC);
|
||||
#elif defined(CONFIG_CHARGER_BQ24773)
|
||||
*input_current = REG8_TO_CURRENT(reg, R_AC);
|
||||
#endif
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user