public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga•com>
To: Sascha Hauer <s.hauer@pengutronix•de>
Cc: linuxppc-dev@ozlabs•org
Subject: Re: SPI devices and OF
Date: Thu, 5 Apr 2007 09:44:13 -0500	[thread overview]
Message-ID: <030212e9acd638e71b2f50aa39fb90ed@bga.com> (raw)
In-Reply-To: <20070405085057.GC9910@localhost.localdomain>


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
register_new_device.

Am I missing something?

milton

  reply	other threads:[~2007-04-05 14:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-04 11:09 SPI devices and OF Sascha Hauer
2007-04-04 11:51 ` Vitaly Wool
2007-04-04 16:34   ` Kumar Gala
2007-04-04 17:03     ` Arnd Bergmann
2007-04-04 17:12       ` Kumar Gala
2007-04-05  7:32         ` Benjamin Herrenschmidt
2007-04-05 15:00           ` Milton Miller
2007-04-05  8:33     ` Sascha Hauer
2007-04-04 15:57 ` Milton Miller
2007-04-05  8:50   ` Sascha Hauer
2007-04-05 14:44     ` Milton Miller [this message]
2007-04-05 19:11       ` Sascha Hauer
2007-04-05 19:52         ` Arnd Bergmann

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=030212e9acd638e71b2f50aa39fb90ed@bga.com \
    --to=miltonm@bga$(echo .)com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=s.hauer@pengutronix$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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