* How to set device's platform_data field for OF-described I2C devices ? @ 2008-05-27 11:47 Laurent Pinchart 2008-05-27 15:35 ` Jochen Friedrich 0 siblings, 1 reply; 2+ messages in thread From: Laurent Pinchart @ 2008-05-27 11:47 UTC (permalink / raw) To: Linux I2C; +Cc: linuxppc-dev [-- Attachment #1: Type: text/plain, Size: 548 bytes --] Hi everybody, 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. What's the best way to specify platform data for OF-described I2C devices ? Best regards, -- Laurent Pinchart CSE Semaphore Belgium Chaussee de Bruxelles, 732A B-1410 Waterloo Belgium T +32 (2) 387 42 59 F +32 (2) 387 42 75 [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to set device's platform_data field for OF-described I2C devices ? 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 0 siblings, 0 replies; 2+ messages in thread From: Jochen Friedrich @ 2008-05-27 15:35 UTC (permalink / raw) To: Laurent Pinchart; +Cc: linuxppc-dev, Linux I2C 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-27 15:35 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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).