The adxl345 sensor offers several features. Most of them are based on
using the hardware FIFO and reacting on events coming in on an interrupt
line. Add access to configure and read out the FIFO, handling of interrupts
and configuration and application of the watermark feature on that FIFO.
The series will include the public adxl345.h used also in the
corresponding older input driver. In brief, the data fields seem to be
identical when implementing it for IIO, the file is already in public
include, and to avoid duplication.
The series is meant as base. Implementation of single tap, double tap,
freefall, activity/inactivity on top is relatively straight forward and
will be upcoming, as soon as this patch set is stabilized.
The series reverts the data justification mode of the measurements
(right and left-justified) since it comes in more handy. Further the
series reverts moving out constant defines to the header file and moves
them back into the source file. This is kind of embarassing, and
definitely not on purpose.
When implementing the features, it became clear what was actually used
to be in the header. I hope this is still acceptible, for the learning
curve.
Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
---
Lothar Rubusch (22):
iio: accel: adxl345: fix comment on probe
iio: accel: adxl345: rename variable data to st
iio: accel: adxl345: rename struct adxl34x_state
iio: accel: adxl345: rename to adxl34x_channels
iio: accel: adxl345: measure right-justified
iio: accel: adxl345: add function to switch measuring
iio: accel: adxl345: initialize IRQ number
iio: accel: adxl345: initialize FIFO delay value for SPI
iio: accel: adxl345: unexpose private defines
iio: accel: adxl345: set interrupt line to INT1
iio: accel: adxl345: import adxl345 general data
iio: accel: adxl345: elaborate iio channel definition
iio: accel: adxl345: add trigger handler
iio: accel: adxl345: read FIFO entries
iio: accel: adxl345: reset the FIFO on error
iio: accel: adxl345: register trigger ops
iio: accel: adxl345: push FIFO data to iio
iio: accel: adxl345: start measure at buffer en/disable
iio: accel: adxl345: prepare FIFO watermark handling
iio: accel: adxl345: use FIFO with watermark IRQ
iio: accel: adxl345: sync FIFO reading with sensor
iio: accel: adxl345: add debug printout
drivers/iio/accel/adxl345.h | 34 +-
drivers/iio/accel/adxl345_core.c | 871 +++++++++++++++++++++++++++++--
drivers/iio/accel/adxl345_i2c.c | 2 +-
drivers/iio/accel/adxl345_spi.c | 11 +-
4 files changed, 829 insertions(+), 89 deletions(-)
--
2.39.2