kernel-ark/drivers/iio
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
..
accel iio: accel: kxsd9: Add triggered buffer handling 2016-09-18 11:32:15 +01:00
adc Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
amplifiers
buffer iio: add resource managed triggered buffer init helpers 2016-09-04 15:42:46 +01:00
chemical Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
common Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
dac Merge 4.8-rc5 into staging-next 2016-09-05 08:13:24 +02:00
dummy iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
frequency iio: frequency: ad9523: use unsigned int rather then bare unsigned 2016-04-17 10:31:03 +01:00
gyro iio: bmg160: add callbacks for the filter frequency 2016-07-03 12:39:55 +01:00
health First round of IIO new device support, features and cleanups for the 4.8 cycle. 2016-06-09 09:15:58 -07:00
humidity Merge 4.8-rc5 into staging-next 2016-09-05 08:13:24 +02:00
imu Third set of IIO new device support, features and cleanups for the 4.8 cycle. 2016-07-14 12:05:29 +09:00
light Merge 4.8-rc5 into staging-next 2016-09-05 08:13:24 +02:00
magnetometer iio: magn: ak8974: remove .owner field for driver 2016-08-29 20:12:10 +01:00
orientation
potentiometer iio: potentiometer: Fix typo in Kconfig 2016-07-03 12:40:01 +01:00
pressure Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
proximity Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
temperature iio: temperature: fix non static symbol warnings 2016-08-29 19:49:00 +01:00
trigger iio:trigger: Experimental kthread tight loop trigger (thread only) 2016-06-03 13:18:44 +01:00
iio_core_trigger.h
iio_core.h iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
industrialio-buffer.c iio: ensure ret is initialized to zero before entering do loop 2016-09-05 21:00:14 +01:00
industrialio-configfs.c
industrialio-core.c Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
industrialio-event.c iio: iio_push_event(): Don't crash if the event interface is not registered 2016-09-10 16:40:44 +01:00
industrialio-sw-device.c iio: Add support for creating IIO devices via configfs 2016-05-04 11:43:54 +01:00
industrialio-sw-trigger.c iio: core: fix ptr_ret.cocci warnings 2016-01-20 17:09:18 -08:00
industrialio-trigger.c iio: trigger: helpers to determine own trigger 2016-09-10 16:49:14 +01:00
industrialio-triggered-event.c
inkern.c iio: core: Add devm_ APIs for iio_channel_{get,release}_all 2016-04-19 19:58:15 +01:00
Kconfig iio: Add support for creating IIO devices via configfs 2016-05-04 11:43:54 +01:00
Makefile iio: Add support for creating IIO devices via configfs 2016-05-04 11:43:54 +01:00