From: David Brownell <david-b@pacbell.net>
To: linux-kernel@vger.kernel.org
Subject: Re: Adding an async I2C interface
Date: Mon, 24 Jan 2005 08:36:38 -0800 [thread overview]
Message-ID: <200501240836.38669.david-b@pacbell.net> (raw)
Quoth Corey Minyard:
> I would really like add asynchronous interface to the I2C bus drivers.
Applause! This is IMO overdue, but maybe sensor systems don't need it
as much as other I2C applications do. For example, see the isp1301_omap
driver, which could have been hugely simpler if there were an async I2C
framework to build on. That's probably one of the more complex examples
floating around ... but it's hardly the only place where needing to talk
synchronously to I2C chips creates trouble.
> I propose:
>
> * Adding an async send interface to the busses that does a callback
> when the operation is complete.
It'd have to have a queue, so that several different chips could have
operations pending concurrently. I suspect you wouldn't need to cancel
operations once they're queued ... useful simplification, compared to
for example USB. (Which in retrospect needs a "kill queue" operation,
per endpoint, rather than the "cancel request" operation we've got.
But when 2.2 started with USB, we didn't quite know that ... ;)
> * Adding a poll interface to the busses. The I2C core code could
> call this if a synchronous call is made from task context (much
> like all the current drivers do right now). For asyncronous
> operation, the I2C core code would call it from a timer
> interrupt. If the driver supported interrupts, polling from the
> timer interrupt would not be necessary.
> * Add async operations for the user to call, including access to the
> polling code.
> * If the driver didn't support an async send, it would work as it
> does today and the async calls would return ENOSYS.
To the extent I've thought about it, that sounds like a good approach.
- Dave
next reply other threads:[~2005-01-24 16:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-24 16:36 David Brownell [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-01-24 15:05 Adding an async I2C interface Corey Minyard
2005-01-28 0:18 ` Mark Studebaker
2005-01-28 4:43 ` Corey Minyard
[not found] ` <41F9E183.5A9B1BA2@gte.net>
2005-01-28 7:23 ` Bukie Mabayoje
2005-01-28 14:02 ` Corey Minyard
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=200501240836.38669.david-b@pacbell.net \
--to=david-b@pacbell.net \
--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