SPI devices and OF

Milton Miller miltonm at bga.com
Fri Apr 6 00:44:13 EST 2007

On Apr 5, 2007, at 3:50 AM, Sascha Hauer wrote:

> On Wed, Apr 04, 2007 at 10:57:28AM -0500, Milton Miller wrote:
>> On Wed Apr 4 21:09:16 EST 2007, Sascha Hauer wrote:
>>> I'm currently writing a driver for the mpc5200 spi controller (the
>>> dedicated one, not the PSC ones).
>>> I think it will work this way but I found no way getting the
>>> platform_data for the spi devices.
>> Why do you need platform_data for the devices?  I understand for
>> the master.   Actually, spi_device_info has a nice platform_info
>> pointer.
> For example the AT25 eeprom driver needs the page_size and some other 
> bits in
> the platform_data.

>> Looking through the code, It seems you want to use spi_new_device()
>> after calling spi_alloc_master() and spi_register_master().
> Yes, you're right. I mixed that up. Anyway, it was only meant as pseudo
> code to show what I'm trying to do.

ok, so what is the problem with the platform data?   You kzalloc the
data structure that the device needs, fill it in, and fill out
the pointer in the auto _info variable that gets copied by

Am I missing something?


More information about the Linuxppc-dev mailing list