From: Sean MacLennan <smaclennan@pikatech.com>
To: "Timur Tabi" <timur@freescale.com>
Cc: scottwood@freescale.com, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH v7] introduce macro spin_event_timeout()
Date: Tue, 5 May 2009 20:43:18 -0400 [thread overview]
Message-ID: <20090505204318.6a37995f@lappy.seanm.ca> (raw)
In-Reply-To: <1241560385-26868-1-git-send-email-timur@freescale.com>
On Tue, 5 May 2009 16:53:05 -0500
"Timur Tabi" <timur@freescale.com> wrote:
> The macro spin_event_timeout() takes a condition and timeout value
> (in microseconds) as parameters. It spins until either the condition
> is true or the timeout expires. It returns the result of the
> condition when the loop was terminated.
>
> This primary purpose of this macro is to poll on a hardware register
> until a status bit changes. The timeout ensures that the loop still
> terminates if the bit doesn't change as expected. This macro makes
> it easier for driver developers to perform this kind of operation
> properly.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
Nice. I could have used a routine like this in a couple of our drivers.
So, for what it is worth:
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Cheers,
Sean
next prev parent reply other threads:[~2009-05-06 0:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 21:53 [PATCH v7] introduce macro spin_event_timeout() Timur Tabi
2009-05-06 0:43 ` Sean MacLennan [this message]
2009-05-14 15:13 ` Grant Likely
2009-05-14 16:03 ` Timur Tabi
2009-05-14 16:10 ` Grant Likely
2009-05-18 22:49 ` Timur Tabi
2009-05-19 2:58 ` Grant Likely
2009-05-19 3:57 ` Sean MacLennan
2009-05-19 12:30 ` Grant Likely
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=20090505204318.6a37995f@lappy.seanm.ca \
--to=smaclennan@pikatech.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.com \
--cc=timur@freescale.com \
/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;
as well as URLs for NNTP newsgroup(s).