2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 20:23:57 +08:00
linux-next/drivers/iio/pressure
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
..
abp060mg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
bmp280-core.c iio: pressure: bmp280: Join string literals back 2020-04-19 16:56:20 +01:00
bmp280-i2c.c iio: pressure: bmp280: Allow device to be enumerated from ACPI 2019-12-29 15:20:10 +00:00
bmp280-regmap.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bmp280-spi.c iio: pressure: bmp280: use devm action and remove labels from probe 2019-10-22 11:10:23 +01:00
bmp280.h iio: pressure: bmp280: use devm action and remove labels from probe 2019-10-22 11:10:23 +01:00
cros_ec_baro.c iio: cros_ec: Expose hwfifo_timeout 2020-03-28 22:04:33 +01:00
dlhl60d.c iio: pressure: Add driver for DLH pressure sensors 2019-12-29 15:20:08 +00:00
dps310.c iio: dps310: Add pressure sensing capability 2019-06-08 12:33:32 +01:00
hid-sensor-press.c iio: hid-sensors: move triggered buffer setup into hid_sensor_setup_trigger 2020-05-10 09:35:53 +01:00
hp03.c iio: pressure: hp03: convert to i2c_new_dummy_device 2019-07-27 22:52:07 +01:00
hp206c.c iio: pressure: hp206c: Use get_unaligned_be24() 2020-05-03 09:47:20 +01:00
icp10100.c counter: 104-quad-8: Support Filter Clock Prescaler 2020-03-08 17:28:52 +00:00
Kconfig iio: pressure: icp10100: add driver for InvenSense ICP-101xx 2020-03-08 17:28:52 +00:00
Makefile iio: pressure: icp10100: add driver for InvenSense ICP-101xx 2020-03-08 17:28:52 +00:00
mpl115_i2c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
mpl115_spi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
mpl115.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
mpl115.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
mpl3115.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
ms5611_core.c iio: pressure: ms5611: switch to SPDX identifier 2018-09-08 15:04:02 +01:00
ms5611_i2c.c iio: pressure: ms5611: Use get_unaligned_be24() 2020-05-03 09:47:20 +01:00
ms5611_spi.c iio: pressure: ms5611: Use get_unaligned_be24() 2020-05-03 09:47:20 +01:00
ms5611.h iio: pressure: ms5611: switch to SPDX identifier 2018-09-08 15:04:02 +01:00
ms5637.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 177 2019-05-30 11:29:19 -07:00
st_pressure_buffer.c iio:st_sensors: remove buffer allocation at each buffer enable 2019-08-11 09:26:04 +01:00
st_pressure_core.c iio: st_sensors: Drop unneeded explicit castings 2020-03-21 10:26:21 +00:00
st_pressure_i2c.c iio: st_sensors: Make use of device properties 2020-01-13 21:53:39 +00:00
st_pressure_spi.c iio: st_sensors: Make use of device properties 2020-01-13 21:53:39 +00:00
st_pressure.h iio: pressure: st_press: Mark default_press_pdata with __maybe_unused 2019-12-29 15:20:05 +00:00
t5403.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00
zpa2326_i2c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
zpa2326_spi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
zpa2326.c iio: pressure: zpa2326: Use get_unaligned_le24() 2020-05-03 09:47:20 +01:00
zpa2326.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00