lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 11 Nov 2015 20:08:11 +0100
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Martin Kepplinger <martink@...teo.de>, jic23@...nel.org,
	knaack.h@....de, pmeerw@...erw.net,
	christoph.muellner@...obroma-systems.com, mfuzzey@...keon.com
CC:	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
	Martin Kepplinger <martin.kepplinger@...obroma-systems.com>
Subject: Re: [PATCH 1/3] iio: mma8452: add freefall detection for Freescale's
 accelerometers

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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ