From: Adrian Cox <adrian@humboldt.co.uk>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
sensors@Stimpy.netroedge.com
Cc: Michael Hunold <hunold-ml@web.de>, Jon Smirl <jonsmirl@gmail.com>,
Greg KH <greg@kroah.com>
Subject: Re: [PATCH][2.6] Add command function to struct i2c_adapter
Date: Wed, 22 Sep 2004 14:13:19 +0100 [thread overview]
Message-ID: <1095858798.18365.99.camel@localhost> (raw)
In-Reply-To: <20040922122848.M14129@linux-fr.org>
On Wed, 2004-09-22 at 14:38, Jean Delvare wrote:
> On Wed, 22 Sep 2004 12:54:08 +0100, Adrian Cox wrote
> > What I want is a way for a card driver to create a private I2C
> > adapter, and private instances of I2C clients, for purposes of code
> > reuse. The card driver would be responsible for attaching those
> > clients to the bus and cleaning up the objects on removal. The bus
> > wouldn't be visible in sysfs, or accessible from user-mode.
>
> Aha, this is an interesting point (which was missing from your previous
> explanation). The base of your proposal would be to have several small i2c
> "trees" (where a tree is a list of adapters and a list of clients) instead of
> a larger, unique one. This would indeed solve a number of problems, and I
> admit that it is somehow equivalent to Michael's classes in that it
> efficiently prevents the hardware monitoring clients from probing the video
> stuff. The rest is just details internal to each "tree". As I understand it,
> each video device would be a tree on itself, while the whole hardware
> monitoring stuff would constitute one (bigger) tree. Correct?
Yes. It took me an extra cup of coffee to explain the idea.
An important detail is that frontends would no longer contain
module_init() and module_exit() functions. Instead, the card driver
would call a function in the frontend module to attach the frontend
client to the tree and simultaneously set the correct parameters for
that specific card. This provides type safety, and a guarantee that the
client parameters match the correct card when mixing cards from
different manufacturers.
> > Some USB webcams have internal I2C busses to connect the sensor to
> > the USB chip. The drivers for these ignore the I2C core completely, and
> > invent their own system for reading and writing the sensor registers.
> > Maybe that's actually the best way of dealing with this.
>
> With your proposal, these drivers could use the common code again while still
> being completely separated from the other i2c busses, right?
Possibly, though they tend to have very limited I2C controllers which
makes it more awkward.
- Adrian Cox
Humboldt Solutions Ltd.
next prev parent reply other threads:[~2004-09-22 13:13 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-20 17:19 [PATCH][2.6] Add command function to struct i2c_adapter Michael Hunold
2004-09-21 15:41 ` Greg KH
2004-09-21 17:10 ` Michael Hunold
2004-09-21 17:39 ` Jon Smirl
2004-09-21 18:05 ` Michael Hunold
2004-09-22 8:56 ` Adrian Cox
2004-09-22 12:08 ` Jean Delvare
2004-09-22 11:54 ` Adrian Cox
2004-09-22 13:38 ` Jean Delvare
2004-09-22 13:13 ` Adrian Cox [this message]
2004-09-22 15:40 ` Jon Smirl
2004-09-22 15:56 ` Adrian Cox
2004-09-22 16:07 ` Jon Smirl
2004-09-22 16:51 ` Adrian Cox
2004-09-22 17:17 ` Jon Smirl
2004-09-22 18:55 ` Jean Delvare
2004-09-22 18:32 ` Adrian Cox
2004-09-22 20:04 ` Mark M. Hoffman
2004-09-23 7:41 ` Michael Hunold
2004-09-23 7:48 ` Michael Hunold
2004-09-23 7:09 ` Michael Hunold
2004-09-23 20:18 ` Adrian Cox
2004-09-21 20:33 ` Jean Delvare
2004-09-21 21:02 ` Jon Smirl
2004-09-24 17:06 ` Michael Hunold
2004-09-24 18:05 ` Jean Delvare
2004-09-24 20:21 ` Michael Hunold
2004-10-01 6:52 ` Greg KH
2004-10-01 12:22 ` Adrian Cox
2004-10-01 13:57 ` Jean Delvare
2004-10-01 23:41 ` Greg KH
[not found] <41500BED.8090607@linuxtv.org>
2004-09-21 13:28 ` Jean Delvare
2004-09-21 14:38 ` Michael Hunold
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=1095858798.18365.99.camel@localhost \
--to=adrian@humboldt.co.uk \
--cc=greg@kroah.com \
--cc=hunold-ml@web.de \
--cc=jonsmirl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sensors@Stimpy.netroedge.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