From: Scott Wood <scottwood@freescale.com>
To: Jochen Friedrich <jochen@scram.de>
Cc: Carsten Juttner <carjay@gmx.net>,
linux-kernel@vger.kernel.org, i2c@lm-sensors.org,
"linuxppc-embedded@ozlabs.org" <linuxppc-embedded@ozlabs.org>
Subject: Re: [PATCH take2] [POWERPC] i2c: adds support for i2c bus on 8xx
Date: Wed, 17 Oct 2007 14:35:16 -0500 [thread overview]
Message-ID: <471663F4.9030403@freescale.com> (raw)
In-Reply-To: <47166085.1010608@scram.de>
Jochen Friedrich wrote:
>>> diff --git a/arch/powerpc/boot/dts/mpc885ads.dts
>>> b/arch/powerpc/boot/dts/mpc885ads.dts
>>> index 8848e63..a526c02 100644
>>> --- a/arch/powerpc/boot/dts/mpc885ads.dts
>>> +++ b/arch/powerpc/boot/dts/mpc885ads.dts
>>> @@ -213,6 +213,15 @@
>>> fsl,cpm-command = <0080>;
>>> linux,network-index = <2>;
>>> };
>>> +
>>> + i2c@860 {
>>> + device_type = "i2c";
>>>
>>
>> No device_type.
>>
>
> Why? Documentation/powerpc/booting-without-of.txt says for I2C interfaces
> device_type is required and should be "i2c". Is this no longer true?
booting-without-of.txt should be changed.
>> Should be fsl,cpm-i2c. Is cpm2 i2c the same? If not, it should be
>> fsl,cpm1-i2c. It's probably best to specify it anyway, along with
>> fsl,mpc885-i2c.
>
> CPM2 i2c seems to be the same. However, i have no way to test this.
OK, let's make the compatible "fsl,mpc885-i2c", "fsl,cpm1-i2c",
"fsl,cpm-i2c".
For now, match on the last one, but if any differences pop up, we have
the more specific ones.
> I noticed cpm1_set_pin32, but this function don't seem to set the
> odr register. Will this be added? Then it would be:
>
> {CPM_PORTB, 26, CPM_PIN_OUTPUT | CPM_PIN_OPENDRAIN},
> {CPM_PORTB, 27, CPM_PIN_OUTPUT | CPM_PIN_OPENDRAIN},
>
Ah, missed that -- there's opendrain support for port E, but I missed
that port B had it as well. Feel free to add it.
>> It's a 7-bit address... and are you sure that 0x7e is unique? Does this
>> driver even support slave operation?
>
> It's in fact 0x7F << 1.
Gah, I hate powerpc bit numbering, especially without the
numbered-as-if-64-bit hack. I specifically looked at the manual before
to see if it was shifted, saw "0-6", and concluded it wasn't. :-P
> The same value is used in the 2.4 driver and
> in u-boot, as well.
That doesn't mean that this isn't a good time to review what the code is
doing. :-)
> Slave operation is not supported.
If slave operation isn't supported, how is this value used?
>> Why is an 8xx driver matching all i2c cpm (i.e. what about cpm2)?
>
> With the suggested change to use fsl,cpm-command, the driver should
> be able to use both cpm1 and cpm2. The operation and structs for i2c
> are identical. The only difference might be the hack^wsupport for
> relocation.
OK. Would that allow it to become one driver, rather than a wrapper and
an algorithm?
-Scott
next prev parent reply other threads:[~2007-10-17 19:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-15 11:10 [PATCH take2] [POWERPC] i2c: adds support for i2c bus on 8xx Jochen Friedrich
2007-10-15 18:31 ` Scott Wood
2007-10-17 19:20 ` Jochen Friedrich
2007-10-17 19:35 ` Scott Wood [this message]
2007-10-17 21:00 ` [i2c] " Jean Delvare
2007-10-23 15:47 ` Jochen Friedrich
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=471663F4.9030403@freescale.com \
--to=scottwood@freescale.com \
--cc=carjay@gmx.net \
--cc=i2c@lm-sensors.org \
--cc=jochen@scram.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-embedded@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 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).