Q: define i2c nodes in device tree?
Albrecht Dreß
albrecht.dress at arcor.de
Sat Mar 28 00:05:04 EST 2009
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 at 20 {
compatible = "nxp,pca8575";
device_type = "gpio";
reg = <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 -EINVAL, 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 id 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ßen Sie die Netze der Phisher, Hacker und Betrüger!
Ihre Internet-Sicherheits-Seiten auf Arcor.de bieten alle Infos und Hilfsmittel, die Sie zum sicheren Surfen brauchen! Play it safe!
http://www.arcor.de/footer-sicherheit/
More information about the Linuxppc-dev
mailing list