1. 01 8月, 2007 2 次提交
  2. 18 7月, 2007 1 次提交
  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 1 次提交
  5. 13 2月, 2007 4 次提交
  6. 08 2月, 2007 2 次提交
  7. 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
  8. 29 6月, 2006 1 次提交
  9. 17 5月, 2006 4 次提交
  10. 14 1月, 2006 5 次提交
    • 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
    • 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: simple SPI framework · 8ae12a0d
      David Brownell 提交于
      This is the core of a small SPI framework, implementing the model of a
      queue of messages which complete asynchronously (with thin synchronous
      wrappers on top).
      
        - It's still less than 2KB of ".text" (ARM).  If there's got to be a
          mid-layer for something so simple, that's the right size budget.  :)
      
        - The guts use board-specific SPI device tables to build the driver
          model tree.  (Hardware probing is rarely an option.)
      
        - This version of Kconfig includes no drivers.  At this writing there
          are two known master controller drivers (PXA/SSP, OMAP MicroWire)
          and three protocol drivers (CS8415a, ADS7846, DataFlash) with LKML
          mentions of other drivers in development.
      
        - No userspace API.  There are several implementations to compare.
          Implement them like any other driver, and bind them with sysfs.
      
      The changes from last version posted to LKML (on 11-Nov-2005) are minor,
      and include:
      
        - One bugfix (removes a FIXME), with the visible effect of making device
          names be "spiB.C" where B is the bus number and C is the chipselect.
      
        - The "caller provides DMA mappings" mechanism now has kerneldoc, for
          DMA drivers that want to be fancy.
      
        - Hey, the framework init can be subsys_init.  Even though board init
          logic fires earlier, at arch_init ... since the framework init is
          for driver support, and the board init support uses static init.
      
        - Various additional spec/doc clarifications based on discussions
          with other folk.  It adds a brief "thank you" at the end, for folk
          who've helped nudge this framework into existence.
      
      As I've said before, I think that "protocol tweaking" is the main support
      that this driver framework will need to evolve.
      
      From: Mark Underwood <basicmark@yahoo.com>
      
        Update the SPI framework to remove a potential priority inversion case by
        reverting to kmalloc if the pre-allocated DMA-safe buffer isn't available.
      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>
      8ae12a0d