1. Nov 28, 2019
    • Charles Keepax's avatar
      spi: dw: Correct handling of native chipselect · ada9e3fc
      Charles Keepax authored
      This patch reverts commit 6e0a32d6 ("spi: dw: Fix default polarity
      of native chipselect").
      
      The SPI framework always called the set_cs callback with the logic
      level it desired on the chip select line, which is what the drivers
      original handling supported. commit f3186dd8 ("spi: Optionally
      use GPIO descriptors for CS GPIOs") changed these symantics, but only
      in the case of drivers that also support GPIO chip selects, to true
      meaning apply slave select rather than logic high. This left things in
      an odd state where a driver that only supports hardware chip selects,
      the core would handle polarity but if the driver supported GPIOs as
      well the driver should handle polarity.  At this point the reverted
      change was applied to change the logic in the driver to match new
      system.
      
      This was then broken by commit 3e5ec1db ("spi: Fix SPI_CS_HIGH
      setting when using native and GPIO CS") which reverted the core back
      to consistently calling set_cs with a logic level.
      
      This fix reverts the driver code back to its original state to match
      the current core code. This is probably a better fix as a) the set_cs
      callback is always called with consistent symantics and b) the
      inversion for SPI_CS_HIGH can be handled in the core and doesn't need
      to be coded in each driver supporting it.
      
      Fixes: 3e5ec1db
      
       ("spi: Fix SPI_CS_HIGH setting when using native and GPIO CS")
      Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Link: https://lore.kernel.org/r/20191127153936.29719-1-ckeepax@opensource.cirrus.com
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      ada9e3fc
  2. Nov 27, 2019
    • Charles Keepax's avatar
      spi: cadence: Correct handling of native chipselect · 61acd19f
      Charles Keepax authored
      To fix a regression on the Cadence SPI driver, this patch reverts
      commit 6046f540 ("spi: cadence: Fix default polarity of native
      chipselect").
      
      This patch was not the correct fix for the issue. The SPI framework
      calls the set_cs line with the logic level it desires on the chip select
      line, as such the old is_high handling was correct. However, this was
      broken by the fact that before commit 3e5ec1db ("spi: Fix SPI_CS_HIGH
      setting when using native and GPIO CS") all controllers that offered
      the use of a GPIO chip select had SPI_CS_HIGH applied, even for hardware
      chip selects. This caused the value passed into the driver to be inverted.
      Which unfortunately makes it look like a logical enable the chip select
      value.
      
      Since the core was corrected to not unconditionally apply SPI_CS_HIGH,
      the Cadence driver, whilst using the hardware chip select, will deselect
      the chip select every time we attempt to communicate with the device,
      which results in failed communications.
      
      Fixes: 3e5ec1db
      
       ("spi: Fix SPI_CS_HIGH setting when using native and GPIO CS")
      Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Link: https://lore.kernel.org/r/20191126164140.6240-1-ckeepax@opensource.cirrus.com
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      61acd19f
  3. Nov 25, 2019
  4. Nov 23, 2019
  5. Nov 21, 2019
  6. Nov 19, 2019
  7. Nov 18, 2019
  8. Nov 15, 2019
  9. Nov 13, 2019
  10. Nov 11, 2019
  11. Nov 09, 2019
  12. Nov 08, 2019
  13. Nov 07, 2019
  14. Nov 06, 2019
  15. Oct 31, 2019
  16. Oct 30, 2019
  17. Oct 28, 2019
  18. Oct 25, 2019