iio: Add IIO_STATIC_CONST_DEVICE_ATTR
authorMatti Vaittinen <mazziesaccount@gmail.com>
Mon, 3 Oct 2022 08:12:04 +0000 (11:12 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:44:03 +0000 (19:44 +0000)
commit2cc64a23c4e26107887af23a62f8ba3c79ff7ab5
tree320d17e648f767d1da23082a30da636f5d080694
parent6abcb19e0a6a371b5dafe4473ea886a6891a5cd5
iio: Add IIO_STATIC_CONST_DEVICE_ATTR

Add IIO_STATIC_CONST_DEVICE_ATTR macro for creating an read-only
iio_dev_attr which returns constant value. This macro is intended to be
used when replacing the IIO_CONST_ATTR - attributes for triggered
buffers because the triggered buffer attributes must be of type
iio_dev_attr.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/8dd853dd0ef8eb40cb980cc6f6e7a43166de3afb.1664782676.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
include/linux/iio/sysfs.h