[PATCH 2/4] [OF] spi_of: add support for dedicated SPI constructors
Guennadi Liakhovetski
g.liakhovetski at gmx.de
Thu May 22 01:56:33 EST 2008
On Wed, 21 May 2008, Anton Vorontsov wrote:
> Dedicated (usually the ones that need to fill platform data) constructors
> will create board info, so SPI core will probe them as normal SPI devices.
>
> Signed-off-by: Anton Vorontsov <avorontsov at ru.mvista.com>
> ---
> drivers/spi/spi_of.c | 67 ++++++++++++++++++++++++++++++++++++++++++++
> include/linux/spi/spi_of.h | 5 +++
> 2 files changed, 72 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/spi/spi_of.c b/drivers/spi/spi_of.c
> index b5ae434..2e1a11f 100644
> --- a/drivers/spi/spi_of.c
> +++ b/drivers/spi/spi_of.c
> @@ -11,6 +11,66 @@
> #include <linux/spi/spi.h>
> #include <linux/spi/spi_of.h>
>
> +/*
> + * Caller have no idea who is master, i.e. this function does not
> + * accept pointer to the master, instead we use board infos.
> + */
> +int of_spi_device_probe_common(struct device_node *np,
> + struct spi_board_info *spi_binfo,
> + const char *modalias)
> +{
Hm, I might well misunderstand something here, but it looks to me like you
are again trying to use both OF _and_ platform (spi_board_info) bindings
for your SPI setup? And this is exactly what we are trying to avoid in
Grant's series of patches...
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
More information about the Linuxppc-dev
mailing list