On Fri, May 16, 2008 at 4:03 PM, Anton Vorontsov <cbouatmailru@gmail.com> wrote:
That's right. platform_data being a very driver specific thing there
is no way to generically extract a pdata structure from the device
tree. Instead, I'm storing the device node in archdata.of_node (line
immediately above spi_register_device) so that drivers can read the
device node themselves to populate a platform_device structure.
(Protected by CONFIG_OF of course).
Hmmm, as you say, this could end up being rather messy. However, by
passing the device node pointer, the driver could extract that data on
a per case basis. (ie. it would be decided on a per driver basis
where to get the platform data). I'm not sure; this bears more
thought...
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--