1. 26 May, 2015 2 commits
  2. 20 May, 2015 1 commit
  3. 07 May, 2015 1 commit
  4. 06 May, 2015 1 commit
  5. 27 Apr, 2015 1 commit
  6. 06 Jan, 2015 1 commit
  7. 21 Nov, 2014 1 commit
  8. 18 Nov, 2014 2 commits
  9. 20 Oct, 2014 1 commit
  10. 04 Sep, 2014 5 commits
  11. 20 May, 2014 1 commit
  12. 15 Apr, 2014 1 commit
  13. 14 Apr, 2014 5 commits
  14. 13 Mar, 2014 1 commit
  15. 02 Mar, 2014 1 commit
    • Qipan Li's avatar
      spi: sirf: provide a shortcut for spi command-data mode · eeb71395
      Qipan Li authored
      there are many SPI clients which use the following protocal:
      step 1: send command bytes to clients(rx buffer is empty)
      step 2: send data bytes to clients or receive data bytes from
      clients.
      SiRFprimaII provides a shortcut for this kind of SPI transfer.
      when tx buf is less or equal than 4 bytes and rx buf is null
      in a transfer, we think it as 'command' data and use hardware
      command register for the transfer.
      here we can save some CPU loading than doing both tx and rx
      for a normal transfer.
      Signed-off-by: default avatarQipan Li <Qipan.Li@csr.com>
      Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      eeb71395
  16. 26 Feb, 2014 1 commit
  17. 23 Feb, 2014 2 commits
  18. 03 Feb, 2014 1 commit
  19. 17 Jan, 2014 1 commit
  20. 14 Nov, 2013 1 commit
  21. 07 Oct, 2013 1 commit
    • Axel Lin's avatar
      spi: bitbang: Let spi_bitbang_start() take a reference to master · 702a4879
      Axel Lin authored
      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: default avatarAxel Lin <axel.lin@ingics.com>
      Suggested-by: default avatarUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Acked-by: default avatarUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      702a4879
  22. 17 Sep, 2013 1 commit
    • Axel Lin's avatar
      spi: bitbang: Let spi_bitbang_start() take a reference to master · 94c69f76
      Axel Lin authored
      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: default avatarAxel Lin <axel.lin@ingics.com>
      Suggested-by: default avatarUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Acked-by: default avatarUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      94c69f76
  23. 29 Aug, 2013 1 commit
  24. 26 Aug, 2013 1 commit
  25. 23 Aug, 2013 1 commit
  26. 14 Aug, 2013 1 commit
    • Julia Lawall's avatar
      spi/sirf: simplify use of devm_ioremap_resource · 2479790b
      Julia Lawall authored
      Remove unneeded error handling on the result of a call to
      platform_get_resource when the value is passed to devm_ioremap_resource.
      
      Move the call to platform_get_resource adjacent to the call to
      devm_ioremap_resource to make the connection between them more clear.
      
      A simplified version of the semantic patch that makes this change is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression pdev,res,n,e,e1;
      expression ret != 0;
      identifier l;
      @@
      
      - res = platform_get_resource(pdev, IORESOURCE_MEM, n);
        ... when != res
      - if (res == NULL) { ... \(goto l;\|return ret;\) }
        ... when != res
      + res = platform_get_resource(pdev, IORESOURCE_MEM, n);
        e = devm_ioremap_resource(e1, res);
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: default avatarBarry Song <Baohua.Song@csr.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      2479790b
  27. 06 Aug, 2013 1 commit
  28. 15 Jul, 2013 1 commit
  29. 03 Jun, 2013 1 commit
    • Arnd Bergmann's avatar
      spi: sirf: avoid uninitialized-use warning · 804ae438
      Arnd Bergmann authored
      24778be2 "spi: convert drivers to use bits_per_word_mask"
      removed the "default" statement in the spi_sirfsoc_setup_transfer
      switch, causing a new warning:
      
      drivers/spi/spi-sirf.c: In function 'spi_sirfsoc_setup_transfer':
      arch/arm/include/asm/io.h:90:2: warning: 'rxfifo_ctrl' may be used uninitialized in this function [-Wmaybe-uninitialized]
        asm volatile("str %1, %0"
        ^
      drivers/spi/spi-sirf.c:364:19: note: 'rxfifo_ctrl' was declared here
        u32 txfifo_ctrl, rxfifo_ctrl;
                         ^
      
      The compiler has correctly identified that this case may happen,
      but since we know that things are horribly broken if bits_per_word
      is ever something other than the values we tested, calling BUG()
      is an appropriate action and tells the compiler that execution
      will not continue afterwards.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Mark Brown <broonie@kernel.org>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      804ae438