Re: [PATCH 3/4] spi: Add OF binding support for SPI busses

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <cbouatmailru@...>
Cc: <linuxppc-dev@...>, <spi-devel-general@...>, <linux-kernel@...>, <dbrownell@...>, <fabrizio.garetto@...>
Date: Friday, May 16, 2008 - 6:14 pm

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.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 3/4] spi: Add OF binding support for SPI busses, Grant Likely, (Fri May 16, 3:36 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Guennadi Liakhovetski, (Mon May 19, 9:17 am)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Guennadi Liakhovetski, (Mon May 19, 12:30 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Guennadi Liakhovetski, (Tue May 20, 11:26 am)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Segher Boessenkool, (Wed May 21, 3:11 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Gary Jennejohn, (Mon May 19, 1:09 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Anton Vorontsov, (Mon May 19, 1:19 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Anton Vorontsov, (Wed May 21, 11:19 am)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, David Brownell, (Thu May 22, 10:05 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, David Brownell, (Sat May 24, 1:43 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Jochen Friedrich, (Sat May 24, 1:14 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, David Brownell, (Sat May 24, 1:45 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Anton Vorontsov, (Fri May 16, 6:03 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Grant Likely, (Fri May 16, 6:14 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, Anton Vorontsov, (Fri May 16, 6:49 pm)
Re: [PATCH 3/4] spi: Add OF binding support for SPI busses, David Brownell, (Wed May 21, 9:16 pm)