1. 06 Feb, 2019 11 commits
  2. 30 Jan, 2019 2 commits
    • Jonas Bonn's avatar
      spi-atmel: support inter-word delay · 473a78a7
      Jonas Bonn authored
      If the SPI slave requires an inter-word delay, configure the DLYBCT
      register accordingly.
      
      Tested on a SAMA5D2 board (derived from SAMA5D2-Xplained reference
      board).
      Signed-off-by: default avatarJonas Bonn <jonas@norrbonn.se>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      CC: Nicolas Ferre <nicolas.ferre@microchip.com>
      CC: Mark Brown <broonie@kernel.org>
      CC: Alexandre Belloni <alexandre.belloni@bootlin.com>
      CC: Ludovic Desroches <ludovic.desroches@microchip.com>
      CC: linux-spi@vger.kernel.org
      CC: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      473a78a7
    • Jonas Bonn's avatar
      spi: support inter-word delay requirement for devices · b7bb367a
      Jonas Bonn authored
      Some devices are slow and cannot keep up with the SPI bus and therefore
      require a short delay between words of the SPI transfer.
      
      The example of this that I'm looking at is a SAMA5D2 with a minimum SPI
      clock of 400kHz talking to an AVR-based SPI slave.  The AVR cannot put
      bytes on the bus fast enough to keep up with the SoC's SPI controller
      even at the lowest bus speed.
      
      This patch introduces the ability to specify a required inter-word
      delay for SPI devices.  It is up to the controller driver to configure
      itself accordingly in order to introduce the requested delay.
      
      Note that, for spi_transfer, there is already a field word_delay that
      provides similar functionality.  This field, however, is specified in
      clock cycles (and worse, SPI controller cycles, not SCK cycles); that
      makes this value dependent on the master clock instead of the device
      clock for which the delay is intended to provide some relief.  This
      patch leaves this old word_delay in place and provides a time-based
      word_delay_us alongside it; the new field fits in the struct padding
      so struct size is constant.  There is only one in-kernel user of the
      word_delay field and presumably that driver could be reworked to use
      the time-based value instead.
      
      The time-based delay is limited to 8 bits as these delays are intended
      to be short.  The SAMA5D2 that I've tested this on limits delays to a
      maximum of ~100us, which is already many word-transfer periods even at
      the minimum transfer speed supported by the controller.
      Signed-off-by: default avatarJonas Bonn <jonas@norrbonn.se>
      CC: Mark Brown <broonie@kernel.org>
      CC: Rob Herring <robh+dt@kernel.org>
      CC: Mark Rutland <mark.rutland@arm.com>
      CC: linux-spi@vger.kernel.org
      CC: devicetree@vger.kernel.org
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      b7bb367a
  3. 29 Jan, 2019 3 commits
  4. 28 Jan, 2019 6 commits
  5. 24 Jan, 2019 4 commits
  6. 23 Jan, 2019 3 commits
  7. 21 Jan, 2019 1 commit
  8. 18 Jan, 2019 3 commits
  9. 17 Jan, 2019 4 commits
  10. 14 Jan, 2019 3 commits
    • Charles Keepax's avatar
      spi: cadence: Correct initialisation of runtime PM · 734882a8
      Charles Keepax authored
      Currently the driver calls pm_runtime_put_autosuspend but without ever
      having done a pm_runtime_get, this causes the reference count in the pm
      runtime core to become -1. The bad reference count causes the core to
      sometimes suspend whilst an active SPI transfer is in progress.
      
      arizona spi0.1: SPI transfer timed out
      spi_master spi0: failed to transfer one message from queue
      
      The correct proceedure is to do all the initialisation that requires the
      hardware to be powered up before enabling the PM runtime, then enable
      the PM runtime having called pm_runtime_set_active to inform it that the
      hardware is currently powered up. The core will then power it down at
      it's leisure and no explicit pm_runtime_put is required.
      
      Fixes: d36ccd9f ("spi: cadence: Runtime pm adaptation")
      Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      734882a8
    • Stephen Boyd's avatar
      spi: spi-geni-qcom: Get rid of forward declaration · de43affe
      Stephen Boyd authored
      We don't need this forward declaration. Move the function to where it
      needed so we can drop it and shave some lines of code.
      
      CC: Girish Mahadevan <girishm@codeaurora.org>
      CC: Dilip Kota <dkota@codeaurora.org>
      CC: Alok Chauhan <alokc@codeaurora.org>
      Cc: Douglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      de43affe
    • Stephen Boyd's avatar
      spi: spi-geni-qcom: Don't initialize completion for normal message · 0357a3da
      Stephen Boyd authored
      We only use this completion when we're doing something that isn't a
      message transfer. For example, changing CS or aborting/canceling a
      command. All of those situations properly reinitialize the completion
      before sending the GENI the special command to change CS or cancel, etc.
      Given that, let's remove the initialization here.
      
      Cc: Girish Mahadevan <girishm@codeaurora.org>
      Cc: Dilip Kota <dkota@codeaurora.org>
      Cc: Alok Chauhan <alokc@codeaurora.org>
      Cc: Douglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      0357a3da