Commit 9a0bd070fd3582aed024a2f13a30b1de307db1e2

Authored by Jonas Aaberg
Committed by Anton Vorontsov
1 parent b269fff4f9

ab8500_fg: Replace msleep() with usleep_range() for greater accuracy

Doing so provides a greater degree of accuracy when dealing with
time-frames between 1us and 20ms. msleep() is only accurate for
wake-ups greater than 20ms.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonas ABERG <jonas.aberg@stericsson.com>
Reviewed-by: Johan BJORNSTEDT <johan.bjornstedt@stericsson.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/power/ab8500_fg.c
... ... @@ -956,7 +956,7 @@
956 956 do {
957 957 vbat += ab8500_fg_bat_voltage(di);
958 958 i++;
959   - msleep(5);
  959 + usleep_range(5000, 6000);
960 960 } while (!ab8500_fg_inst_curr_done(di));
961 961  
962 962 ab8500_fg_inst_curr_finalize(di, &di->inst_curr);