[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aFkoSBXuPOoQj3JI@smile.fi.intel.com>
Date: Mon, 23 Jun 2025 13:11:20 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Lothar Rubusch <l.rubusch@...il.com>
Cc: lars@...afoo.de, Michael.Hennerich@...log.com, jic23@...nel.org,
dlechner@...libre.com, nuno.sa@...log.com, andy@...nel.org,
corbet@....net, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
eraretuya@...il.com
Subject: Re: [PATCH v10 5/7] iio: accel: adxl345: add coupling detection for
activity/inactivity
On Sun, Jun 22, 2025 at 03:50:08PM +0000, Lothar Rubusch wrote:
> Enable AC/DC coupling configuration for activity and inactivity detection
> by setting the AC/DC bit. Extend existing magnitude-based detection with
> adaptive AC-coupled mode.
>
> Use DC-coupled mode to compare acceleration samples directly against
> configured thresholds. Use AC-coupled mode to compare samples against a
> reference taken at the start of activity detection. Implement DC-coupled
> events using MAG, and AC-coupled events using MAG_ADAPTIVE.
>
> Expose configuration of thresholds and periods via separate sysfs handles.
> Note that both coupling modes share the same sensor registers, so activity
> or inactivity detection cannot be configured for both AC and DC
> simultaneously. Apply the most recently configured mode.
>
> Simplify event handling and support adaptive AC-coupling.
...
> static int adxl345_set_act_inact_linkbit(struct adxl345_state *st,
> enum adxl345_activity_type type,
> bool en)
> {
> - int act_en, inact_en;
> + int act_en, act_ac_en, inact_en, inact_ac_en;
Just make it two,
int act_ac_en, inact_ac_en;
int act_en, inact_en;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists