mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matti Aarnio <matti.aarnio@zmailer.org>
To: moreau francis <francis_moreau2000@yahoo.fr>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [I2C] question on adapter design
Date: Fri, 19 May 2006 13:23:47 +0300	[thread overview]
Message-ID: <20060519102347.GM8304@mea-ext.zmailer.org> (raw)
In-Reply-To: <20060519084245.19195.qmail@web25807.mail.ukl.yahoo.com>

On Fri, May 19, 2006 at 08:42:45AM +0000, moreau francis wrote:
> I'm about writing a I2C bus adapter driver and wondering if it worth
> to use interrupt for transfering data on the bus or just polling is
> good enough ?
> 
> My hardware has a 8 bytes fifo for both Tx/Rx. It can generates
> an interrupt when Tx fifo is empty and Rx fifo is not empty, 
> actually like any UARTs. My CPU speed is 96 Mhz.

The I²C (TM Philips) -bus runs at 100 kHz or (high-speed one) at 400 kHz.
An eight bit byte goes thru it in 80 or 20 microseconds depending on used
speed.  If your interrupt processing considers it as medium level
priority and fills the Tx fifo with as much as is available (most I²C TX
sequences do fit inside the 8 byte fifo) and collects as much data as is
available in the Rx fifo, you should be well set.

Most notable detail there is, that you do have those (for I²C) huge FIFOs.
Another thing is (I haven't verified this) that I²C master controls the
bus clock, and can stop it temporarily, when Tx FIFO is empty, or Rx FIFO
is full.

> Thanks for your advices
> Francis

/Matti Aarnio

  reply	other threads:[~2006-05-19 10:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-19  8:42 moreau francis
2006-05-19 10:23 ` Matti Aarnio [this message]
2006-05-20 11:07   ` Re : " moreau francis

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=20060519102347.GM8304@mea-ext.zmailer.org \
    --to=matti.aarnio@zmailer.org \
    --cc=francis_moreau2000@yahoo.fr \
    --cc=linux-kernel@vger.kernel.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®