All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Albrecht Dreß" <albrecht.dress@arcor.de>
To: linuxppc-dev@ozlabs.org
Subject: Re: Q: define i2c nodes in device tree?
Date: Fri, 27 Mar 2009 14:05:04 +0100 (CET)	[thread overview]
Message-ID: <17008330.1238159104446.JavaMail.ngmail@webmail11.arcor-online.net> (raw)

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/

             reply	other threads:[~2009-03-27 13:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27 13:05 Albrecht Dreß [this message]
2009-03-27 22:07 ` Q: define i2c nodes in device tree? Timur Tabi
2009-03-27 23:06 ` David Gibson
  -- strict thread matches above, loose matches on Subject: below --
2009-03-26 18:44 Albrecht Dreß
2009-03-26 20:02 ` Timur Tabi

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=17008330.1238159104446.JavaMail.ngmail@webmail11.arcor-online.net \
    --to=albrecht.dress@arcor.de \
    --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.