]> asedeno.scripts.mit.edu Git - linux.git/commit
tpm/tpm_i2c_infineon: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)
authorPeter Rosin <peda@axentia.se>
Wed, 20 Jun 2018 05:17:54 +0000 (07:17 +0200)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sat, 28 Jul 2018 14:03:11 +0000 (17:03 +0300)
commit79e2472f99ab457417aaad98bf83ab565fa32bd0
treedea26930f05e65b5a53ce5ddf252537853a55ad4
parent1a339b658d9dbe1471f67b78237cf8fa08bbbeb5
tpm/tpm_i2c_infineon: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)

Locking the root adapter for __i2c_transfer will deadlock if the
device sits behind a mux-locked I2C mux. Switch to the finer-grained
i2c_lock_bus with the I2C_LOCK_SEGMENT flag. If the device does not
sit behind a mux-locked mux, the two locking variants are equivalent.

Signed-off-by: Peter Rosin <peda@axentia.se>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Alexander Steffen <Alexander.Steffen@infineon.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm_i2c_infineon.c