summaryrefslogtreecommitdiff
path: root/include/linux/delay.h
diff options
context:
space:
mode:
authorPatrick Pannuto <ppannuto@codeaurora.org>2010-07-20 02:09:26 +0400
committerThomas Gleixner <tglx@linutronix.de>2010-07-23 17:08:12 +0400
commit22b8f15c2f7130bb0386f548428df2ffd4e81903 (patch)
tree4ed7ac08115afdce20d21bd923cd1071c2249dda /include/linux/delay.h
parent866e26115cba6b59cec669b6307599e3e4440491 (diff)
downloadlinux-22b8f15c2f7130bb0386f548428df2ffd4e81903.tar.xz
timer: Added usleep[_range] timer
usleep[_range] are finer precision implementations of msleep and are designed to be drop-in replacements for udelay where a precise sleep / busy-wait is unnecessary. They also allow an easy interface to specify slack when a precise (ish) wakeup is unnecessary to help minimize wakeups Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org> Cc: akinobu.mita@gmail.com Cc: sboyd@codeaurora.org Acked-by: Arjan van de Ven <arjan@linux.intel.com> LKML-Reference: <4C44CDD2.1070708@codeaurora.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/delay.h')
-rw-r--r--include/linux/delay.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/delay.h b/include/linux/delay.h
index fd832c6d419e..0e303d1aacd8 100644
--- a/include/linux/delay.h
+++ b/include/linux/delay.h
@@ -45,6 +45,12 @@ extern unsigned long lpj_fine;
void calibrate_delay(void);
void msleep(unsigned int msecs);
unsigned long msleep_interruptible(unsigned int msecs);
+void usleep_range(unsigned long min, unsigned long max);
+
+static inline void usleep(unsigned long usecs)
+{
+ usleep_range(usecs, usecs);
+}
static inline void ssleep(unsigned int seconds)
{