summaryrefslogtreecommitdiffstats
path: root/drivers/iio/orientation/Makefile
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2020-09-29 15:59:43 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-11-21 14:53:09 +0000
commit5164c788985702ad94fa4ce6adca29bf280876df (patch)
tree308d9e05c0f7202959138f3ed8a9aea0363a1f86 /drivers/iio/orientation/Makefile
parent789976accb6a7b93226fcf8441ffc95edff3d371 (diff)
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>
Diffstat (limited to 'drivers/iio/orientation/Makefile')
0 files changed, 0 insertions, 0 deletions