iio: Move attach/detach of the poll func to the core
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 25 May 2020 11:38:53 +0000 (14:38 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 20 Jun 2020 16:34:44 +0000 (17:34 +0100)
commitf11d59d87b8622d4cf9f856c0b8029fb030d8612
tree249450dfe73731ab943e918cd5ed5ddd6c66c28b
parent044d406a8490ea6a4e1a06ccb94090c8a0951d3c
iio: Move attach/detach of the poll func to the core

All devices using a triggered buffer need to attach and detach the trigger
to the device in order to properly work. Instead of doing this in each and
every driver by hand move this into the core.

At this point in time, all drivers should have been resolved to
attach/detach the poll-function in the same order.

This patch removes all explicit calls of iio_triggered_buffer_postenable()
& iio_triggered_buffer_predisable() in all drivers, since the core handles
now the pollfunc attach/detach.

The more peculiar change is for the 'at91-sama5d2_adc' driver, since it's
not immediately obvious that removing the hooks doesn't break anything.
Eugen was able to test on at91-sama5d2-adc driver, sama5d2-xplained board.
All seems to be fine.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Tested-by: Eugen Hristev <eugen.hristev@microchip.com> #for at91-sama5d2-adc
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
49 files changed:
drivers/iio/accel/adxl372.c
drivers/iio/accel/bmc150-accel-core.c
drivers/iio/accel/kxcjk-1013.c
drivers/iio/accel/kxsd9.c
drivers/iio/accel/st_accel_buffer.c
drivers/iio/accel/stk8312.c
drivers/iio/accel/stk8ba50.c
drivers/iio/adc/ad7266.c
drivers/iio/adc/ad7606.c
drivers/iio/adc/ad7766.c
drivers/iio/adc/ad7768-1.c
drivers/iio/adc/ad7887.c
drivers/iio/adc/ad_sigma_delta.c
drivers/iio/adc/at91-sama5d2_adc.c
drivers/iio/adc/dln2-adc.c
drivers/iio/adc/mxs-lradc-adc.c
drivers/iio/adc/stm32-adc.c
drivers/iio/adc/stm32-dfsdm-adc.c
drivers/iio/adc/ti-adc084s021.c
drivers/iio/adc/ti-ads1015.c
drivers/iio/adc/vf610_adc.c
drivers/iio/adc/xilinx-xadc-core.c
drivers/iio/buffer/industrialio-triggered-buffer.c
drivers/iio/chemical/atlas-sensor.c
drivers/iio/dummy/iio_simple_dummy_buffer.c
drivers/iio/gyro/bmg160_core.c
drivers/iio/gyro/mpu3050-core.c
drivers/iio/gyro/st_gyro_buffer.c
drivers/iio/humidity/hdc100x.c
drivers/iio/humidity/hts221_buffer.c
drivers/iio/iio_core_trigger.h
drivers/iio/industrialio-buffer.c
drivers/iio/industrialio-trigger.c
drivers/iio/light/gp2ap020a00f.c
drivers/iio/light/isl29125.c
drivers/iio/light/rpr0521.c
drivers/iio/light/si1145.c
drivers/iio/light/st_uvis25_core.c
drivers/iio/light/tcs3414.c
drivers/iio/light/vcnl4000.c
drivers/iio/magnetometer/bmc150_magn.c
drivers/iio/magnetometer/rm3100-core.c
drivers/iio/magnetometer/st_magn_buffer.c
drivers/iio/potentiostat/lmp91000.c
drivers/iio/pressure/st_pressure_buffer.c
drivers/iio/pressure/zpa2326.c
drivers/iio/proximity/sx9310.c
drivers/iio/proximity/sx9500.c
include/linux/iio/trigger_consumer.h