1. 31 Aug, 2013 1 commit
    • Axel Lin's avatar
      spi: core: Fix spi_register_master error handling · e93b0724
      Axel Lin authored
      
      In the case spi_master_initialize_queue() fails, current code calls
      device_unregister() before return error from spi_register_master().
      However, all the drivers call spi_master_put() in the error path if
      spi_register_master() fails. Thus we should call device_del() rather than
      device_unregister() before return error from spi_register_master().
      
      This also makes all the spi_register_master() error handling consistent,
      because all other error paths of spi_register_master() expect drivers to
      call spi_master_put() if spi_register_master() fails.
      Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      e93b0724
  2. 22 Aug, 2013 3 commits
    • Axel Lin's avatar
      spi: Remove a redundant test for master->running in spi_queued_transfer · 96b3eace
      Axel Lin authored
      
      We have tested master->running immediately after grab the master->queue_lock.
      The status of master->running won't be changed until we release the lock.
      Thus remove a redundant test for master->running.
      Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      96b3eace
    • Sourav Poddar's avatar
      spi: conditional checking of mode and transfer bits. · db90a441
      Sourav Poddar authored
      There is a bug in the following patch:
      http://comments.gmane.org/gmane.linux.kernel.spi.devel/14420
      
      
      
      spi: DUAL and QUAD support
      
          fix the previous patch some mistake below:
          1. DT in slave node, use "spi-tx-nbits = <1/2/4>" in place of using
             "spi-tx-dual, spi-tx-quad" directly, same to rx. So correct the
             previous way to get the property in @of_register_spi_devices().
          2. Change the value of transfer bit macro(SPI_NBITS_SINGLE, SPI_NBITS_DUAL
             SPI_NBITS_QUAD) to 0x01, 0x02 and 0x04 to match the actual wires.
          3. Add the following check
             (1)keep the tx_nbits and rx_nbits in spi_transfer is not beyond the
                single, dual and quad.
             (2)keep tx_nbits and rx_nbits are contained by @spi_device->mode
                example: if @spi_device->mode = DUAL, then tx/rx_nbits can not be set
                         to QUAD(SPI_NBITS_QUAD)
             (3)if "@spi_device->mode & SPI_3WIRE", then tx/rx_nbits should be in
                single(SPI_NBITS_SINGLE)
      
      Checking of the tx/rx transfer bits and mode bits should be done conditionally
      based on type of buffer filled else EINVAL condition will
      always get hit either for rx or tx.
      Signed-off-by: default avatarSourav Poddar <sourav.poddar@ti.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      db90a441
    • wangyuhang's avatar
      spi: DUAL and QUAD support · f477b7fb
      wangyuhang authored
      
      fix the previous patch some mistake below:
      1. DT in slave node, use "spi-tx-nbits = <1/2/4>" in place of using
         "spi-tx-dual, spi-tx-quad" directly, same to rx. So correct the
         previous way to get the property in @of_register_spi_devices().
      2. Change the value of transfer bit macro(SPI_NBITS_SINGLE, SPI_NBITS_DUAL
         SPI_NBITS_QUAD) to 0x01, 0x02 and 0x04 to match the actual wires.
      3. Add the following check
         (1)keep the tx_nbits and rx_nbits in spi_transfer is not beyond the
            single, dual and quad.
         (2)keep tx_nbits and rx_nbits are contained by @spi_device->mode
            example: if @spi_device->mode = DUAL, then tx/rx_nbits can not be set
                     to QUAD(SPI_NBITS_QUAD)
         (3)if "@spi_device->mode & SPI_3WIRE", then tx/rx_nbits should be in
            single(SPI_NBITS_SINGLE)
      Signed-off-by: default avatarwangyuhang <wangyuhang2014@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      f477b7fb
  3. 14 Aug, 2013 1 commit
    • Gabor Juhos's avatar
      spi: limit default transfer speed to controller's max speed · 56ede94a
      Gabor Juhos authored
      
      Since the 'spi: Support transfer speed checking in the core'
      change, the SPI core validates the desired speed of a given
      transfer against the minimum and maximum speeds supported by
      the controller.
      
      If the speed of a transfer is not specified, the core uses
      the maximum speed of the actual SPI device. However if the
      maximum speed of the actual device is greater than the
      maximum speed of the controller, the core will reject the
      transfer due to the aforementioned change.
      
      Change the code to use the maximum speed of the controller
      by default if that is below the device's maximum speed.
      Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      56ede94a
  4. 29 Jul, 2013 1 commit
  5. 18 Jul, 2013 1 commit
  6. 15 Jul, 2013 2 commits
  7. 03 Jul, 2013 1 commit
  8. 03 Jun, 2013 1 commit
  9. 07 Apr, 2013 2 commits
  10. 01 Apr, 2013 3 commits
  11. 13 Feb, 2013 1 commit
  12. 10 Feb, 2013 1 commit
  13. 07 Feb, 2013 1 commit
  14. 06 Feb, 2013 1 commit
  15. 05 Feb, 2013 3 commits
  16. 15 Dec, 2012 1 commit
  17. 10 Dec, 2012 1 commit
  18. 07 Dec, 2012 2 commits
  19. 06 Dec, 2012 2 commits
  20. 30 Nov, 2012 1 commit
  21. 29 Nov, 2012 1 commit
  22. 21 Nov, 2012 1 commit
  23. 09 Nov, 2012 2 commits
  24. 21 May, 2012 1 commit
  25. 20 May, 2012 1 commit
  26. 11 May, 2012 1 commit
  27. 13 Apr, 2012 1 commit
  28. 15 Mar, 2012 1 commit
  29. 11 Mar, 2012 1 commit