From: Jean Delvare <khali@linux-fr.org>
To: "Mike Frysinger" <vapier.adi@gmail.com>
Cc: "Bryan Wu" <bryan.wu@analog.com>,
"David Brownell" <david-b@pacbell.net>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Alexey Dobriyan" <adobriyan@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm 4/4] Blackfin: on-chip Two Wire Interface I2C driver
Date: Thu, 22 Mar 2007 08:48:06 +0100 [thread overview]
Message-ID: <20070322084806.8bf0f231.khali@linux-fr.org> (raw)
In-Reply-To: <8bd0f97a0703212239n3edb9a44waa0994e3cffe48d8@mail.gmail.com>
Hi Mike,
On Thu, 22 Mar 2007 01:39:28 -0400, Mike Frysinger wrote:
> On 3/21/07, Jean Delvare <khali@linux-fr.org> wrote:
> > > + p_adap->class = I2C_CLASS_ALL;
> >
> > This pretty much voids the point of these probing classes. You should
> > only select the classes matching devices which may actually be probed
> > for on this bus. If different boards have different needs, get the
> > right classes from the platform data.
>
> i asked about the class issue previously specifically for this bus
> driver and was told that they werent really fully defined ... the
> on-chip I2C interface on the Blackfin chip can handle any I2C device
> which is why i added this line
Grep for I2C_CLASS_ and you'll see that the classes are defined and
used consistently in the kernel tree. Maybe just not by the embedded
folks.
Also note that what matters is not the type of devices that can be
connected on the bus, but the type of devices that can be probed for.
This was essentially the same so far (general probing was the only way
to instantiate an i2c device), but the new i2c-core code that will go
into 2.6.22 will make it different. These classes will probably be less
used in the future.
> any examples of how to go about doing it via boards ? i dont see any
> other I2C bus driver doing it that way ...
I don't think many drivers from the embedded world do it properly. But
they don't appear to define any class at all, which means that in
practice they keep most regular i2c drivers out of their bus. Pretty
much the contrary of what you're doing with I2C_CLASS_ALL.
It's really up to you, but if you set the class to I2C_CLASS_ALL, don't
later come and complain that other drivers keep probing your I2C bus
and possibly attach to your I2C devices. You asked for it.
--
Jean Delvare
next prev parent reply other threads:[~2007-03-22 7:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 10:08 [PATCH -mm 4/4] Blackfin: on-chip Two Wire Interface I2C driver Wu, Bryan
2007-03-21 17:56 ` Jean Delvare
2007-03-21 18:17 ` Bob Copeland
2007-03-21 19:14 ` Mike Frysinger
2007-03-22 7:03 ` Jean Delvare
2007-03-22 7:13 ` Mike Frysinger
2007-03-21 19:22 ` Jean Delvare
2007-03-22 5:39 ` Mike Frysinger
2007-03-22 7:48 ` Jean Delvare [this message]
2007-03-22 8:12 ` Mike Frysinger
2007-03-22 9:24 ` Jean Delvare
2007-03-23 5:46 ` [PATCH -mm try#2] " Wu, Bryan
2007-03-23 7:27 ` Jean Delvare
2007-03-23 7:36 ` Wu, Bryan
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=20070322084806.8bf0f231.khali@linux-fr.org \
--to=khali@linux-fr.org \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bryan.wu@analog.com \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
--cc=vapier.adi@gmail.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