bq2589x: fix typo in voltage selection

Use the right rounding function for the charging voltage selection.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BRANCH=smaug
BUG=chrome-os-partner:41594
TEST=On Smaug EVT2, check that the battery is charging to 100% and
compare the voltage requested by the battery (using "battery" command)
to the voltage set by using "charger" command.

Change-Id: Ic5076f23242d1fac31ad34e0c8c9bfe0a868a91e
Reviewed-on: https://chromium-review.googlesource.com/278260
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Vincent Palatin
2015-06-17 11:46:22 -07:00
committed by ChromeOS Commit Bot
parent e5f5113b47
commit 2d35daa430

View File

@@ -200,7 +200,7 @@ int charger_set_voltage(int voltage)
int rv, val;
const struct charger_info * const info = charger_get_info();
voltage = charger_closest_current(voltage);
voltage = charger_closest_voltage(voltage);
rv = bq2589x_read(BQ2589X_REG_CHG_VOLT, &val);
if (rv)