linux/drivers/iio/gyro
Alexandru Ardelean 067fda1c06 iio: hid-sensors: move triggered buffer setup into hid_sensor_setup_trigger
The main intent here is to get rid of the iio_buffer_set_attrs() helper, or
at least rework it's usage a bit.
The problem with that helper is that it needs a pointer to the buffer,
which makes supporting multiple buffers per IIO device a bit more
cumbersome.

The hid_sensor_setup_trigger() is pretty much used in the same way:
- iio_triggered_buffer_setup() gets called before
- then hid_sensor_setup_trigger() and hid_sensor_setup_batch_mode() gets
  called which may attach some fifo attributes

This change merges the 2 together under the hid_sensor_setup_trigger()
function. Only the &iio_pollfunc_store_time is passed to all devices, so
it's not even required to pass it explicitly outside of the common
hid_sensor_setup_trigger() function.

Moving the devm_iio_triggered_buffer_setup/cleanup() calls into the common
place code can help the rework of the buffer code, since it is in one
place.

One detail of the change is that there are 2 drivers that use
devm_iio_triggered_buffer_setup(). That function gets implicitly
replaced with iio_triggered_buffer_setup()/cleanup(), but since all drivers
call both hid_sensor_setup_trigger9) & hid_sensor_remove_trigger() trigger,
the iio_triggered_buffer_cleanup() piggy backs on the
hid_sensor_remove_trigger() call, which should cover the cleanup.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-05-10 09:35:53 +01:00
..
Kconfig iio/gyro/bmg160: Add support for BMI088 chip 2020-04-19 16:56:13 +01:00
Makefile
adis16080.c
adis16130.c iio: gyro: adis16130: Use get_unaligned_be24() 2020-05-03 09:47:19 +01:00
adis16136.c iio: imu: adis16xxx: use helper to access iio core debugfs dir 2020-05-03 14:47:56 +01:00
adis16260.c
adxrs450.c
bmg160.h
bmg160_core.c
bmg160_i2c.c iio: gyro: bmg160_i2c: Use vsprintf extension %pe for symbolic error name 2020-04-19 16:56:15 +01:00
bmg160_spi.c iio: gyro: bmg160_spi: Use vsprintf extension %pe for symbolic error name 2020-04-19 16:56:16 +01:00
fxas21002c.h
fxas21002c_core.c
fxas21002c_i2c.c
fxas21002c_spi.c
hid-sensor-gyro-3d.c iio: hid-sensors: move triggered buffer setup into hid_sensor_setup_trigger 2020-05-10 09:35:53 +01:00
itg3200_buffer.c
itg3200_core.c
mpu3050-core.c
mpu3050-i2c.c iio: gyro: mpu3050: Use vsprintf extension %pe for symbolic error name 2020-04-19 16:56:16 +01:00
mpu3050.h
ssp_gyro_sensor.c
st_gyro.h
st_gyro_buffer.c iio: st_sensors: Drop unneeded explicit castings 2020-03-21 10:26:21 +00:00
st_gyro_core.c iio: st_sensors: Drop unneeded explicit castings 2020-03-21 10:26:21 +00:00
st_gyro_i2c.c
st_gyro_spi.c