Linux-IIO Archive mirror
 help / color / mirror / Atom feed
From: inv.git-commit@tdk.com
To: jic23@kernel.org
Cc: lars@metafoo.de, linux-iio@vger.kernel.org,
	Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Subject: [PATCH v3 0/4] Add WoM feature as an IIO event
Date: Mon, 11 Mar 2024 16:05:53 +0000	[thread overview]
Message-ID: <20240311160557.437337-1-inv.git-commit@tdk.com> (raw)

From: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>

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(-)

-- 
2.34.1


             reply	other threads:[~2024-03-11 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 16:05 inv.git-commit [this message]
2024-03-11 16:05 ` [PATCH v3 1/4] iio: imu: inv_mpu6050: add WoM (Wake-on-Motion) sensor inv.git-commit
2024-03-11 16:05 ` [PATCH v3 2/4] iio: imu: inv_mpu6050: add WoM event as accel event inv.git-commit
2024-03-11 16:05 ` [PATCH v3 3/4] iio: imu: inv_mpu6050: add new interrupt handler for WoM events inv.git-commit
2024-03-11 16:05 ` [PATCH v3 4/4] iio: imu: inv_mpu6050: add WoM suspend wakeup with low-power mode inv.git-commit
2024-03-16 13:54 ` [PATCH v3 0/4] Add WoM feature as an IIO event Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240311160557.437337-1-inv.git-commit@tdk.com \
    --to=inv.git-commit@tdk.com \
    --cc=jean-baptiste.maneyrol@tdk.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).