From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Ben Dooks <ben-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Cc: Darius <augulis.darius-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: new style i2c client problem: probe () is not called
Date: Thu, 15 May 2008 11:41:12 +0200 [thread overview]
Message-ID: <20080515114112.431f9a56@hyperion.delvare> (raw)
In-Reply-To: <20080514212006.GA16881-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
Hi Ben,
On Wed, 14 May 2008 22:20:06 +0100, Ben Dooks wrote:
> On Tue, May 13, 2008 at 03:45:29PM +0300, Darius wrote:
> > Thanks, there was the problem. I have modified i2c adapter driver to use
> > i2c_add_numbered_adapter() instead i2c_add_adapter() and pass to the
> > adapter->nr = pdev->id. now probe is called.
>
> I'm not so sure this 1:1 mapping of platform to i2c bus ID is such a
> good idea, what if you have two i2c controllers and want to swap the
> two of them around?
You are right that using the platform device ID as the bus number has
limitations. It seems that it has worked fine for everyone so far
though. I guess that most embedded platforms have only one type of I2C
controllers so there are no collisions. If a platform was to use
several types of I2C controllers, presumably requiring different
drivers, then the current strategy may lead to collisions. But then it
shouldn't be too difficult to work around it, by passing the correct
I2C bus number as platform data. I guess developers have been using the
platform device ID merely as a shortcut.
I'm not too sure what you mean with "swapping the i2c controllers"
though. Why would you want to do that? Maybe a concrete example would
help.
--
Jean Delvare
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
prev parent reply other threads:[~2008-05-15 9:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-13 10:20 new style i2c client problem: probe () is not called Darius
2008-05-13 10:49 ` Wolfram Sang
[not found] ` <20080513104921.GA4485-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-05-13 11:29 ` Darius
2008-05-13 12:13 ` Jean Delvare
[not found] ` <20080513141337.20068339-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-05-13 12:45 ` Darius
2008-05-13 12:56 ` Jean Delvare
[not found] ` <20080513145641.14522f5c-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-05-13 12:53 ` Darius
2008-05-14 21:20 ` Ben Dooks
[not found] ` <20080514212006.GA16881-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2008-05-15 9:41 ` Jean Delvare [this message]
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=20080515114112.431f9a56@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=augulis.darius-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ben-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.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