linux/drivers/iio/accel
Linus Walleij 0427a106a9 iio: accel: kxsd9: Add triggered buffer handling
As is custom with all modern sensors, add a clever burst mode
that will just stream out values from the sensor and provide it
to userspace to do the proper offsetting and scaling.

This is the result when tested with an HRTimer trigger:

$ generic_buffer -a -c 10 -n kxsd9 -t foo
/sys/bus/iio/devices/iio:device1 foo
0.371318 0.718680 9.869872 1795.000000 97545896129
-0.586922 0.179670 9.378775 2398.000000 97555864721
-0.299450 0.179670 10.348992 2672.000000 97565874055
0.371318 0.335384 11.103606 2816.000000 97575883240
0.179670 0.574944 10.540640 2847.000000 97585862351
0.335384 0.754614 9.953718 2840.000000 97595872425
0.179670 0.754614 10.732288 2879.000000 97605882351
0.000000 0.754614 10.348992 2872.000000 97615891832
-0.730658 0.574944 9.570422 2831.000000 97625871536
0.000000 1.137910 10.732288 2872.000000 97635881610

Columns shown are x, y, z acceleration, so a positive acceleration
of ~9.81 (shaky due to bad calibration) along the z axis. The
fourth column is the AUX IN which is floating on this system,
it seems to float up to the 2.85V VDD voltage.

To be able to cleanup the triggered buffer, we need to add .remove()
callbacks to the I2C and SPI subdrivers and call back into an
exported .remove() callback in the core.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-18 11:32:15 +01:00
..
bma180.c iio: accel: bma180: use iio helper function to guarantee direct mode 2016-08-15 17:12:43 +01:00
bma220_spi.c iio: accel: bma220_spi: set up buffer timestamps for non-zero values 2016-08-15 15:39:18 +01:00
bmc150-accel-core.c iio: accel: bmc150: reset chip at init time 2016-09-03 17:26:14 +01:00
bmc150-accel-i2c.c iio: accel: bmc150: use common definition for regmap conf 2016-04-03 11:24:52 +01:00
bmc150-accel-spi.c iio: accel: bmc150: use common definition for regmap conf 2016-04-03 11:24:52 +01:00
bmc150-accel.h iio: accel: bmc150: use common definition for regmap conf 2016-04-03 11:24:52 +01:00
dmard06.c iio: accel: Add support for Domintech DMARD06 accelerometer 2016-08-21 10:52:02 +01:00
dmard09.c iio: accel: add support for the Domintech DMARD09 3-axis accelerometer 2016-08-21 10:52:08 +01:00
hid-sensor-accel-3d.c iio: accel: hid-sensor-accel-3d: Fix memory leak in probe() 2015-05-17 09:09:05 +01:00
Kconfig iio: accel: kxsd9: Add triggered buffer handling 2016-09-18 11:32:15 +01:00
kxcjk-1013.c iio: accel: kxcjk-1013: add the "KIOX000A" ACPI id 2016-07-24 19:58:40 +01:00
kxsd9-i2c.c iio: accel: kxsd9: Add I2C transport 2016-09-18 11:29:12 +01:00
kxsd9-spi.c iio: accel: kxsd9: Convert to use regmap for transport 2016-09-18 11:28:21 +01:00
kxsd9.c iio: accel: kxsd9: Add triggered buffer handling 2016-09-18 11:32:15 +01:00
kxsd9.h iio: accel: kxsd9: Convert to use regmap for transport 2016-09-18 11:28:21 +01:00
Makefile iio: accel: kxsd9: Add I2C transport 2016-09-18 11:29:12 +01:00
mma7455_core.c iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
mma7455_i2c.c iio: accel: add Freescale MMA7455L/MMA7456L 3-axis accelerometer driver 2015-11-01 18:00:35 +00:00
mma7455_spi.c iio: accel: add Freescale MMA7455L/MMA7456L 3-axis accelerometer driver 2015-11-01 18:00:35 +00:00
mma7455.h iio: accel: add Freescale MMA7455L/MMA7456L 3-axis accelerometer driver 2015-11-01 18:00:35 +00:00
mma7660.c iio: accel: Add support for Freescale MMA7660FC 2016-05-04 10:44:17 +01:00
mma8452.c drivers:iio:accel:mma8452: removed unwanted return statements 2016-07-05 21:05:01 +01:00
mma9551_core.c iio: accel: mma9553: fix alignment issues 2015-06-14 16:00:54 +01:00
mma9551_core.h iio: accel: mma9553: fix alignment issues 2015-06-14 16:00:54 +01:00
mma9551.c iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
mma9553.c iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
mxc4005.c iio: remove gpio interrupt probing from drivers that use a single interrupt 2016-04-03 10:27:48 +01:00
mxc6255.c iio: accel: mxc6255: Fix chip-id check 2016-09-12 20:19:16 +01:00
ssp_accel_sensor.c iio: common: ssp_sensors: Add sensorhub accelerometer sensor 2015-01-29 18:49:56 +00:00
st_accel_buffer.c iio: st_sensors: switch to a threaded interrupt 2016-05-29 20:21:41 +01:00
st_accel_core.c iio: accel: st_accel: Add lis3l02dq support 2016-07-04 18:07:44 +01:00
st_accel_i2c.c iio: accel: st_accel: Add lis3l02dq support 2016-07-04 18:07:44 +01:00
st_accel_spi.c iio: accel: st_accel: Add lis3l02dq support 2016-07-04 18:07:44 +01:00
st_accel.h iio: accel: st_accel: Add lis3l02dq support 2016-07-04 18:07:44 +01:00
stk8ba50.c iio: remove unused gpio consumer.h include 2016-04-03 10:27:47 +01:00
stk8312.c iio: remove unused gpio consumer.h include 2016-04-03 10:27:47 +01:00