RFC iio: Fix ABBA deadlock in inv-mpu6050
Status from this message: Applied.
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest9 patches 22 repliesApplied
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | iio: imu: inv_mpu6050: Fix multiline comments styledrivers/ | +23 | 1 reply | |
| 2/9 | iio: imu: inv_mpu6050: Fix Yoda conditionsdrivers/ drivers/ | +4 | 3 replies | |
| 3/9 | iio: imu: inv_mpu6050: Fix newlines to make code easier to readdrivers/ drivers/ | +2 | 1 reply | |
| 4/9 | iio: imu: inv_mpu6050: Remove unnecessary parenthesesdrivers/ | +2 | 1 reply | |
| 5/9 | iio: imu: inv_mpu6050: Delete space before commadrivers/ | +1 | 0 replies | |
| 6/9 | iio: imu: inv_mpu6050: Fix code indent for if statementdrivers/ | +2 | 1 reply | |
| 7/9 | iio: imu: inv_mpu6050: Fix alignment with open parenthesisdrivers/ drivers/ drivers/ +1 more | +47 | 3 replies | |
| 8/9 | i2c: i2c-mux: Allow for NULL select callbackdrivers/ | +6 | 2 replies | |
| 9/9 | iio: imu: inv_mpu6050: Fix deadlock between i2c adapter lock and mpu lockdrivers/ | +15 | 5 replies |
Reviews trailers per patch
1 of 9 patches has a Reviewed-by or Acked-by.
| Patch | Crt Mori |
|---|---|
| 1/9 | |
| 2/9 | A-b |
| 3/9 | |
| 4/9 | |
| 5/9 | |
| 6/9 | |
| 7/9 | |
| 8/9 | |
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH 0/9] iio: Fix ABBA deadlock in inv-mpu6050
Sending this as an RFC because I don't know if style fixes are appropriate for this driver and also not sure if deadlock fix is the best solution.
I2C people should only look at patches 8/9 and 9/9.
The mpu6050 accel+gyro combo has an auxiliary I2C bus, allowing for an auxiliary sensor to be connected (eg. a magnetometer).
The mpu can either act as an I2C master (functionality not currently implemented in the driver) or it can use a bypass multiplexer which directly connects the auxiliary I2C bus pins to the main I2C bus pins [1] Currently the driver implements the bypass mode via an I2C mux.
This patchset fixes a deadlock in inv-mpu6050 IMU which happens when magnetometer (on auxiliary I2C bus) runs in parallel with accel or gyro.
First 7 patches do some cleanup in order to make INV MPU6050 code easier to read.
Patch number 8 allows passing NULL select callbacks to i2c_mux_master_xfer and i2c_mux_smbus_xfer.
Patch number 9 actually fixes the deadlock.
[1] (page 28, https://www.cdiweb.com/datasheets/invensense/MPU-6050_DataSheet_V3%204.pdf)
Adriana Reus (2):
i2c: i2c-mux: Allow for NULL select callback
iio: imu: inv_mpu6050: Fix deadlock between i2c adapter lock and mpu
lock
Daniel Baluta (7):
iio: imu: inv_mpu6050: Fix multiline comments style
iio: imu: inv_mpu6050: Fix Yoda conditions
iio: imu: inv_mpu6050: Fix newlines to make code easier to read
iio: imu: inv_mpu6050: Remove unnecessary parentheses
iio: imu: inv_mpu6050: Delete space before comma
iio: imu: inv_mpu6050: Fix code indent for if statement
iio: imu: inv_mpu6050: Fix alignment with open parenthesis
drivers/i2c/i2c-mux.c | 10 ++- drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 6 +- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 101 ++++++++++++++------------ drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 90 ++++------------------- drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 23 +++--- drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 22 +++--- 6 files changed, 102 insertions(+), 150 deletions(-)
Signature · 1 line
2.5.0