[PATCH] SPI: Unify simple platform data for some controllers

Arnd Bergmann arnd at arndb.de
Wed May 29 09:26:34 EDT 2013


On Wednesday 29 May 2013, Mark Brown wrote:
> On Wed, May 29, 2013 at 12:49:13PM +0400, Alexander Shiyan wrote:
> > > On Wednesday 29 May 2013 10:42:22 Alexander Shiyan wrote:
> 
> > > Wouldn't it be better to kill off the platform_data for these drivers
> > > and pass the gpio number through spi->controller_data as the
> > > spi_gpio driver does?
> 
> > Interesting way. Just one question remains, for using not-dt variant,
> > how  we should specify num_chipselect parameter for master?
> > I see only way for specify maximum constant in the driver.
> 
> We should fix that to be dynamic, having a fixed number is not sensible
> when GPIOs are usable for chip select. 

Agreed (not that I have much of a say on this matter).

> We probably also want to make
> GPIO chip select support a standard thing that's available with every
> driver rather than something the driver has to know about but that's a
> separate bit of work.

That actually seems simpler than doing it in just one driver: if
we add a cs_gpio field to spi_board_info, spi_new_device could
just copy that information into the new spi_device instead of
taking it from master->cs_gpios.

	Arnd



More information about the linux-arm-kernel mailing list