From: "Steven A. Falco" <sfalco@harris.com>
To: jwboyer@linux.vnet.ibm.com
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [RFC][PATCH] I2C driver
Date: Thu, 21 Aug 2008 13:06:24 -0400 [thread overview]
Message-ID: <48ADA090.8020100@harris.com> (raw)
In-Reply-To: <1219336202.26429.55.camel@jdub.homelinux.org>
Josh Boyer wrote:
> On Thu, 2008-08-21 at 12:21 -0400, Steven A. Falco wrote:
>> The following patch enables building the I2C driver for 4xx chips.
>> Tested on a Sequoia board. Comments invited.
>>
>> Signed-off-by: Steven A. Falco <sfalco@harris.com>
>> ---
>> drivers/i2c/busses/Kconfig | 7 +++++++
>> drivers/i2c/busses/i2c-ibm_of.c | 5 ++---
>> 2 files changed, 9 insertions(+), 3 deletions(-)
>
> That file doesn't even exist in the mainline kernel:
>
> [jwboyer@yoda linux-2.6]$ find drivers/i2c/ -name *ibm*
> drivers/i2c/busses/i2c-ibm_iic.c
> drivers/i2c/busses/i2c-ibm_iic.h
> [jwboyer@yoda linux-2.6]$
>
> josh
>
>
Interesting. Ok - I found the problem with the driver you *did* find:
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index 85dbf34..569161d 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -989,6 +989,7 @@ static int __devexit iic_remove(struct of_device *ofdev)
static const struct of_device_id ibm_iic_match[] = {
{ .compatible = "ibm,iic-405ex", },
{ .compatible = "ibm,iic-405gp", },
+ { .compatible = "ibm,iic-440epx", },
{ .compatible = "ibm,iic-440gp", },
{ .compatible = "ibm,iic-440gpx", },
{ .compatible = "ibm,iic-440grx", },
However, while the i2c-ibm_of.c driver works with the sequoia .dts,
i2c-ibm_iic.c does not, because it is looking for an "index" property,
which is not in the .dts file. I added one:
diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts
index 72d6756..538aadb 100644
--- a/arch/powerpc/boot/dts/sequoia.dts
+++ b/arch/powerpc/boot/dts/sequoia.dts
@@ -248,6 +248,7 @@
reg = <ef600700 14>;
interrupt-parent = <&UIC0>;
interrupts = <2 4>;
+ index = <0>;
};
IIC1: i2c@ef600800 {
@@ -255,6 +256,7 @@
reg = <ef600800 14>;
interrupt-parent = <&UIC0>;
interrupts = <7 4>;
+ index = <1>;
};
ZMII0: emac-zmii@ef600d00 {
However, something is still not right. Using the mystery i2c-ibm_of.c
driver, I get:
i2c /dev entries driver
IBM IIC driver v2.1
m41t80_probe called
rtc-m41t80 0-0068: chip found, driver version 0.05
rtc-m41t80 0-0068: rtc core: registered m41t80 as rtc0
ibm-iic(/plb/opb/i2c@ef600700): using standard (100 kHz) mode
ibm-iic(/plb/opb/i2c@ef600800): using standard (100 kHz) mode
But with the i2c-ibm_iic.c driver, I get:
i2c /dev entries driver
ibm-iic 1ef600700.i2c: using standard (100 kHz) mode
ibm-iic 1ef600800.i2c: using standard (100 kHz) mode
I.e. it doesn't find the rtc (which I added to my sequoia board).
Steve
next prev parent reply other threads:[~2008-08-21 17:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-21 16:21 [RFC][PATCH] I2C driver Steven A. Falco
2008-08-21 16:30 ` Josh Boyer
2008-08-21 17:06 ` Steven A. Falco [this message]
2008-08-21 17:17 ` Josh Boyer
2008-08-21 17:27 ` Sean MacLennan
2008-08-21 19:05 ` Stefan Roese
2008-08-21 20:37 ` Steven A. Falco
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=48ADA090.8020100@harris.com \
--to=sfalco@harris.com \
--cc=jwboyer@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.