Skip to content

iio: Clean up acpi_match_device() use cases

Andy Shevchenko linux-iio lkml 3 versions – Applied

Status from this message: Applied

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest24 patches 33 repliesApplied
  2. v213 patches 2 repliesSuperseded
  3. v113 patches 4 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/24iio: magnetometer: bmc150: Drop dead code from the driverdrivers/iio/magnetometer/bmc150_magn.c+0 -151 reply
2/24iio: adc: pac1934: Replace strange way of checking type of enumerationdrivers/iio/adc/pac1934.c+1 -11 reply
3/24iio: imu: inv_mpu6050: Replace strange way of checking type of enumerationdrivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c+1 -41 reply
4/24iio: acpi: Improve iio_read_acpi_mount_matrix()drivers/iio/industrialio-acpi.c+7 -31 reply
5/24iio: acpi: Add iio_get_acpi_device_name_and_data() helper functiondrivers/iio/industrialio-acpi.c include/linux/iio/iio.h+47 -11 reply
6/24iio: accel: kxcjk-1013: Remove redundant I²C IDdrivers/iio/accel/kxcjk-1013.c+0 -11 reply
7/24iio: accel: kxcjk-1013: Revert "Add support for KX022-1020"drivers/iio/accel/kxcjk-1013.c+2 -64 replies
8/24iio: accel: kxcjk-1013: Switch from CONFIG_PM guards to pm_ptr() etcdrivers/iio/accel/kxcjk-1013.c+4 -111 reply
9/24iio: accel: kxcjk-1013: Use local variable for regsdrivers/iio/accel/kxcjk-1013.c+37 -281 reply
10/24iio: accel: kxcjk-1013: Rename kxcjk1013_infodrivers/iio/accel/kxcjk-1013.c+2 -21 reply
11/24iio: accel: kxcjk-1013: Start using chip_info variables instead of enumdrivers/iio/accel/kxcjk-1013.c+99 -722 replies
12/24iio: accel: kxcjk-1013: Move odr_start_up_times up in the codedrivers/iio/accel/kxcjk-1013.c+77 -772 replies
13/24iio: accel: kxcjk-1013: Convert ODR times array to variable in chip_infodrivers/iio/accel/kxcjk-1013.c+89 -771 reply
14/24iio: accel: kxcjk-1013: Get rid of enum kx_chipsetdrivers/iio/accel/kxcjk-1013.c+5 -232 replies
15/24iio: accel: kxcjk-1013: Replace a variant of iio_get_acpi_device_name_and_data()drivers/iio/accel/kxcjk-1013.c+11 -271 reply
16/24iio: accel: kxcjk-1013: drop ACPI_PTR() and move ID out of CONFIG_ACPI guardsdrivers/iio/accel/kxcjk-1013.c+21 -201 reply
17/24iio: accel: mma9551: Replace custom implementation of iio_get_acpi_device_name()drivers/iio/accel/mma9551.c+4 -151 reply
18/24iio: accel: mma9553: Replace custom implementation of iio_get_acpi_device_name()drivers/iio/accel/mma9553.c+4 -151 reply
19/24iio: gyro: bmg160: Replace custom implementation of iio_get_acpi_device_name()drivers/iio/gyro/bmg160_core.c drivers/iio/gyro/bmg160_i2c.c+3 -161 reply
20/24iio: light: isl29018: Replace a variant of iio_get_acpi_device_name_and_data()drivers/iio/light/isl29018.c+6 -191 reply
21/24iio: light: isl29018: drop ACPI_PTR() and CONFIG_ACPI guardsdrivers/iio/light/isl29018.c+6 -71 reply
22/24iio: light: ltr501: Drop most likely fake ACPI IDsdrivers/iio/light/ltr501.c+0 -21 reply
23/24iio: light: ltr501: Add LTER0303 to the supported devicesdrivers/iio/light/ltr501.c+2 -02 replies
24/24iio: light: ltr501: Replace a variant of iio_get_acpi_device_name_and_data()drivers/iio/light/ltr501.c+8 -171 reply

Reviews trailers per patch

13 of 24 patches have a Reviewed-by or Acked-by.

PatchHans de GoedeMarius CristeaJean-Baptiste Maneyrol
1/24R-b
2/24R-b R-b
3/24R-b A-b
4/24R-b
5/24R-b
6/24
7/24
8/24
9/24
10/24
11/24
12/24
13/24
14/24
15/24
16/24
17/24R-b
18/24R-b
19/24R-b
20/24R-b
21/24R-b
22/24R-b
23/24R-b
24/24R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/24] iio: Clean up acpi_match_device() use cases

There are current uses of acpi_match_device():
- as strange way of checking if the device was enumerated via ACPI
- as a way to get IIO device name as ACPI device instance name
- as above with accompanying driver data

Deduplicate its use by providing two new helper functions in IIO ACPI library and update the rest accordingly.

This also includes a rework of previously sent ltr501 patch.

Besides that there ie a big clean up for the kxcjk-1013 driver, started with the revert of the one patch discussed earlier today. Feel free to route that one via fixes branch of your tree.

In v3:
- collected tags (Marius)
- added note to the documentation about usage of new API (Jonathan)
- added a handful patches for kxcjk-1013 driver

In v2:
- collected tags (Hans, Jean-Baptiste)
- updated SoB chain in patch 4

Andy Shevchenko (24):
iio: magnetometer: bmc150: Drop dead code from the driver
iio: adc: pac1934: Replace strange way of checking type of enumeration
iio: imu: inv_mpu6050: Replace strange way of checking type of
enumeration
iio: acpi: Improve iio_read_acpi_mount_matrix()
iio: acpi: Add iio_get_acpi_device_name_and_data() helper function
iio: accel: kxcjk-1013: Remove redundant I²C ID
iio: accel: kxcjk-1013: Revert "Add support for KX022-1020"
iio: accel: kxcjk-1013: Switch from CONFIG_PM guards to pm_ptr() etc
iio: accel: kxcjk-1013: Use local variable for regs
iio: accel: kxcjk-1013: Rename kxcjk1013_info
iio: accel: kxcjk-1013: Start using chip_info variables instead of
enum
iio: accel: kxcjk-1013: Move odr_start_up_times up in the code
iio: accel: kxcjk-1013: Convert ODR times array to variable in
chip_info
iio: accel: kxcjk-1013: Get rid of enum kx_chipset
iio: accel: kxcjk-1013: Replace a variant of
iio_get_acpi_device_name_and_data()
iio: accel: kxcjk-1013: drop ACPI_PTR() and move ID out of CONFIG_ACPI
guards
iio: accel: mma9551: Replace custom implementation of
iio_get_acpi_device_name()
iio: accel: mma9553: Replace custom implementation of
iio_get_acpi_device_name()
iio: gyro: bmg160: Replace custom implementation of
iio_get_acpi_device_name()
iio: light: isl29018: Replace a variant of
iio_get_acpi_device_name_and_data()
iio: light: isl29018: drop ACPI_PTR() and CONFIG_ACPI guards
iio: light: ltr501: Drop most likely fake ACPI IDs
iio: light: ltr501: Add LTER0303 to the supported devices
iio: light: ltr501: Replace a variant of
iio_get_acpi_device_name_and_data()

 drivers/iio/accel/kxcjk-1013.c             | 449 +++++++++++----------
 drivers/iio/accel/mma9551.c                |  19 +-
 drivers/iio/accel/mma9553.c                |  19 +-
 drivers/iio/adc/pac1934.c                  |   2 +-
 drivers/iio/gyro/bmg160_core.c             |  15 -
 drivers/iio/gyro/bmg160_i2c.c              |   4 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c |   5 +-
 drivers/iio/industrialio-acpi.c            |  48 ++-
 drivers/iio/light/isl29018.c               |  38 +-
 drivers/iio/light/ltr501.c                 |  29 +-
 drivers/iio/magnetometer/bmc150_magn.c     |  15 -
 include/linux/iio/iio.h                    |  10 +
 12 files changed, 315 insertions(+), 338 deletions(-)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac