]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mfd: 88pm860x-i2c: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)
authorPeter Rosin <peda@axentia.se>
Wed, 20 Jun 2018 05:18:02 +0000 (07:18 +0200)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:49:23 +0000 (19:49 -0600)
commite1221ae258bee8b5e9506e16e5cbd537075f6504
treeabef791240ac11cca7e3d08fbaa1f3c1d75fe155
parentb79a37571f82cc7faf3db50f23ad844993394b0e
mfd: 88pm860x-i2c: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)

BugLink: https://bugs.launchpad.net/bugs/1836117
[ Upstream commit 8c8f74f327a76604a499fad8c54c15e1c0ee8051 ]

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>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/mfd/88pm860x-i2c.c