From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Firstly, sorry for the huge patch set!
I've run out of signficiant groups to break the remaining patches up into.
Rather than have lots of small series of 5-10 patches, lets just have one
mega one. Feel free to review a subset! I'll nibble away at this as reviews
come in and post a v2 later in the cycle with whatever remains unreviewed
if that is necessary.
Note that a number of the drivers touched in this series have no
obvious active maintainer, so it would be much appreciated if anyone
has time to take a look!
This is effectively part 5 of what will probably be around 5 series
focused on moving from iio_device_claim/release_direct_mode() to
iio_device_claim/release_direct(). The new form is more consistent
with conditional locking semantics and sparse markings have been
added that let us detect miss-balance between claim and release.
More details can be found in the cover letter of the first series:
https://lore.kernel.org/all/20250209180624.701140-1-jic23@kernel.org/
This series focuses on all the remaining drivers.
The final patch removes the old infrastructure.
Jonathan Cameron (37):
iio: addac: ad74115: Switch to sparse friendly
iio_device_claim/release_direct()
iio: chemical: ccs811: Factor out handling of read of IIO_INFO_RAW to
simplify error paths.
iio: chemical: ccs811: Switch to sparse friendly
iio_device_claim/release_direct()
iio: chemical: atlas-sensor: Switch to sparse friendly
iio_device_claim/release_direct()
iio: chemical: scd4x: Switch to sparse friendly
iio_device_claim/release_direct()
iio: common: scmi: Switch to sparse friendly
iio_device_claim/release_direct()
iio: common: st_sensors: Switch to sparse friendly
iio_device_claim/release_direct()
iio: gyro: adxrs290: Switch to sparse friendly
iio_device_claim/release_direct()
iio: health: max30102: Switch to sparse friendly
iio_device_claim/release_direct()
iio: humidity: hdc100x: Use guard(mutex) to simplify code flow
iio: humidity: hdc100x: Switch to sparse friendly
iio_device_claim/release_direct()
iio: humidity: hdc2010: Switch to sparse friendly
iio_device_claim/release_direct()
iio: humidity: hts211: Factor out everything under direct mode claim
into helper functions.
iio: humidity: hts211: Switch to sparse friendly
iio_device_claim/release_direct()
iio: imu: inv_icm42600: Switch to sparse friendly
iio_device_claim/release_direct()
iio: imu: inv_mpu6050: Switch to sparse friendly
iio_device_claim/release_direct()
iio: imu: smi240: Switch to sparse friendly
iio_device_claim/release_direct()
iio: imu: st_lsm6dsx: Factor out parts of st_lsm6dsx_shub_write_raw()
to allow direct returns
iio: imu: st_lsm6dsx: Switch to sparse friendly claim/release_direct()
iio: imu: st_lsm6dsx: Switch to sparse friendly
iio_device_claim/release_direct()
iio: magnetometer: mag3110: Factor out core of read/write_raw() and
use guard() to simplify code flow.
iio: magnetometer: mag3110: Switch to sparse friendly
iio_device_claim/release_direct()
iio: magnetometer: rm3100: Switch to sparse friendly
iio_device_claim/release_direct()
iio: pressure: dlhl60d: Switch to sparse friendly
iio_device_claim/release_direct()
iio: pressure: icp10100: Switch to sparse friendly
iio_device_claim/release_direct()
iio: pressure: mpl3115: factor out core of IIO_INFO_RAW read to
simplify code flow
iio: pressure: mpl3115: Switch to sparse friendly
iio_device_claim/release_direct()
iio: pressure: ms5611: Switch to sparse friendly
iio_device_claim/release_direct()
iio: pressure: rohm-bm1390: Switch to sparse friendly
iio_device_claim/release_direct()
iio: pressure: zpa2326: Switch to sparse friendly
iio_device_claim/release_direct()
iio: proximity: hx9023s: Switch to sparse friendly
iio_device_claim/release_direct()
iio: proximity: pulsed-light: Switch to sparse friendly
iio_device_claim/release_direct()
iio: proximity: sx9500: Switch to sparse friendly
iio_device_claim/release_direct()
iio: temp: maxim_thermocouple: Switch to sparse friendly
iio_device_claim/release_direct()
iio: temp: maxim_thermocouple: Drop unused mutex.h include.
staging: iio: ad5933: Switch to sparse friendly
iio_device_claim/release_direct()
iio: Adjust internals of handling of direct mode claiming to suit new
API.
drivers/iio/addac/ad74115.c | 7 +-
drivers/iio/chemical/atlas-sensor.c | 7 +-
drivers/iio/chemical/ccs811.c | 79 ++++-----
drivers/iio/chemical/scd4x.c | 7 +-
drivers/iio/common/scmi_sensors/scmi_iio.c | 7 +-
.../iio/common/st_sensors/st_sensors_core.c | 7 +-
drivers/iio/gyro/adxrs290.c | 14 +-
drivers/iio/health/max30102.c | 4 +-
drivers/iio/humidity/hdc100x.c | 68 +++-----
drivers/iio/humidity/hdc2010.c | 14 +-
drivers/iio/humidity/hts221_core.c | 91 +++++-----
.../iio/imu/inv_icm42600/inv_icm42600_accel.c | 21 +--
.../iio/imu/inv_icm42600/inv_icm42600_gyro.c | 21 +--
.../iio/imu/inv_icm42600/inv_icm42600_temp.c | 7 +-
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 14 +-
drivers/iio/imu/smi240.c | 7 +-
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 16 +-
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c | 73 ++++----
drivers/iio/industrialio-core.c | 28 +--
drivers/iio/magnetometer/mag3110.c | 161 +++++++++---------
drivers/iio/magnetometer/rm3100-core.c | 7 +-
drivers/iio/pressure/dlhl60d.c | 7 +-
drivers/iio/pressure/icp10100.c | 15 +-
drivers/iio/pressure/mpl3115.c | 97 ++++++-----
drivers/iio/pressure/ms5611_core.c | 8 +-
drivers/iio/pressure/rohm-bm1390.c | 7 +-
drivers/iio/pressure/zpa2326.c | 15 +-
drivers/iio/proximity/hx9023s.c | 7 +-
.../iio/proximity/pulsedlight-lidar-lite-v2.c | 4 +-
drivers/iio/proximity/sx9500.c | 7 +-
drivers/iio/temperature/maxim_thermocouple.c | 30 ++--
.../staging/iio/impedance-analyzer/ad5933.c | 38 +++--
include/linux/iio/iio.h | 10 +-
33 files changed, 428 insertions(+), 477 deletions(-)
On 3/31/25 7:12 AM, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>> > Firstly, sorry for the huge patch set!>
Reviewed-by: David Lechner <dlechner@baylibre.com>
From: Jonathan Cameron <Jonathan.Cameron@huawei.com> Firstly, sorry for the huge patch set! I've run out of signficiant groups to break the remaining patches up into. Rather than have lots of small series of 5-10 patches, lets just have one mega one. Feel free to review a subset! I'll nibble away at this as reviews come in and post a v2 later in the cycle with whatever remains unreviewed if that is necessary. Note that a number of the drivers touched in this series have no obvious active maintainer, so it would be much appreciated if anyone has time to take a look! This is effectively part 5 of what will probably be around 5 series focused on moving from iio_device_claim/release_direct_mode() to iio_device_claim/release_direct(). The new form is more consistent with conditional locking semantics and sparse markings have been added that let us detect miss-balance between claim and release. More details can be found in the cover letter of the first series: https://lore.kernel.org/all/20250209180624.701140-1-jic23@kernel.org/ This series focuses on all the remaining drivers. The final patch removes the old infrastructure. Jonathan Cameron (37): iio: addac: ad74115: Switch to sparse friendly iio_device_claim/release_direct() iio: chemical: ccs811: Factor out handling of read of IIO_INFO_RAW to simplify error paths. iio: chemical: ccs811: Switch to sparse friendly iio_device_claim/release_direct() iio: chemical: atlas-sensor: Switch to sparse friendly iio_device_claim/release_direct() iio: chemical: scd4x: Switch to sparse friendly iio_device_claim/release_direct() iio: common: scmi: Switch to sparse friendly iio_device_claim/release_direct() iio: common: st_sensors: Switch to sparse friendly iio_device_claim/release_direct() iio: gyro: adxrs290: Switch to sparse friendly iio_device_claim/release_direct() iio: health: max30102: Switch to sparse friendly iio_device_claim/release_direct() iio: humidity: hdc100x: Use guard(mutex) to simplify code flow iio: humidity: hdc100x: Switch to sparse friendly iio_device_claim/release_direct() iio: humidity: hdc2010: Switch to sparse friendly iio_device_claim/release_direct() iio: humidity: hts211: Factor out everything under direct mode claim into helper functions. iio: humidity: hts211: Switch to sparse friendly iio_device_claim/release_direct() iio: imu: inv_icm42600: Switch to sparse friendly iio_device_claim/release_direct() iio: imu: inv_mpu6050: Switch to sparse friendly iio_device_claim/release_direct() iio: imu: smi240: Switch to sparse friendly iio_device_claim/release_direct() iio: imu: st_lsm6dsx: Factor out parts of st_lsm6dsx_shub_write_raw() to allow direct returns iio: imu: st_lsm6dsx: Switch to sparse friendly claim/release_direct() iio: imu: st_lsm6dsx: Switch to sparse friendly iio_device_claim/release_direct() iio: magnetometer: mag3110: Factor out core of read/write_raw() and use guard() to simplify code flow. iio: magnetometer: mag3110: Switch to sparse friendly iio_device_claim/release_direct() iio: magnetometer: rm3100: Switch to sparse friendly iio_device_claim/release_direct() iio: pressure: dlhl60d: Switch to sparse friendly iio_device_claim/release_direct() iio: pressure: icp10100: Switch to sparse friendly iio_device_claim/release_direct() iio: pressure: mpl3115: factor out core of IIO_INFO_RAW read to simplify code flow iio: pressure: mpl3115: Switch to sparse friendly iio_device_claim/release_direct() iio: pressure: ms5611: Switch to sparse friendly iio_device_claim/release_direct() iio: pressure: rohm-bm1390: Switch to sparse friendly iio_device_claim/release_direct() iio: pressure: zpa2326: Switch to sparse friendly iio_device_claim/release_direct() iio: proximity: hx9023s: Switch to sparse friendly iio_device_claim/release_direct() iio: proximity: pulsed-light: Switch to sparse friendly iio_device_claim/release_direct() iio: proximity: sx9500: Switch to sparse friendly iio_device_claim/release_direct() iio: temp: maxim_thermocouple: Switch to sparse friendly iio_device_claim/release_direct() iio: temp: maxim_thermocouple: Drop unused mutex.h include. staging: iio: ad5933: Switch to sparse friendly iio_device_claim/release_direct() iio: Adjust internals of handling of direct mode claiming to suit new API. drivers/iio/addac/ad74115.c | 7 +- drivers/iio/chemical/atlas-sensor.c | 7 +- drivers/iio/chemical/ccs811.c | 79 ++++----- drivers/iio/chemical/scd4x.c | 7 +- drivers/iio/common/scmi_sensors/scmi_iio.c | 7 +- .../iio/common/st_sensors/st_sensors_core.c | 7 +- drivers/iio/gyro/adxrs290.c | 14 +- drivers/iio/health/max30102.c | 4 +- drivers/iio/humidity/hdc100x.c | 68 +++----- drivers/iio/humidity/hdc2010.c | 14 +- drivers/iio/humidity/hts221_core.c | 91 +++++----- .../iio/imu/inv_icm42600/inv_icm42600_accel.c | 21 +-- .../iio/imu/inv_icm42600/inv_icm42600_gyro.c | 21 +-- .../iio/imu/inv_icm42600/inv_icm42600_temp.c | 7 +- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 14 +- drivers/iio/imu/smi240.c | 7 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 16 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c | 73 ++++---- drivers/iio/industrialio-core.c | 28 +-- drivers/iio/magnetometer/mag3110.c | 161 +++++++++--------- drivers/iio/magnetometer/rm3100-core.c | 7 +- drivers/iio/pressure/dlhl60d.c | 7 +- drivers/iio/pressure/icp10100.c | 15 +- drivers/iio/pressure/mpl3115.c | 97 ++++++----- drivers/iio/pressure/ms5611_core.c | 8 +- drivers/iio/pressure/rohm-bm1390.c | 7 +- drivers/iio/pressure/zpa2326.c | 15 +- drivers/iio/proximity/hx9023s.c | 7 +- .../iio/proximity/pulsedlight-lidar-lite-v2.c | 4 +- drivers/iio/proximity/sx9500.c | 7 +- drivers/iio/temperature/maxim_thermocouple.c | 30 ++-- .../staging/iio/impedance-analyzer/ad5933.c | 38 +++-- include/linux/iio/iio.h | 10 +- 33 files changed, 428 insertions(+), 477 deletions(-)