From: Sean MacLennan <smaclennan@pikatech.com>
To: "Jean Delvare" <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>,
Wolfram Sang <w.sang@pengutronix.de>,
linuxppc-dev list <Linuxppc-dev@ozlabs.org>,
Linux@ozlabs.org, Timur Tabi <timur@freescale.com>,
I2C <i2c@lm-sensors.org>
Subject: Re: [i2c] [PATCH] Convert i2c-mpc from a platform driver to an of_platform one
Date: Sun, 29 Jun 2008 12:24:39 -0400 [thread overview]
Message-ID: <20080629122439.6295d63c@lappy.seanm.ca> (raw)
In-Reply-To: <20080629091725.291974e9@hyperion.delvare>
On Sun, 29 Jun 2008 09:17:25 +0200
"Jean Delvare" <khali@linux-fr.org> wrote:
> Ah, OK. If you use i2c_new_device() then it's alright.
Correct.
I have done the same thing for the i2c-ibm_iic.c driver. Jean, I think
you will like this. It gets rid of the index and the numbered drivers.
And the walking of the device tree is very clean because the dts knows
all the devices.
For example here is the relevant portion of the dts for the Warp:
IIC0: i2c@ef600700 {
compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
reg = <ef600700 14>;
interrupt-parent = <&UIC0>;
interrupts = <2 4>;
#address-cells = <1>;
#size-cells = <0>;
ad7414@4a {
compatible = "adi,ad7414";
reg = <4a>;
interrupts = <19 8>;
interrupt-parent = <&UIC0>;
};
};
It clearly shows that first i2c controller (IIC0) contains one ad7414 device at address 4A.
Cheers,
Sean
next prev parent reply other threads:[~2008-06-29 16:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-11 2:40 [PATCH] Convert i2c-mpc from a platform driver to an of_platform one Jon Smirl
2008-06-11 16:00 ` [i2c] " Wolfram Sang
2008-06-11 16:14 ` Jon Smirl
2008-06-25 13:25 ` Jean Delvare
2008-06-25 13:58 ` Jean Delvare
2008-06-29 2:05 ` Jon Smirl
2008-06-29 4:49 ` Grant Likely
2008-06-29 6:31 ` Jean Delvare
2008-06-29 6:58 ` Grant Likely
2008-06-29 7:17 ` Jean Delvare
2008-06-29 16:24 ` Sean MacLennan [this message]
2008-06-29 16:35 ` Jean Delvare
2008-06-30 2:51 ` David Brownell
2008-06-29 4:57 ` Grant Likely
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=20080629122439.6295d63c@lappy.seanm.ca \
--to=smaclennan@pikatech.com \
--cc=Linux@ozlabs.org \
--cc=Linuxppc-dev@ozlabs.org \
--cc=david-b@pacbell.net \
--cc=i2c@lm-sensors.org \
--cc=khali@linux-fr.org \
--cc=timur@freescale.com \
--cc=w.sang@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).