Thread (3 messages) 3 messages, 3 authors, 2009-03-27

Re: Q: define i2c nodes in device tree?

flat view

From: Albrecht Dre� <hidden>
Date: 2009-03-27 13:05:11

Hi Timur:
You need to have a "gpio I2C" device driver that registers the same name =
as what's in the DTS, like this:

Thanks, that did the trick; a proper naming is apparently

pca8575:gpio@20 {
        compatible =3D "nxp,pca8575";
        device_type =3D "gpio";
        reg =3D <0x20 1>;
};

Now the driver is called, but complains that no platform data is present.  =
Still have to figure out how to pass that... :-/

An other confusing thing: although the probe function fails with error -EIN=
VAL, the device gets registered:

<7>[    0.801814] i2c 1-0020: uevent
<7>[    0.802213] pcf857x 1-0020: probe
<7>[    0.802236] pcf857x 1-0020: no platform data
<4>[    0.802265] pcf857x: probe of 1-0020 failed with error -22
<7>[    0.807980] i2c-adapter i2c-1: client [pca8575] registered with bus i=
d 1-0020

# ls -al /sys/devices/f0000000.soc5200/f0003d40.i2c/i2c-adapter/i2c-1/
drwxr-xr-x    6 0        0               0 Jan  1 00:00 .
drwxr-xr-x    3 0        0               0 Jan  1 00:00 ..
drwxr-xr-x    2 0        0               0 Jan  1 00:00 1-0020
drwxr-xr-x    2 0        0               0 Jan  1 00:00 1-0021
drwxr-xr-x    2 0        0               0 Jan  1 00:00 1-0022
[...]

Is this the intended behaviour?

Thanks, Albrecht.

Zerrei=DFen Sie die Netze der Phisher, Hacker und Betr=FCger!
Ihre Internet-Sicherheits-Seiten auf Arcor.de bieten alle Infos und Hilfsmi=
ttel, die Sie zum sicheren Surfen brauchen! Play it safe!
http://www.arcor.de/footer-sicherheit/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help