1. 05 1月, 2009 1 次提交
  2. 01 1月, 2009 1 次提交
  3. 31 10月, 2008 1 次提交
  4. 17 10月, 2008 1 次提交
  5. 25 9月, 2008 1 次提交
  6. 24 9月, 2008 2 次提交
  7. 18 9月, 2008 1 次提交
  8. 11 9月, 2008 1 次提交
  9. 06 8月, 2008 1 次提交
  10. 26 7月, 2008 2 次提交
    • G
      spi: split up spi_new_device() to allow two stage registration. · dc87c98e
      Grant Likely 提交于
      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: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      dc87c98e
    • D
      gpio: mcp23s08 handles multiple chips per chipselect · 8f1cc3b1
      David Brownell 提交于
      Teach the mcp23s08 driver about a curious feature of these chips: up to
      four of them can share the same chipselect, with the SPI signals wired in
      parallel, by matching two bits in the first protocol byte against two
      address lines on the chip.
      
      This is handled by three software changes:
      
        * Platform data now holds an array of per-chip structs, not
          just one chip's address and pullup configuration.
      
        * Probe() and remove() now use another level of structure,
          wrapping an instance of the original structure for each
          mcp23s08 chip sharing that chipselect.
      
        * The HAEN bit is set, so that the hardware address bits can no
          longer be ignored (boot firmware may not have enabled them).
      
      The "one struct per chip" preserves the guts of the current code,
      but platform_data will need minor changes.
      
          OLD:
      	/* incorrect "slave" ID may not have mattered */
      	.slave = 3,
      	.pullups = BIT(3) | BIT(1) | BIT(0),
      
          NEW:
      	/* slave address _must_ match chip's wiring */
      	.chip[3] = {
      		.is_present = true,
      		.pullups = BIT(3) | BIT(1) | BIT(0),
      	},
      
      There's no change in how things _behave_ for spi_device nodes with a
      single mcp23s08 chip.  New multi-chip configurations assign GPIOs in
      sequence, without holes.  The spi_device just resembles a bigger
      controller, but internally it has multiple gpio_chip instances.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8f1cc3b1
  11. 25 7月, 2008 2 次提交
    • D
      rtc: ds1305/ds1306 driver · 53e84b67
      David Brownell 提交于
      Support the Dallas/Maxim DS1305 and DS1306 RTC chips.  These use SPI, and
      support alarms, NVRAM, and a trickle charger for use when their backup
      power supply is a supercap or rechargeable cell.
      
      This basic driver doesn't yet support suspend/resume or wakealarms.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      53e84b67
    • G
      spi: make spi_board_info.modalias a char array · 102eb975
      Grant Likely 提交于
      Currently, 'modalias' in the spi_device structure is a 'const char *'.
      The spi_new_device() function fills in the modalias value from a passed in
      spi_board_info data block.  Since it is a pointer copy, the new spi_device
      remains dependent on the spi_board_info structure after the new spi_device
      is registered (no other fields in spi_device directly depend on the
      spi_board_info structure; all of the other data is copied).
      
      This causes a problem when dynamically propulating the list of attached
      SPI devices.  For example, in arch/powerpc, the list of SPI devices can be
      populated from data in the device tree.  With the current code, the device
      tree adapter must kmalloc() a new spi_board_info structure for each new
      SPI device it finds in the device tree, and there is no simple mechanism
      in place for keeping track of these allocations.
      
      This patch changes modalias from a 'const char *' to a fixed char array.
      By copying the modalias string instead of referencing it, the dependency
      on the spi_board_info structure is eliminated and an outside caller does
      not need to maintain a separate spi_board_info allocation for each device.
      
      If searched through the code to the best of my ability for any references
      to modalias which may be affected by this change and haven't found
      anything.  It has been tested with the lite5200b platform in arch/powerpc.
      
      [dbrownell@users.sourceforge.net: cope with linux-next changes: KOBJ_NAME_LEN obliterated, etc]
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      102eb975
  12. 23 7月, 2008 1 次提交
  13. 22 7月, 2008 1 次提交
  14. 15 7月, 2008 1 次提交
  15. 03 6月, 2008 1 次提交
  16. 02 4月, 2008 1 次提交
  17. 06 2月, 2008 1 次提交
  18. 17 10月, 2007 1 次提交
  19. 16 10月, 2007 1 次提交
  20. 24 9月, 2007 1 次提交
    • D
      mmc_spi host driver · 15a0580c
      David Brownell 提交于
      This is the latest version of the MMC-over-SPI support.  It works
      on 2.6.23-rc2 plus git-mmc (from rc1-mm2), along with the preceding
      patches which teach the rest of the MMC stack about SPI.
      
      The main issue of note is that sometimes cards need to be power cycled
      to recover after certain faults.  Also, it may sometimes be necessary
      to disable CRCs.  ("modprobe mmc_core use_spi_crc=n")
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: mikael.starvik@axis.com,
      Cc: Hans-Peter Nilsson <hp@axis.com>
      Cc: Jan Nikitenko <jan.nikitenko@gmail.com>
      Cc: Mike Lavender <mike@steroidmicros.com>
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      15a0580c
  21. 01 8月, 2007 3 次提交
  22. 18 7月, 2007 5 次提交
  23. 17 6月, 2007 1 次提交
    • D
      spi doc updates · f5a9c77d
      David Brownell 提交于
      Update two points in the SPI interface documentation:
      
      - Update description of the "chip stays selected after message ends"
        mode.  In some cases it's required for correctness; it isn't just a
        performance tweak.  (Yes: to use this mode on mult-device busses, another
        programming interface will be needed.  One draft has been circulated
        already.)
      
      - Clarify spi_setup(), highlighting that callers must ensure that no
        requests are queued (can't change configuration except between I/Os), and
        that the device must be deselected when this returns (which is a key part
        of why it's called during device init).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f5a9c77d
  24. 09 5月, 2007 2 次提交
  25. 08 5月, 2007 1 次提交
  26. 17 3月, 2007 1 次提交
  27. 13 2月, 2007 4 次提交