From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 04/18] power: ab8500_fg: Replace msleep() with usleep_range() for greater accuracy
Date: Tue, 15 Jan 2013 14:09:13 +0000 [thread overview]
Message-ID: <20130115140913.GC9379@gmail.com> (raw)
In-Reply-To: <1357909986-9262-5-git-send-email-lee.jones@linaro.org>
From: Jonas Aaberg <jonas.aberg@stericsson.com>
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>
---
drivers/power/ab8500_fg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index 828529e..78124587 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -956,7 +956,7 @@ static int ab8500_fg_load_comp_volt_to_capacity(struct ab8500_fg *di)
do {
vbat += ab8500_fg_bat_voltage(di);
i++;
- msleep(5);
+ usleep_range(5000, 6000);
} while (!ab8500_fg_inst_curr_done(di));
ab8500_fg_inst_curr_finalize(di, &di->inst_curr);
--
1.7.9.5
WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: arnd@arndb.de, linus.walleij@stericsson.com,
cbouatmailru@gmail.com, Jonas Aaberg <jonas.aberg@stericsson.com>
Subject: Re: [PATCH 04/18] power: ab8500_fg: Replace msleep() with usleep_range() for greater accuracy
Date: Tue, 15 Jan 2013 14:09:13 +0000 [thread overview]
Message-ID: <20130115140913.GC9379@gmail.com> (raw)
In-Reply-To: <1357909986-9262-5-git-send-email-lee.jones@linaro.org>
From: Jonas Aaberg <jonas.aberg@stericsson.com>
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>
---
drivers/power/ab8500_fg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index 828529e..78124587 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -956,7 +956,7 @@ static int ab8500_fg_load_comp_volt_to_capacity(struct ab8500_fg *di)
do {
vbat += ab8500_fg_bat_voltage(di);
i++;
- msleep(5);
+ usleep_range(5000, 6000);
} while (!ab8500_fg_inst_curr_done(di));
ab8500_fg_inst_curr_finalize(di, &di->inst_curr);
--
1.7.9.5
next prev parent reply other threads:[~2013-01-15 14:09 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-11 13:12 [PATCH 00/18] AB8500 battery management series upgrade Lee Jones
2013-01-11 13:12 ` Lee Jones
2013-01-11 13:12 ` [PATCH 01/18] power: ab8500_charger: Rename the power_loss function Lee Jones
2013-01-11 13:12 ` Lee Jones
2013-01-11 13:12 ` [PATCH 02/18] power: ab8500_bm: Skip first CCEOC irq for instant current Lee Jones
2013-01-11 13:12 ` Lee Jones
2013-01-11 13:12 ` [PATCH 03/18] power: ab8500_charger: Detect charger removal Lee Jones
2013-01-11 13:12 ` Lee Jones
2013-01-16 1:36 ` Anton Vorontsov
2013-01-16 1:36 ` Anton Vorontsov
2013-01-16 8:48 ` Lee Jones
2013-01-16 8:48 ` Lee Jones
2013-01-11 13:12 ` [PATCH 04/18] power: ab8500_fg: Replace msleep() with usleep_range() for greater accuracy Lee Jones
2013-01-11 13:12 ` Lee Jones
2013-01-14 17:17 ` Joe Perches
2013-01-14 17:17 ` Joe Perches
2013-01-15 8:48 ` Lee Jones
2013-01-15 8:48 ` Lee Jones
2013-01-15 8:59 ` Linus Walleij
2013-01-15 8:59 ` Linus Walleij
2013-01-15 13:23 ` Arnd Bergmann
2013-01-15 13:23 ` Arnd Bergmann
2013-01-15 13:52 ` Lee Jones
2013-01-15 13:52 ` Lee Jones
2013-01-15 14:09 ` Lee Jones [this message]
2013-01-15 14:09 ` Lee Jones
2013-01-11 13:12 ` [PATCH 05/18] power: ab8500_charger: Handle gpadc errors Lee Jones
2013-01-11 13:12 ` Lee Jones
2013-01-11 13:12 ` [PATCH 06/18] power: ab8500_bm: Recharge condition not optimal for battery Lee Jones
2013-01-11 13:12 ` Lee Jones
2013-01-16 1:44 ` Anton Vorontsov
2013-01-16 1:44 ` Anton Vorontsov
2013-01-16 8:47 ` Lee Jones
2013-01-16 8:47 ` Lee Jones
2013-01-11 13:12 ` [PATCH 07/18] power: ab8500_fg: balance IRQ enable Lee Jones
2013-01-11 13:12 ` Lee Jones
2013-01-11 13:12 ` [PATCH 08/18] power: ab8500_btemp: Allign battery temperature resolution with the framework Lee Jones
2013-01-11 13:12 ` Lee Jones
2013-01-11 13:12 ` [PATCH 09/18] power: ab8500_btemp: Ignore false btemp low interrupt Lee Jones
2013-01-11 13:12 ` Lee Jones
2013-01-11 13:12 ` [PATCH 10/18] power: ab8500_bm: Adds support for Car/Travel Adapters Lee Jones
2013-01-11 13:12 ` Lee Jones
2013-01-11 13:12 ` [PATCH 11/18] power: ab8500_fg: Round capacity output Lee Jones
2013-01-11 13:12 ` Lee Jones
2013-01-11 13:13 ` [PATCH 12/18] power: ab8500_btemp: remove superfluous BTEMP thermal comp Lee Jones
2013-01-11 13:13 ` Lee Jones
2013-01-11 13:13 ` [PATCH 13/18] power: ab8500_fg: Added support for BATT_OVV Lee Jones
2013-01-11 13:13 ` Lee Jones
2013-01-11 13:13 ` [PATCH 14/18] power: pm2301: Add pm2301 charger Lee Jones
2013-01-11 13:13 ` Lee Jones
2013-01-16 1:37 ` Anton Vorontsov
2013-01-16 1:37 ` Anton Vorontsov
2013-01-11 13:13 ` [PATCH 15/18] power: ab8500_charger: remove unused defines Lee Jones
2013-01-11 13:13 ` Lee Jones
2013-01-11 13:13 ` [PATCH 16/18] power: ab8500_charger: Adds support for legacy USB chargers Lee Jones
2013-01-11 13:13 ` Lee Jones
2013-01-11 13:13 ` [PATCH 17/18] Power: ab8500_fg: Overflow in current calculation Lee Jones
2013-01-11 13:13 ` Lee Jones
2013-01-11 13:13 ` [PATCH 18/18] power: ab8500_fg: Remove pointless round_jiffies() call Lee Jones
2013-01-11 13:13 ` Lee Jones
2013-01-16 1:48 ` [PATCH 00/18] AB8500 battery management series upgrade Anton Vorontsov
2013-01-16 1:48 ` Anton Vorontsov
2013-01-16 8:50 ` Lee Jones
2013-01-16 8:50 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130115140913.GC9379@gmail.com \
--to=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.