From: Lars-Peter Clausen <lars@metafoo.de>
To: Martin Kepplinger <martink@posteo.de>,
jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net,
christoph.muellner@theobroma-systems.com, mfuzzey@parkeon.com
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Martin Kepplinger <martin.kepplinger@theobroma-systems.com>
Subject: Re: [PATCH 1/3] iio: mma8452: add freefall detection for Freescale's accelerometers
Date: Wed, 11 Nov 2015 20:08:11 +0100 [thread overview]
Message-ID: <5643921B.5070707@metafoo.de> (raw)
In-Reply-To: <1447267094-2248-1-git-send-email-martink@posteo.de>
On 11/11/2015 07:38 PM, Martin Kepplinger wrote:
> This adds freefall event detection to the supported devices. It adds the
> in_accel_x&y&z_mag_falling_en iio event attribute, which activates
> freefall mode.
>
Hi,
Thanks for the patch, looks pretty good. Just a few things.
> In freefall mode, the current acceleration values of all activated axis
> are added and if the *sum* falls *under* the threshold specified
Are you sure its not the magnitude of the vector rather than the sum of the
individual components?
> (in_accel_mag_falling_value), the appropriate IIO event code is
> generated.
[...]
> +enum { + axis_x, + axis_y, + axis_z, +};
That should be part of patch two I guess.
[...]
> +static IIO_DEVICE_ATTR_NAMED(accel_xayaz_mag_falling_en, +
> in_accel_x&y&z_mag_falling_en, + S_IRUGO | S_IWUSR, +
> mma8452_get_freefall_mode, + mma8452_set_freefall_mode, + 0);
This should be created by the core based on the event spec, shouldn't it?
next prev parent reply other threads:[~2015-11-11 19:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 18:38 [PATCH 1/3] iio: mma8452: add freefall detection for Freescale's accelerometers Martin Kepplinger
2015-11-11 18:38 ` [PATCH 2/3] iio: mma8452: use enum for numbering the axis Martin Kepplinger
2015-11-11 18:38 ` [PATCH 3/3] iio: mma8452: remove unused register description Martin Kepplinger
2015-11-11 19:08 ` Lars-Peter Clausen [this message]
2015-11-12 15:00 ` [PATCH 1/3] iio: mma8452: add freefall detection for Freescale's accelerometers Martin Kepplinger
2015-11-14 18:03 ` Jonathan Cameron
2015-11-14 18:45 ` Martin Kepplinger
2015-11-14 19:03 ` Jonathan Cameron
2015-11-17 19:24 ` Martin Kepplinger
2015-11-24 5:20 ` Martin Kepplinger
2015-11-24 9:45 ` Lars-Peter Clausen
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=5643921B.5070707@metafoo.de \
--to=lars@metafoo.de \
--cc=christoph.muellner@theobroma-systems.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.kepplinger@theobroma-systems.com \
--cc=martink@posteo.de \
--cc=mfuzzey@parkeon.com \
--cc=pmeerw@pmeerw.net \
/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