Re: [RFC PATCH 04/19] powerpc: wii: device tree
From: Grant Likely <hidden>
Date: 2009-11-23 20:36:25
On Mon, Nov 23, 2009 at 12:54 PM, Albert Herranz [off-list ref] wrote:
Grant Likely wrote:quoted
On Sun, Nov 22, 2009 at 3:01 PM, Albert Herranz <albert_herranz@yahoo.es=wrote:quoted
quoted
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 i2c-video { + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #address-cells =3D <1>; + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #size-cells =3D <0>; + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "virtual,i=
2c-gpio";
quoted
There isn't a documented binding for this. =A0Is there a driver for it?I have a driver for it. But it isn't yet published. This is the documentation I wrote so far for the bindings. Is there a standard for this?
This looks pretty good to me. The documentation format isn't strict, just follow the pattern seen in other bindings. Make sure you post new bindings to devicetree-discuss@lists.ozlabs.org for review. A couple of comments below.
Documentation/powerpc/dts-bindings/gpio/i2c.txt GPIO-based I2C Required properties: - compatible : should be "virtual,i2c-gpio". - gpios : should specify GPIOs used for SDA and SCL lines, in that order. - sda-is-open-drain : should be non-zero if SDA gpio is open-drain. - sda-enforce-dir : should be non-zero if SDA gpio must be configured for =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0input before reading and for outpu=
t before writing.
- scl-is-open-drain : should be non-zero if SCL gpio is open-drain. - scl-is-output-only : should be non-zero if SCL is an output gpio only.
Instead of looking for a value in these properties, just make them empty properties and change behaviour based on whether or not the property is present. Why is the scl-is-output-only property needed?
- udelay : signal toggle delay. SCL frequency is (500 / udelay) kHz
You should follow the lead of Documentation/powerpc/dts-bindings/fsl/i2c.txt here and specify a clock-frequency property.
- timeout : clock stretching timeout in milliseconds.
I don't understand what this property means. g. --=20 Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.