mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 10:01:41 +00:00
0427a106a9
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> |
||
---|---|---|
.. | ||
bma180.c | ||
bma220_spi.c | ||
bmc150-accel-core.c | ||
bmc150-accel-i2c.c | ||
bmc150-accel-spi.c | ||
bmc150-accel.h | ||
dmard06.c | ||
dmard09.c | ||
hid-sensor-accel-3d.c | ||
Kconfig | ||
kxcjk-1013.c | ||
kxsd9-i2c.c | ||
kxsd9-spi.c | ||
kxsd9.c | ||
kxsd9.h | ||
Makefile | ||
mma7455_core.c | ||
mma7455_i2c.c | ||
mma7455_spi.c | ||
mma7455.h | ||
mma7660.c | ||
mma8452.c | ||
mma9551_core.c | ||
mma9551_core.h | ||
mma9551.c | ||
mma9553.c | ||
mxc4005.c | ||
mxc6255.c | ||
ssp_accel_sensor.c | ||
st_accel_buffer.c | ||
st_accel_core.c | ||
st_accel_i2c.c | ||
st_accel_spi.c | ||
st_accel.h | ||
stk8ba50.c | ||
stk8312.c |