alistair23-linux/drivers/iio/temperature
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
..
hid-sensor-temperature.c iio: hid-sensors: move triggered buffer setup into hid_sensor_setup_trigger 2020-05-10 09:35:53 +01:00
iqs620at-temp.c iio: temperature: Add support for Azoteq IQS620AT temperature sensor 2020-03-27 08:25:50 +00:00
Kconfig iio: temperature: Add support for Azoteq IQS620AT temperature sensor 2020-03-27 08:25:50 +00:00
ltc2983.c iio: temperature: ltc2983: remove redundant comparison to bool 2020-04-19 16:56:20 +01:00
Makefile iio: temperature: Add support for Azoteq IQS620AT temperature sensor 2020-03-27 08:25:50 +00:00
max31856.c iio: temperature: max31856: Use get_unaligned_beXX() 2020-05-03 09:47:21 +01:00
maxim_thermocouple.c iio: maxim_thermocouple: add thermocouple_type sysfs attribute 2019-11-23 14:25:02 +00:00
mlx90614.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
mlx90632.c iio: temperature: mlx90632 Relax the compatibility check 2019-05-27 10:52:30 +01:00
tmp006.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
tmp007.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
tsys01.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 177 2019-05-30 11:29:19 -07:00
tsys02d.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 177 2019-05-30 11:29:19 -07:00