mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
866e26115c
commit
22b8f15c2f
2 changed files with 28 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue