diff mbox series

[v2,08/11] iio: core: add get_iio_backend() callback

Message ID 20240405-iio-backend-axi-dac-v2-8-293bab7d5552@analog.com (mailing list archive)
State Changes Requested
Headers show
Series iio: dac: support IIO backends on the output direction | expand

Commit Message

Nuno Sa April 5, 2024, 3 p.m. UTC
This new callback is intended for IIO frontends that have more than one
backend and these somehow extend some channels. In these cases, if the
backend framework is responsible for handling some IIO userspace
interface directly, it needs to be capable to get the right backend from
an iio device. Hence, we need to callback into the frontend so it can
give us the right backend given a specific channel.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
 include/linux/iio/iio.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index e370a7bb3300..83158c93330f 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -526,6 +526,8 @@  struct iio_info {
 	int (*hwfifo_set_watermark)(struct iio_dev *indio_dev, unsigned val);
 	int (*hwfifo_flush_to_buffer)(struct iio_dev *indio_dev,
 				      unsigned count);
+	struct iio_backend *(*get_iio_backend)(struct iio_dev *indio_dev,
+					       struct iio_chan_spec const *chan);
 };
 
 /**