Kionix KX132-1211 is a tri-axis 16-bit accelerometer that can support
ranges from ±2G to ±16G, digital output through I²C/SPI.
Add support for basic accelerometer features such as reading acceleration
via IIO using raw reads, triggered buffer (data-ready), or the WMI IRQ.
Datasheet: https://kionixfs.azureedge.net/en/document/KX132-1211-Technical-Reference-Manual-Rev-5.0.pdf
Acked-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Signed-off-by: Mehdi Djait <mehdi.djait.k@xxxxxxxxx>
---
v7:
- added a min_t in kx132_get_fifo_bytes to ensure that we don't that the
fifo_bytes is never bigger than the
fifo_length * KX022A_FIFO_SAMPLES_SIZE_BYTES - no matter what we read from I2C
as suggested by Matti