Skip to content

Add WoM feature as an IIO event

[email protected] linux-iio 3 versions – Applied

Status from this message: Applied to the togreg-normal branch of iio.git and pushed out for 0-day

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 11 repliesApplied
  2. v24 patches 5 repliesSuperseded
  3. v14 patches 8 repliesSuperseded

v2 from the cover letter

- Rework to use accel x|y|z roc for reporting WoM event
- Use only datasheet advertised bits for MPU-6500 family chips

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4iio: imu: inv_mpu6050: add WoM (Wake-on-Motion) sensordrivers/iio/imu/inv_mpu6050/inv_mpu_core.c drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c +1 more+309 -130 replies
2/4iio: imu: inv_mpu6050: add WoM event as accel eventdrivers/iio/imu/inv_mpu6050/inv_mpu_core.c+59 -80 replies
3/4iio: imu: inv_mpu6050: add new interrupt handler for WoM eventsdrivers/iio/imu/inv_mpu6050/inv_mpu_iio.h drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c+66 -1610 replies
4/4iio: imu: inv_mpu6050: add WoM suspend wakeup with low-power modedrivers/iio/imu/inv_mpu6050/inv_mpu_core.c drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h+166 -510 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/4] Add WoM feature as an IIO event

From: Jean-Baptiste Maneyrol <[email protected]>

Add WoM (Wake-on-Motion) feature for all chips supporting it (all except MPU-6000/6050/9150). WoM compares the magnitude of the current accel sample with the previous one against a threshold and returns an interrupt event if the value is higher.

WoM is checking against all axes and maps best to ROC since it compares the last 2 samples. Thus report WoM as an accel x|y|z roc_rising IIO event, add system wakeup functionality if WoM is on and put the chip in low-power mode when the system is suspended. Corresponding ROC value is in SI units since the chip is using an absolute value in mg.

v2:
- Rework to use accel x|y|z roc for reporting WoM event
- Use only datasheet advertised bits for MPU-6500 family chips

v3
- Coding style fixes
- Convert mutex usage to guard/scoped_guard

Jean-Baptiste Maneyrol (4):
iio: imu: inv_mpu6050: add WoM (Wake-on-Motion) sensor
iio: imu: inv_mpu6050: add WoM event as accel event
iio: imu: inv_mpu6050: add new interrupt handler for WoM events
iio: imu: inv_mpu6050: add WoM suspend wakeup with low-power mode

 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    | 542 ++++++++++++++++--
 drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h     |  36 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c    |  17 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |  83 ++-
 4 files changed, 595 insertions(+), 83 deletions(-)
Signature · 1 line
2.34.1