linux-sg2042/include/linux/spi
Grant Likely dc87c98e8f spi: split up spi_new_device() to allow two stage registration.
spi_new_device() allocates and registers an spi device all in one swoop.
If the driver needs to add extra data to the spi_device before it is
registered, then this causes problems.  This is needed for OF device
tree support so that the SPI device tree helper can add a pointer to
the device node after the device is allocated, but before the device
is registered.  OF aware SPI devices can then retrieve data out of the
device node to populate a platform data structure.

This patch splits the allocation and registration portions of code out
of spi_new_device() and creates two new functions; spi_alloc_device()
and spi_register_device().  spi_new_device() is modified to use the new
functions for allocation and registration.  None of the existing users
of spi_new_device() should be affected by this change.

Drivers using the new API can forego the use of spi_board_info
structure to describe the device layout and populate data into the
spi_device structure directly.

This change is in preparation for adding an OF device tree parser to
generate spi_devices based on data in the device tree.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
2008-07-25 22:34:29 -04:00
..
Kbuild
ad7877.h
ads7846.h Input: ads7846 - simplify support of external vREF (and ads7843) 2008-04-02 00:43:01 -04:00
at73c213.h [ALSA] ALSA sound driver for the AT73C213 DAC using Atmel SSC driver 2007-10-16 15:57:50 +02:00
ds1305.h rtc: ds1305/ds1306 driver 2008-07-24 10:47:33 -07:00
eeprom.h
flash.h
max7301.h gpio: gpio driver for max7301 SPI GPIO expander 2008-07-22 09:59:40 -07:00
mcp23s08.h gpio: mcp23s08 handles multiple chips per chipselect 2008-07-25 10:53:30 -07:00
mmc_spi.h mmc_spi: add support for card-detection polling 2008-07-15 14:14:41 +02:00
spi.h spi: split up spi_new_device() to allow two stage registration. 2008-07-25 22:34:29 -04:00
spi_bitbang.h
spidev.h spidev supports more communications modes 2007-07-31 15:39:40 -07:00
tle62x0.h SPI: tle620x power switch driver 2007-07-17 10:23:05 -07:00