summaryrefslogtreecommitdiffstats
path: root/include/linux/iio/iio.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2022-02-07 15:38:37 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-04-10 16:21:45 +0100
commit8c576f87ad7eb639b8bd4472a9bb830e0696dda5 (patch)
tree3adaf18e206dd4aad53cd3566eae548c345fe8cf /include/linux/iio/iio.h
parent2f53b4adfede66f1bc1c8bb7efd7ced2bad1191a (diff)
downloadlinux-8c576f87ad7eb639b8bd4472a9bb830e0696dda5.tar.bz2
iio: core: Hide read accesses to iio_dev->currentmode
In order to later move this variable within the opaque structure, let's create a helper for accessing it in read-only mode. This helper will be exposed to device drivers and kept accessible for the few that could need it. The write access to this variable however should be fully reserved to the core so in a second step we will hide this variable into the opaque structure. Cc: Eugen Hristev <eugen.hristev@microchip.com> Cc: Nicolas Ferre <nicolas.ferre@microchip.com> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Ludovic Desroches <ludovic.desroches@microchip.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20220207143840.707510-11-miquel.raynal@bootlin.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio/iio.h')
-rw-r--r--include/linux/iio/iio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index faabb852128a..31098ffa7dc9 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -550,6 +550,7 @@ struct iio_dev {
};
int iio_device_id(struct iio_dev *indio_dev);
+int iio_device_get_current_mode(struct iio_dev *indio_dev);
bool iio_buffer_enabled(struct iio_dev *indio_dev);
const struct iio_chan_spec