summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorLiam Breck <kernel@networkimprov.net>2017-04-11 04:59:57 -0700
committerSebastian Reichel <sre@kernel.org>2017-04-14 01:41:35 +0200
commit61489b0f9fa835cd2fef67ae26790cdf64b6b1c7 (patch)
tree9ff77f5a76ff777e4a0d52fb629ab08884a90ef5 /drivers/power
parente3ebc381a966f7fb41b13c2823ff96f9d6d7a377 (diff)
power: supply: bq24190_charger: Longer delay while polling reset flag
On chip reset, polling loop used udelay(10) which is too short to be useful. Instead, use usleep_range(100, 200). Signed-off-by: Liam Breck <kernel@networkimprov.net> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/bq24190_charger.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
index 13b22e4a80cd..7c893c00fa05 100644
--- a/drivers/power/supply/bq24190_charger.c
+++ b/drivers/power/supply/bq24190_charger.c
@@ -550,16 +550,13 @@ static int bq24190_register_reset(struct bq24190_dev_info *bdi)
if (ret < 0)
return ret;
- if (!v)
- break;
+ if (v == 0)
+ return 0;
- udelay(10);
+ usleep_range(100, 200);
} while (--limit);
- if (!limit)
- return -EIO;
-
- return 0;
+ return -EIO;
}
/* Charger power supply property routines */