1. 01 8月, 2007 3 次提交
  2. 18 7月, 2007 5 次提交
  3. 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
  4. 09 5月, 2007 2 次提交
  5. 08 5月, 2007 1 次提交
  6. 17 3月, 2007 1 次提交
  7. 13 2月, 2007 5 次提交
  8. 08 2月, 2007 2 次提交
  9. 18 1月, 2007 2 次提交
  10. 31 12月, 2006 1 次提交
    • D
      [PATCH] SPI: define null tx_buf to mean "shift out zeroes" · 4b1badf5
      David Brownell 提交于
      Some issues were recently turned up with the current specification of what
      it means for spi_transfer.tx_buf to be null, as part of transfers which are
      (from the SPI protocol driver perspective) pure reads.
      
      Specifically, that it seems better to change the TX behaviour there from
      "undefined" to "will shift zeroes".  This lets protocol drivers (like the
      ads7846 driver) depend on that behavior.  It's what most controller drivers
      in the tree are already doing (with one exception and one case of driver
      wanting-to-oops), it's what Microwire hardware will necessarily be doing,
      and it removes an issue whereby certain security audits would need to
      define such a value anyway as part of removing covert channels.
      
      This patch changes the specification to require shifting zeroes, and
      updates all currently merged SPI controller drivers to do so.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4b1badf5
  11. 29 6月, 2006 1 次提交
  12. 17 5月, 2006 5 次提交
  13. 26 4月, 2006 1 次提交
  14. 12 4月, 2006 2 次提交
  15. 14 1月, 2006 8 次提交
    • A
      [PATCH] spi: remove fastcall crap · 5d870c8e
      Andrew Morton 提交于
      gcc4 generates warnings when a non-FASTCALL function pointer is assigned to a
      FASTCALL one.  Perhaps it has taste.
      
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5d870c8e
    • V
      [PATCH] spi: use linked lists rather than an array · 8275c642
      Vitaly Wool 提交于
      This makes the SPI core and its users access transfers in the SPI message
      structure as linked list not as an array, as discussed on LKML.
      
      From: David Brownell <dbrownell@users.sourceforge.net>
      
        Updates including doc, bugfixes to the list code, add
        spi_message_add_tail().  Plus, initialize things _before_ grabbing the
        locks in some cases (in case it grows more expensive).  This also merges
        some bitbang updates of mine that didn't yet make it into the mm tree.
      Signed-off-by: NVitaly Wool <vwool@ru.mvista.com>
      Signed-off-by: NDmitry Pervushin <dpervushin@gmail.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8275c642
    • M
      [PATCH] spi: M25 series SPI flash · 2f9f7628
      Mike Lavender 提交于
      This was originally a driver for the ST M25P80 SPI flash.  It's been
      updated slightly to handle other M25P series chips.
      
      For many of these chips, the specific type could be probed, but for now
      this just requires static setup with flash_platform_data that lists the
      chip type (size, format) and any default partitioning to use.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Mike Lavender <mike@steroidmicros.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2f9f7628
    • D
      [PATCH] spi: add spi_bitbang driver · 9904f22a
      David Brownell 提交于
      This adds a bitbanging spi master, hooking up to board/adapter-specific glue
      code which knows how to set and read the signals (gpios etc).
      
      This code kicks in after the glue code creates a platform_device with the
      right platform_data.  That data includes I/O loops, which will usually
      come from expanding an inline function (provided in the header).  One goal
      is that the I/O loops should be easily optimized down to a few GPIO register
      accesses, in common cases, for speed and minimized overhead.
      
      This understands all the currently defined protocol tweaking options in the
      SPI framework, and might eventually serve as as reference implementation.
      
        - different word sizes (1..32 bits)
        - differing clock rates
        - SPI modes differing by CPOL (affecting chip select and I/O loops)
        - SPI modes differing by CPHA (affecting I/O loops)
        - delays (usecs) after transfers
        - temporarily deselecting chips in mid-transfer
      
      A lot of hardware could work with this framework, though common types of
      controller can't reach peak performance without switching to a driver
      structure that supports pipelining of transfers (e.g.  DMA queues) and maybe
      controllers (e.g.  IRQ driven).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9904f22a
    • D
      [PATCH] spi: ads7836 uses spi_driver · 2e5a7bd9
      David Brownell 提交于
      This updates the ads7864 driver to use the new "spi_driver" struct, and
      includes some minor unrelated cleanup.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2e5a7bd9
    • D
      [PATCH] SPI core tweaks, bugfix · 0c868461
      David Brownell 提交于
      This includes various updates to the SPI core:
      
        - Fixes a driver model refcount bug in spi_unregister_master() paths.
      
        - The spi_master structures now have wrappers which help keep drivers
          from needing class-level get/put for device data or for refcounts.
      
        - Check for a few setup errors that would cause oopsing later.
      
        - Docs say more about memory management.  Highlights the use of DMA-safe
          i/o buffers, and zero-initializing spi_message and such metadata.
      
        - Provide a simple alloc/free for spi_message and its spi_transfer;
          this is only one of the possible memory management policies.
      
      Nothing to break code that already works.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0c868461
    • D
      [PATCH] spi: add spi_driver to SPI framework · b885244e
      David Brownell 提交于
      This is a refresh of the "Simple SPI Framework" found in 2.6.15-rc3-mm1
      which makes the following changes:
      
        * There's now a "struct spi_driver".  This increase the footprint
          of the core a bit, since it now includes code to do what the driver
          core was previously handling directly.  Documentation and comments
          were updated to match.
      
        * spi_alloc_master() now does class_device_initialize(), so it can
          at least be refcounted before spi_register_master().  To match,
          spi_register_master() switched over to class_device_add().
      
        * States explicitly that after transfer errors, spi_devices will be
          deselected.  We want fault recovery procedures to work the same
          for all controller drivers.
      
        * Minor tweaks:  controller_data no longer points to readonly data;
          prevent some potential cast-from-null bugs with container_of calls;
          clarifies some existing kerneldoc,
      
      And a few small cleanups.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b885244e
    • D
      [PATCH] spi: mtd dataflash driver · 1d6432fe
      David Brownell 提交于
      This is a conversion of the AT91rm9200 DataFlash MTD driver to use the
      lightweight SPI framework, and no longer be AT91-specific.  It compiles
      down to less than 3KBytes on ARM.
      
      The driver allows board-specific init code to provide platform_data with
      the relevant MTD partitioning information, and hotplugs.
      
      This version has been lightly tested.  Its parent at91_dataflash driver has
      been pretty well banged on, although kernel.org JFFS2 dataflash support was
      acting broken the last time I tried it.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1d6432fe