Commit b0fc6783 authored by Stefan Popa's avatar Stefan Popa Committed by Jonathan Cameron

iio: accel: adxl372: Add support for FIFO peak mode

By default, if all three channels (x, y, z) are enabled, sample sets of
concurrent 3-axis data is stored in the FIFO. This patch adds the option
to configure the FIFO to store peak acceleration (x, y and z) of every
over-threshold event. When pushing to iio buffer we push only enabled
axis data.

Currently the driver configures adxl372 to work in loop mode.
The inactivity and activity timings  decide how fast the chip
will loop through the awake and waiting states and the
thresholds on x,y,z axis decide when activity or inactivity
will be detected.

This patch adds standard events sysfs entries for the inactivity
and activity timings: thresh_falling_period/thresh_rising_period
and for the in_accel_x_thresh_falling/rising_value.
Signed-off-by: default avatarStefan Popa <stefan.popa@analog.com>
Signed-off-by: default avatarAlexandru Tachici <alexandru.tachici@analog.com>
Link: https://lore.kernel.org/r/20200810093257.65929-2-alexandru.tachici@analog.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 50677d28
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment