summaryrefslogtreecommitdiff
path: root/include/linux/iio
diff options
context:
space:
mode:
authorOlivier Moysan <olivier.moysan@foss.st.com>2024-07-30 11:46:33 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-08-10 13:17:34 +0300
commitc464cc610f51f6eb5f27bf905d4c1ab1896b2725 (patch)
treef48e13ae0d9c6ae51619dc174e83274923c5cd57 /include/linux/iio
parent2530d7d44ca6dc0c1c059f143cdcb2be8600c59a (diff)
downloadlinux-c464cc610f51f6eb5f27bf905d4c1ab1896b2725.tar.xz
iio: add child nodes support in iio backend framework
Add an API to support IIO generic channels binding: http://devicetree.org/schemas/iio/adc/adc.yaml# This new API is needed, as generic channel DT node isn't populated as a device. Add devm_iio_backend_fwnode_get() to allow an IIO device backend consumer to reference backend phandles in its child nodes. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20240730084640.1307938-4-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/backend.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/iio/backend.h b/include/linux/iio/backend.h
index b0b663163ff4..37d56914d485 100644
--- a/include/linux/iio/backend.h
+++ b/include/linux/iio/backend.h
@@ -176,6 +176,9 @@ int iio_backend_extend_chan_spec(struct iio_backend *back,
struct iio_chan_spec *chan);
void *iio_backend_get_priv(const struct iio_backend *conv);
struct iio_backend *devm_iio_backend_get(struct device *dev, const char *name);
+struct iio_backend *devm_iio_backend_fwnode_get(struct device *dev,
+ const char *name,
+ struct fwnode_handle *fwnode);
struct iio_backend *
__devm_iio_backend_get_from_fwnode_lookup(struct device *dev,
struct fwnode_handle *fwnode);