1. 08 5月, 2014 1 次提交
  2. 29 3月, 2014 1 次提交
  3. 04 2月, 2014 1 次提交
  4. 03 2月, 2014 1 次提交
  5. 24 11月, 2013 1 次提交
  6. 17 10月, 2013 1 次提交
  7. 07 10月, 2013 1 次提交
    • A
      spi: bitbang: Let spi_bitbang_start() take a reference to master · 702a4879
      Axel Lin 提交于
      Many drivers that use bitbang library have a leak on probe error paths.
      This is because once a spi_master_get() call succeeds, we need an additional
      spi_master_put() call to free the memory.
      
      Fix this issue by moving the code taking a reference to master to
      spi_bitbang_start(), so spi_bitbang_start() will take a reference to master on
      success. With this change, the caller is responsible for calling
      spi_bitbang_stop() to decrement the reference and spi_master_put() as
      counterpart of spi_alloc_master() to prevent a memory leak.
      
      So now we have below patten for drivers using bitbang library:
      
      probe:
      spi_alloc_master        -> Init reference count to 1
      spi_bitbang_start       -> Increment reference count
      remove:
      spi_bitbang_stop        -> Decrement reference count
      spi_master_put          -> Decrement reference count (reference count reaches 0)
      
      Fixup all users accordingly.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Suggested-by: NUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Acked-by: NUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      702a4879
  8. 17 9月, 2013 1 次提交
    • A
      spi: bitbang: Let spi_bitbang_start() take a reference to master · 94c69f76
      Axel Lin 提交于
      Many drivers that use bitbang library have a leak on probe error paths.
      This is because once a spi_master_get() call succeeds, we need an additional
      spi_master_put() call to free the memory.
      
      Fix this issue by moving the code taking a reference to master to
      spi_bitbang_start(), so spi_bitbang_start() will take a reference to master on
      success. With this change, the caller is responsible for calling
      spi_bitbang_stop() to decrement the reference and spi_master_put() as
      counterpart of spi_alloc_master() to prevent a memory leak.
      
      So now we have below patten for drivers using bitbang library:
      
      probe:
      spi_alloc_master        -> Init reference count to 1
      spi_bitbang_start       -> Increment reference count
      remove:
      spi_bitbang_stop        -> Decrement reference count
      spi_master_put          -> Decrement reference count (reference count reaches 0)
      
      Fixup all users accordingly.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Suggested-by: NUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Acked-by: NUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      94c69f76
  9. 29 8月, 2013 1 次提交
  10. 30 5月, 2013 1 次提交
  11. 13 5月, 2013 1 次提交
  12. 10 4月, 2013 1 次提交
  13. 26 1月, 2013 1 次提交
  14. 08 12月, 2012 1 次提交
  15. 07 9月, 2012 1 次提交
  16. 06 9月, 2012 2 次提交
  17. 10 7月, 2012 1 次提交
  18. 08 12月, 2011 1 次提交
  19. 01 11月, 2011 1 次提交
  20. 25 10月, 2011 1 次提交
  21. 06 6月, 2011 1 次提交
  22. 03 10月, 2010 1 次提交
  23. 04 7月, 2010 2 次提交
  24. 25 5月, 2010 1 次提交
    • H
      spi: move bitbang txrx utility functions to private header · 41c4221c
      hartleys 提交于
      A number of files in drivers/spi fail checkincludes.pl due to the double
      include of <linux/spi/spi_bitbang.h>.
      
      The first include is needed to get the struct spi_bitbang definition and
      the spi_bitbang_* function prototypes.
      
      The second include happens after defining EXPAND_BITBANG_TXRX to get the
      inlined bitbang_txrx_* utility functions.
      
      The <linux/spi/spi_bitbang.h> header is also included by a number of other
      spi drivers, as well as some arch/ code, in order to use struct spi_bitbang
      and the associated functions.
      
      To fix the double include, and remove any potential confusion about it, move
      the inlined bitbang_txrx_* functions to a new private header in drivers/spi
      and also remove the need to define EXPAND_BITBANG_TXRX.
      Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      41c4221c
  25. 03 4月, 2009 1 次提交
  26. 25 3月, 2009 1 次提交
  27. 19 2月, 2009 1 次提交
  28. 07 1月, 2009 1 次提交
    • D
      spi_gpio driver · d29389de
      David Brownell 提交于
      Generalize the old at91rm9200 "bootstrap" bitbanging SPI master driver as
      "spi_gpio", so it works with arbitrary GPIOs and can be configured through
      platform_data.  Such SPI masters support:
      
       - any number of bus instances (bus_num is the platform_device.id)
       - any number of chipselects (one GPIO per spi_device)
       - all four SPI_MODE values, and SPI_CS_HIGH
       - i/o word sizes from 1 to 32 bits;
       - devices configured as with any other spi_master controller
      
      When configured using platform_data, this provides relatively low clock
      rates.  On platforms that support inlined GPIO calls, significantly
      improved transfer speeds are also possible with a semi-custom driver.
      (It's still painful when accessing flash memory, but less so.)
      
      Sanity checked by using this version to replace both native controllers on
      a board with six different SPI slaves, relying on three different
      SPI_MODE_* values and both SPI_CS_HIGH settings for correct operation.
      
      [akpm@linux-foundation.org: cleanups]
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: NMagnus Damm <damm@igel.co.jp>
      Tested-by: NMagnus Damm <damm@igel.co.jp>
      Cc: Torgil Svensson <torgil.svensson@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d29389de