From: Jonathan Cameron <jic23@kernel.org>
To: Gwendal Grignou <gwendal@google.com>
Cc: Gwendal Grignou <gwendal@chromium.org>,
tzungbi@kernel.org, chrome-platform@lists.linux.dev,
linux-iio@vger.kernel.org
Subject: Re: [PATCH v4] iio: cros_ec_sensors: add cros_ec_activity driver
Date: Sat, 7 Jun 2025 17:13:01 +0100 [thread overview]
Message-ID: <20250607171301.537dd168@jic23-huawei> (raw)
In-Reply-To: <CAMHSBOUb-HPqmW3CFspipNGQGzbYUV+oqVw-Cbw0Bk4Huwz-QQ@mail.gmail.com>
> > > + for_each_set_bit(i, &activities, BITS_PER_LONG) {
> > > + /* List all available triggers */
> > > + if (i == MOTIONSENSE_ACTIVITY_BODY_DETECTION) {
> > > + channel->type = IIO_PROXIMITY;
> > > + channel->info_mask_separate = BIT(IIO_CHAN_INFO_RAW);
> > > + channel->modified = 0;
> >
> > Not modified is the 'obvious' default so can probably drop that one.
> >
> > > + channel->event_spec = cros_ec_body_detect_events;
> > > + channel->num_event_specs =
> > > + ARRAY_SIZE(cros_ec_body_detect_events);
> > > + st->body_detection_channel_index = index;
> > > + } else {
> > > + channel->type = IIO_ACTIVITY;
> >
> > This is getting a little creative. Do we know anything about what the
> > underlying detection actually is? Activity sensor are often some form
> > of magnitude sensor on a specific type of data. I guess if we have no
> > idea what this then activity detection makes some sense.
> As written earlier, the event is triggered when a threshold is
> crossed. So contrary to other activity sensors like walking or
> swimming, there is no confidence level, it just happened that we are
> not still anymore.
The confidence level is a bit of a fiction for all sensors. I just wanted
the ABI to allow for algorithms getting more clever over time. Right now
they all claim to be 0 or 100.
Anyhow, I don't think that matters anyway.
next prev parent reply other threads:[~2025-06-07 16:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 17:27 [PATCH v4] iio: cros_ec_sensors: add cros_ec_activity driver Gwendal Grignou
2025-05-25 13:42 ` Jonathan Cameron
2025-06-04 5:41 ` Gwendal Grignou
2025-06-05 3:13 ` Tzung-Bi Shih
2025-06-07 16:13 ` Jonathan Cameron [this message]
2025-05-25 13:43 ` 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=20250607171301.537dd168@jic23-huawei \
--to=jic23@kernel.org \
--cc=chrome-platform@lists.linux.dev \
--cc=gwendal@chromium.org \
--cc=gwendal@google.com \
--cc=linux-iio@vger.kernel.org \
--cc=tzungbi@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