public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Martin Kepplinger <martin.kepplinger@theobroma-systems.com>,
	irina.tirdea@intel.com, daniel.baluta@intel.com
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: iio: what does in_accel_x_thresh_rising_en ?
Date: Wed, 10 Jun 2015 21:49:48 +0100	[thread overview]
Message-ID: <5578A2EC.4030300@kernel.org> (raw)
In-Reply-To: <55770E56.5070701@theobroma-systems.com>

On 09/06/15 17:03, Martin Kepplinger wrote:
> hi
> 
> Is the in_accel_thresh_rising_value (or falling) threshold value signed
> or unsigned?
> 
> In other words: Is a RISING event fired on an absolute growing value in
> the positive range, and a FALLING event on an absolute growing value in
> the negative acceleration range (< 0g)?
> 
> Or is a RISING event fired on a signed rising value, no matter if the
> threshold is positive or negative, and a FALLING event on a decreasing
> signed value, also when the threshold is positive?
> 
> thanks
> 
>                                 martin
> 
Hi Martin,

The two relevant abi elements are:
in_accel_thresh_rising_value and
in_accel_mag_rising_value
Once you know the second one exists then you can probably work out the
meaning of thresh ;)

Thresh is the value, mag(nitude) is the absolute value, so if you get one
that is thresh, then if the channel can go negative, negative values are
definitely possible.  On an accelerometer, you can get either implemented.
mag_rising is typically to allow motion detection, thresh_rising might
be used to detect a change of orientation (put bounds around each axis
at a particular point in time.

There are also roc (rate of change) type event detectors on some accelerometers.

Hope that clear the mud up ;)

Jonathan

  reply	other threads:[~2015-06-10 20:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09 16:03 iio: what does in_accel_x_thresh_rising_en ? Martin Kepplinger
2015-06-10 20:49 ` Jonathan Cameron [this message]
2015-06-11 17:34   ` Martin Kepplinger
2015-06-12  5:56     ` 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=5578A2EC.4030300@kernel.org \
    --to=jic23@kernel.org \
    --cc=daniel.baluta@intel.com \
    --cc=irina.tirdea@intel.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.kepplinger@theobroma-systems.com \
    /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