1. 26 Jul, 2008 3 commits
    • Grant Likely's avatar
      spi: Add OF binding support for SPI busses · 284b0189
      Grant Likely authored
      This patch adds support for populating an SPI bus based on data in the
      OF device tree.  This is useful for powerpc platforms which use the
      device tree instead of discrete code for describing platform layout.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      284b0189
    • Grant Likely's avatar
      spi: split up spi_new_device() to allow two stage registration. · dc87c98e
      Grant Likely authored
      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: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      dc87c98e
    • Grant Likely's avatar
      of: adapt of_find_i2c_driver() to be usable by SPI also · 3f07af49
      Grant Likely authored
      SPI has a similar problem as I2C in that it needs to determine an
      appropriate modalias value for each device node.  This patch adapts
      the of_i2c of_find_i2c_driver() function to be usable by of_spi also.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      3f07af49
  2. 25 Jul, 2008 37 commits