linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jochen Friedrich <jochen@scram.de>
To: Laurent Pinchart <laurentp@cse-semaphore.com>
Cc: linuxppc-dev@ozlabs.org, Linux I2C <i2c@lm-sensors.org>
Subject: Re: How to set device's platform_data field for OF-described I2C devices ?
Date: Tue, 27 May 2008 17:35:15 +0200	[thread overview]
Message-ID: <483C2A33.1020309@scram.de> (raw)
In-Reply-To: <200805271348.06470.laurentp@cse-semaphore.com>

Hi Laurent,

> I'm running into a small issue with the pca953x I2C GPIO driver. The driver 
> requires platform data (to set the GPIO base number among other information). 
> As the device is automatically instantiated from the OF device tree, I can't 
> find a way to add platform data in the process.

Platform data really is a problem for devices loaded by OF device trees (see the
discussion at http://ozlabs.org/pipermail/linuxppc-dev/2008-May/056728.html and
in particular http://ozlabs.org/pipermail/linuxppc-dev/2008-May/056752.html).

In case of this particular chip it might be feasible to support the new libgpio
API to get a GPIO base number dynamically and use some defaults for the other
platform data to enable the chip to be used without platform data.

Otherwise, you could only bypass the OF bindings totally and add the device
manually from platform code with the platform data filled in.

> What's the best way to specify platform data for OF-described I2C devices ?

This depends on the data. For example function pointers can't be described in the
device tree, at all.

Thanks,
Jochen

      reply	other threads:[~2008-05-27 15:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-27 11:47 How to set device's platform_data field for OF-described I2C devices ? Laurent Pinchart
2008-05-27 15:35 ` Jochen Friedrich [this message]

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=483C2A33.1020309@scram.de \
    --to=jochen@scram.de \
    --cc=i2c@lm-sensors.org \
    --cc=laurentp@cse-semaphore.com \
    --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 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).