linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Misbah khan <misbah_khan@engineer.com>
To: linuxppc-embedded@ozlabs.org
Subject: concern related to Functions For executing Longer delay in driver
Date: Tue, 9 Oct 2007 21:55:43 -0700 (PDT)	[thread overview]
Message-ID: <13129401.post@talk.nabble.com> (raw)


Hi all....

I am working on a driver which is Pooling for a bit in hardware. And here is
my concern :-

1. The worst case time delay could be 400 ms for which i am pooling every 50
ms eg :-

                          while((test_bit(PIC_BUSY,(volatile UINT32*)((void
*)mmap_reg_ptr+FR_FPGA_STATUS_REG))==1)&& (delay < MAX_DELAY_PIC)){
		KDEBUG1(" In PIC busy state \n");
		msleep_interruptible(PIC_DELAY);
		delay +=PIC_DELAY;
		}/* End of if() */

2. This function will be called after every 1 min and i do have to poll for
400 ms (worst case) after every 1 min.

3. i have a wait queue Implimented in the driver which will be schedule to
be executed every time interrupt occurs (worst case 1ms).

3. The delay function which will make the driver to poll for the bit in the
hardware which you could see in the above example is
msleep_interruptible(PIC_DELAY);

4. As far as my knowledge we could use either mdelay() ,msleep(),
msleep_interruptible(), or schedule_timeout() for such long delays. I have
used msleep_interruptible() but still i feel as per the senario if i could
get a better option which will make my driver more effecient.

5. Please let me know which could be the best and reliable fn() for this
approach and please let me know the reason also .

Thank you 
Misbah
-- 
View this message in context: http://www.nabble.com/concern-related-to-Functions-For-executing-Longer-delay-in-driver-tf4598583.html#a13129401
Sent from the linuxppc-embedded mailing list archive at Nabble.com.

                 reply	other threads:[~2007-10-10  4:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=13129401.post@talk.nabble.com \
    --to=misbah_khan@engineer.com \
    --cc=linuxppc-embedded@ozlabs.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;
as well as URLs for NNTP newsgroup(s).