1. 09 5月, 2007 1 次提交
  2. 08 5月, 2007 1 次提交
  3. 17 3月, 2007 1 次提交
  4. 13 2月, 2007 5 次提交
  5. 08 2月, 2007 2 次提交
  6. 18 1月, 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 5 次提交
  10. 26 4月, 2006 1 次提交
  11. 12 4月, 2006 2 次提交
  12. 14 1月, 2006 10 次提交
    • 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
    • D
      [PATCH] spi: ads7846 driver · ffa458c1
      David Brownell 提交于
      This is a driver for the ADS7846 touchscreen sensor, derived from
      the corgi_ts and omap_ts drivers.  Key differences from those two:
      
        - Uses the new SPI framework (minimalist version)
        - <linux/spi/ads7846.h> abstracts board-specific touchscreen info
        - Sysfs attributes for the temperature and voltage sensors
        - Uses fewer ARM-specific IRQ primitives
      
      The temperature and voltage sensors show up in sysfs like this:
      
        $ pwd
        /sys/devices/platform/omap-uwire/spi2.0
        $ ls
        bus@          input:event0@ power/        temp1         vbatt
        driver@       modalias      temp0         vaux
        $ cat modalias
        ads7846
        $ cat temp0
        991
        $ cat temp1
        1177
        $
      
      So far only basic testing has been done.  There's a fair amount of hardware
      that uses this sensor, and which also runs Linux, which should eventually
      be able to use this driver.
      
      One portability note may be of special interest.  It turns out that not all
      SPI controllers are happy issuing requests that do things like "write 8 bit
      command, read 12 bit response".  Most of them seem happy to handle various
      word sizes, so the issue isn't "12 bit response" but rather "different rx
      and tx write sizes", despite that being a common MicroWire convention.  So
      this version of the driver no longer reads 12 bit native-endian words; it
      reads 16-bit big-endian responses, then byteswaps them and shifts the
      results to discard the noise.
      Signed-off-by: NDavid Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ffa458c1
    • 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