linux-stable/drivers/iio
Alexandru Ardelean 5164c78898 iio: triggered-buffer: add {devm_}iio_triggered_buffer_setup_ext variants
This change adds a parameter to the {devm_}iio_triggered_buffer_setup()
functions to assign the extra sysfs buffer attributes that are typically
assigned via iio_buffer_set_attrs().

The functions also get renamed to iio_triggered_buffer_setup_ext() &
devm_iio_triggered_buffer_setup_ext().
For backwards compatibility the old {devm_}iio_triggered_buffer_setup()
functions are now macros wrap the new (renamed) functions with NULL for the
buffer attrs.

The aim is to remove iio_buffer_set_attrs(), so in the
iio_triggered_buffer_setup_ext() function the attributes are assigned
directly to 'buffer->attrs'.

When adding multiple IIO buffers per IIO device, it can be pretty
cumbersome to first allocate a set of buffers, then to dig them out of IIO
to assign extra attributes (with iio_buffer_set_attrs()).

Naturally, the best way would be to provide them at allocation time, which
is what this change does.

At this moment, buffers allocated with {devm_}iio_triggered_buffer_setup()
are the only ones in mainline IIO to call iio_buffer_set_attrs().

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-4-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-11-21 14:53:09 +00:00
..
accel iio: accel: mma8452: Constify static struct attribute_group 2020-10-10 18:05:34 +01:00
adc iio: adc: at91-sama5d2_adc: merge buffer & trigger init into a function 2020-11-21 14:53:03 +00:00
afe iio: afe: iio-rescale: Simplify with dev_err_probe() 2020-09-03 19:40:50 +01:00
amplifiers iio: amplifiers: hmc425a: Simplify with dev_err_probe() 2020-09-03 19:40:50 +01:00
buffer iio: triggered-buffer: add {devm_}iio_triggered_buffer_setup_ext variants 2020-11-21 14:53:09 +00:00
chemical Second set of features and cleanups for IIO in 5.10 2020-09-22 09:45:11 +02:00
common iio: cros_ec: unify hw fifo attributes into the core file 2020-09-29 17:27:07 +01:00
dac iio: dac: ad7303: remove platform data header 2020-10-10 18:03:28 +01:00
dummy iio: dummy: iio_dummy_evgen: Demote file header and supply description for 'irq_sim_domain' 2020-09-21 18:41:36 +01:00
frequency iio: frequency: adf4350: Replace indio_dev->mlock with own device lock 2020-09-16 18:58:01 +01:00
gyro iio:gyro:itg3200: Fix timestamp alignment and prevent data leak. 2020-09-21 20:01:50 +01:00
health Second set of features and cleanups for IIO in 5.10 2020-09-22 09:45:11 +02:00
humidity iio:humidity:si7020: Drop of_match_ptr protection 2020-09-21 18:41:34 +01:00
imu iio: remove unneeded break 2020-11-01 15:31:56 +00:00
light iio:light:tsl2563 use generic fw accessors 2020-11-01 15:28:55 +00:00
magnetometer iio: magnetometer: bmc150: remove unneeded semicolon 2020-11-01 14:59:46 +00:00
multiplexer iio: multiplexer: iio-mux: Simplify with dev_err_probe() 2020-09-03 19:40:51 +01:00
orientation
position
potentiometer iio:potentiometer:mcp4531: Drop of_match_ptr and CONFIG_OF protections. 2020-09-21 18:41:27 +01:00
potentiostat iio:potentiostat:lmp91000: Drop of_match_ptr and use generic fw accessors 2020-09-21 18:41:29 +01:00
pressure iio: pressure: bmp280: remove unneeded semicolon 2020-11-01 14:58:54 +00:00
proximity iio: proximity: vl53l0x-i2c add i2c_device_id 2020-11-01 15:28:32 +00:00
resolver iio:resolver:ad2s1200: Drop of_match_ptr protection 2020-09-21 18:41:31 +01:00
temperature iio: ltc2983: Fix of_node refcounting 2020-09-29 17:34:18 +01:00
trigger
iio_core.h iio: core: centralize ioctl() calls to the main chardev 2020-11-14 15:31:25 +00:00
iio_core_trigger.h iio: trigger: make stub functions static inline 2020-08-22 10:53:18 +01:00
industrialio-buffer.c iio: buffer: split buffer sysfs creation to take buffer as primary arg 2020-09-17 18:56:10 +01:00
industrialio-configfs.c
industrialio-core.c iio: core: centralize ioctl() calls to the main chardev 2020-11-14 15:31:25 +00:00
industrialio-event.c iio: core: centralize ioctl() calls to the main chardev 2020-11-14 15:31:25 +00:00
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c iio: Add __printf() attributes to various allocation functions 2020-09-21 18:54:18 +01:00
industrialio-triggered-event.c
inkern.c
Kconfig iio: Kconfig: Provide title for IIO_TRIGGERED_EVENT symbol 2020-09-29 17:27:08 +01:00
Makefile
TODO