From: "Vitaly Wool" <vitalywool@gmail.com>
To: "Sascha Hauer" <s.hauer@pengutronix.de>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: SPI devices and OF
Date: Wed, 4 Apr 2007 04:51:03 -0700 [thread overview]
Message-ID: <acd2a5930704040451u55ae7619wfa1aaa84aebdf72@mail.gmail.com> (raw)
In-Reply-To: <20070404110916.GA9910@localhost.localdomain>
On 4/4/07, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> Hi,
>
> I'm currently writing a driver for the mpc5200 spi controller (the
> dedicated one, not the PSC ones).
> The driver has the form of a of_platform_driver. My problem is that I
> don't know how to define the spi devices on the spi bus. My current
> approach is having something like this in the OF tree:
>
>
> spi@f00 {
> device_type = "spi";
> compatible = "mpc5200b-spi\0mpc5200-spi";
> reg = <f00 20>;
> interrupts = <2 d 0 2 e 0>;
> interrupt-parent = <500>;
> mmc@0 {
> device_type = "mmc_spi";
> compatible = "mmc_spi";
> };
> };
>
> I can then parse the children in my spi driver with
>
> while( (child = of_get_next_child(odev->node, child))) {
> struct spi_board_info info;
>
> info.max_speed_hz =
> info.bus_num =
> info.chip_select =
> ...
> spi_register_board_info(&info, 1);
> }
>
> I think it will work this way but I found no way getting the
> platform_data for the spi devices.
I think that it's worth extending the current SPI core with OF
support. Maybe I'll manage to get to it :)
If you have something ready, please email to
spi-devel-general@lists.sourceforge.net.
Thanks,
Vitaly
next prev parent reply other threads:[~2007-04-04 11:51 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 [this message]
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
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=acd2a5930704040451u55ae7619wfa1aaa84aebdf72@mail.gmail.com \
--to=vitalywool@gmail.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).