public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Kepplinger <martink@posteo.de>
To: Lars-Peter Clausen <lars@metafoo.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: Thu, 12 Nov 2015 16:00:10 +0100	[thread overview]
Message-ID: <5644A97A.40900@posteo.de> (raw)
In-Reply-To: <5643921B.5070707@metafoo.de>

Am 2015-11-11 um 20:08 schrieb Lars-Peter Clausen:
> 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?

It's the acceleration magnitude, logical AND combination of the values.
Will correct this for v2.

> 
>> (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.

Will do.

> 
> [...]
>> +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?
> 

I'll check if this works when I get to it.

thanks for the review!

                                  martin


  reply	other threads:[~2015-11-12 15:00 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 ` [PATCH 1/3] iio: mma8452: add freefall detection for Freescale's accelerometers Lars-Peter Clausen
2015-11-12 15:00   ` Martin Kepplinger [this message]
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=5644A97A.40900@posteo.de \
    --to=martink@posteo.de \
    --cc=christoph.muellner@theobroma-systems.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.kepplinger@theobroma-systems.com \
    --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