1. 24 Jul, 2022 2 commits
    • Lars-Peter Clausen's avatar
      i2c: cadence: Support PEC for SMBus block read · 9fdf6d97
      Lars-Peter Clausen authored
      SMBus packet error checking (PEC) is implemented by appending one
      additional byte of checksum data at the end of the message. This provides
      additional protection and allows to detect data corruption on the I2C bus.
      
      SMBus block reads support variable length reads. The first byte in the read
      message is the number of available data bytes.
      
      The combination of PEC and block read is currently not supported by the
      Cadence I2C driver.
       * When PEC is enabled the maximum transfer length for block reads
         increases from 33 to 34 bytes.
       * The I2C core smbus emulation layer relies on the driver updating the
         `i2c_msg` `len` field with the number of received bytes. The updated
         length is used when checking the PEC.
      
      Add support to the Cadence I2C driver for handling SMBus block reads with
      PEC. To determine the maximum transfer length uses the initial `len` value
      of the `i2c_msg`. When PEC is enabled this will be 2, when it is disabled
      it will be 1.
      
      Once a read transfer is done also increment the `len` field by the amount
      of received data bytes.
      
      This change has been tested with a UCM90320 PMBus power monitor, which
      requires block reads to access certain data fields, but also has PEC
      enabled by default.
      
      Fixes: df8eb569 ("i2c: Add driver for Cadence I2C controller")
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Tested-by: default avatarShubhrajyoti Datta <Shubhrajyoti.datta@amd.com>
      Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
      9fdf6d97
    • Bjorn Andersson's avatar
      i2c: qcom-geni: Propagate GENI_ABORT_DONE to geni_i2c_abort_xfer() · 913ee469
      Bjorn Andersson authored
      Waiting for M_CMD_ABORT_EN in geni_i2c_abort_xfer() races with the
      interrupt handler which will read and clear the abort bit, the result is
      that every abort attempt takes 1 second and is followed by a message
      about the abort having times out.
      
      Introduce a new state variable to carry the abort_done state from the
      interrupt handler back to geni_i2c_abort_xfer(). Also, turn NACK
      and TIMEOUT errors into debug messages
      Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Reviewed-by: default avatarVinod Koul <vkoul@kernel.org>
      [wsa: squashed two patches into one]
      Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
      913ee469
  2. 22 Jul, 2022 3 commits
  3. 16 Jul, 2022 4 commits
  4. 07 Jul, 2022 2 commits
  5. 06 Jul, 2022 3 commits
  6. 16 Jun, 2022 1 commit
  7. 15 Jun, 2022 3 commits
  8. 14 Jun, 2022 3 commits
  9. 13 Jun, 2022 1 commit
  10. 08 Jun, 2022 11 commits
  11. 06 Jun, 2022 3 commits
  12. 05 Jun, 2022 4 commits