From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: "'Sachin Kamat'" <sachin.kamat@linaro.org>,
"'Andrew Morton'" <akpm@linux-foundation.org>,
"'LKML'" <linux-kernel@vger.kernel.org>,
"'Richard Purdie'" <rpurdie@rpsys.net>,
"'Ashish Jangam'" <ashish.jangam@kpitcummins.com>
Subject: Re: [PATCH 1/3] backlight: da9052: Use usleep_range() instead of msleep() for small sleeps
Date: Tue, 7 Aug 2012 17:28:22 +0100 [thread overview]
Message-ID: <20120807162821.GA14711@sirena.org.uk> (raw)
In-Reply-To: <002f01cd7390$4873b5c0$d95b2140$%han@samsung.com>
On Mon, Aug 06, 2012 at 01:59:38PM +0900, Jingoo Han wrote:
> On Monday, August 06, 2012 1:48 PM Sachin Kamat wrote:
> > > + usleep_range(10000, 11000);
> > Can't we just use usleep(10000) instead?
> usleep() is not available.
> For more details, refer to Documentation/timers/timers-howto.txt.
Given how common this pattern is is it not more sensible to just
provide usleep() even if just as an inline that's something like
void usleep(unsigned long t)
{
usleep_range(t, t + (t / 10));
}
since the usleep_range() isn't ideal for clarity (and usually the upper
bound isn't a particular concern for the driver, it just wants the usual
"delay for at least x" semantics).
prev parent reply other threads:[~2012-08-07 16:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 4:43 Jingoo Han
2012-08-06 4:47 ` Sachin Kamat
2012-08-06 4:59 ` Jingoo Han
2012-08-07 16:28 ` Mark Brown [this message]
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=20120807162821.GA14711@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=akpm@linux-foundation.org \
--cc=ashish.jangam@kpitcummins.com \
--cc=jg1.han@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
--cc=sachin.kamat@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®