mbox series

[0/4] Factorize timestamp module

Message ID 20230531142513.48507-1-inv.git-commit@tdk.com (mailing list archive)
Headers show
Series Factorize timestamp module | expand

Message

inv.git-commit@tdk.com May 31, 2023, 2:25 p.m. UTC
From: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>

The purpose if this series is to make timestamping from
inv_icm42600 driver an independent module and use it for both
inv_icm42600 and inv_mpu6050 drivers.

Create a new inv_sensors_timestamp common module based on
inv_icm42600 driver and use it in the 2 drivers.

WARNING: this patch requires following commit in fixes-togreg
bbaae0c79ebd ("iio: imu: inv_icm42600: fix timestamp reset")

Jean-Baptiste Maneyrol (4):
  iio: imu: inv_icm42600: make timestamp module chip independent
  iio: move inv_icm42600 timestamp module in common
  iio: make invensense timestamp module generic
  iio: imu: inv_mpu6050: use the common inv_sensors timestamp module

 drivers/iio/common/Kconfig                    |   1 +
 drivers/iio/common/Makefile                   |   1 +
 drivers/iio/common/inv_sensors/Kconfig        |   7 ++
 drivers/iio/common/inv_sensors/Makefile       |   6 +
 .../inv_sensors/inv_sensors_timestamp.c}      | 105 +++++++++---------
 drivers/iio/imu/inv_icm42600/Kconfig          |   1 +
 drivers/iio/imu/inv_icm42600/Makefile         |   1 -
 .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  32 ++++--
 .../imu/inv_icm42600/inv_icm42600_buffer.c    |  30 ++---
 .../iio/imu/inv_icm42600/inv_icm42600_core.c  |  13 ++-
 .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  32 ++++--
 .../imu/inv_icm42600/inv_icm42600_timestamp.h |  85 --------------
 drivers/iio/imu/inv_mpu6050/Kconfig           |   1 +
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  26 ++++-
 drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h     |   9 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c    |  83 ++------------
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   3 +-
 .../linux/iio/common/inv_sensors_timestamp.h  |  89 +++++++++++++++
 18 files changed, 255 insertions(+), 270 deletions(-)
 create mode 100644 drivers/iio/common/inv_sensors/Kconfig
 create mode 100644 drivers/iio/common/inv_sensors/Makefile
 rename drivers/iio/{imu/inv_icm42600/inv_icm42600_timestamp.c => common/inv_sensors/inv_sensors_timestamp.c} (55%)
 delete mode 100644 drivers/iio/imu/inv_icm42600/inv_icm42600_timestamp.h
 create mode 100644 include/linux/iio/common/inv_sensors_timestamp.h

Comments

Andy Shevchenko June 3, 2023, 11:24 a.m. UTC | #1
Wed, May 31, 2023 at 02:25:09PM +0000, inv.git-commit@tdk.com kirjoitti:
> From: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
> 
> The purpose if this series is to make timestamping from
> inv_icm42600 driver an independent module and use it for both
> inv_icm42600 and inv_mpu6050 drivers.
> 
> Create a new inv_sensors_timestamp common module based on
> inv_icm42600 driver and use it in the 2 drivers.
> 
> WARNING: this patch requires following commit in fixes-togreg
> bbaae0c79ebd ("iio: imu: inv_icm42600: fix timestamp reset")

This is so nicely prepared series, but I have a few style nit-picks
(individually commented) and one to address, i.e. kernel.h inclusion.

With that addressed,
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Thank you!