lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFXKEHa4gU-WAgCGWFvy0Tgei+VEPJ9BBL37dkjqr8YZzjOCSA@mail.gmail.com>
Date: Tue, 17 Jun 2025 09:28:12 +0200
From: Lothar Rubusch <l.rubusch@...il.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Gustavo Silva <gustavograzs@...il.com>, Alex Lanzano <lanzano.alex@...il.com>, 
	David Lechner <dlechner@...libre.com>, Nuno Sá <nuno.sa@...log.com>, 
	Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] iio: imu: bmi270: add support for motion events

Hi Gustavo,

On Sat, Jun 7, 2025 at 6:02 PM Jonathan Cameron <jic23@...nel.org> wrote:
>
> On Thu, 05 Jun 2025 19:05:03 -0300
> Gustavo Silva <gustavograzs@...il.com> wrote:
>
> > Any-motion event can be enabled on a per-axis basis and triggers a
> > combined event when motion is detected on any axis.
> >
> > No-motion event is triggered if the rate of change on all axes falls
> > below a specified threshold for a configurable duration. A fake channel
> > is used to report this event.
> >
> > Threshold and duration can be configured from userspace.
> >
> > Signed-off-by: Gustavo Silva <gustavograzs@...il.com>
> Hi Gustavo,
>
> A few minor comments inline.  +CC Lothar given they have been doing a lot of
> work with similar events recently and might have time to take a look at this
> and see if I'm missing anything wrt to consistency with our recent discussions.
>

First of all, I feel honoured to be mentioned here, but I probably
cannot help a lot. Recently I ended up with some Analog Device
accelerometers on my table. Pure accelerometers, no IMUs as you have -
so already much simpler. Perhaps, as an example:

Among other events, I was fiddling around activity / inactivity
detection, like AC-coupling i.e. going by a provided threshold, or
DC-coupling i.e. going by the threshold plus some internal heuristics,
and further setting or unsetting a link-bit (related to auto-sleep, so
power save modes), so that activity / inactivity triggers are linked,
the sensor then will remain in a dedicated state "act" or "inact"
(until period of time). In such case a trigger then only comes once at
state transition, where before e.g. for activity it fired act events
as long as measurements were above magnitude of threshold.

For the driver implementation then I made mostly all separate IIO
events: AC-coupling (going by a provided threshold) became
IIO_EV_TYPE_MAG. DC-coupling (going by the threshold, plus some
internal heuristics) became IIO_EV_TYPE_MAG_ADAPTIVE. There was/is a
discussion about declaring the linked activity/inactivity actually as
IIO_EV_TYPE_MAG_REFERENCED. We left that as is. Since I was initially
a bit confused about further (exotic) types like IIO_EV_TYPE_ROC or
_CHANGE, probably I'm learning more from your IMU driver now.

I feel it probably won't help a lot, therefore rather the examply how
I used it. I'll keep on following and keep the bmi270 on my notes as
well. If I spot something, I'll let you know.

[I hope it's ok for the ML to give an answer in this way.]

Best,
L

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ