[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251018182226.28335afb@jic23-huawei>
Date: Sat, 18 Oct 2025 18:22:26 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Petre Rodan <petre.rodan@...dimension.ro>
Cc: 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 4/6] iio: accel: bma220: add low-g event detection
> @@ -790,6 +884,13 @@ static irqreturn_t bma220_irq_handler(int irq, void *private)
> return IRQ_HANDLED;
> }
>
> + if (FIELD_GET(BMA220_IF_LOW, bma220_reg_if1))
> + iio_push_event(indio_dev,
> + IIO_MOD_EVENT_CODE(IIO_ACCEL, 0,
> + IIO_MOD_X_OR_Y_OR_Z,
I only noticed this when looking at next patch.
Would be unusual to have reporting on 'any' acceleration dropping below
a threshold. Tends to be all drop (which is free fall detection).
I checked the datasheet quickly and looks like this should be
IIO_MOD_X_AND_Y_AND_Z which is what we normally see for an inactivity / freefall
threshold detector.
> + IIO_EV_TYPE_THRESH,
> + IIO_EV_DIR_FALLING),
> + timestamp);
> if (FIELD_GET(BMA220_IF_TT, bma220_reg_if1)) {
>
> if (data->tap_type == BMA220_TAP_TYPE_SINGLE)
>
Powered by blists - more mailing lists