Re: [PATCH v2 3/8] iio: add child nodes support in iio backend framework
From: Nuno Sá
Date: Wed Jun 26 2024 - 04:50:16 EST
On Tue, 2024-06-25 at 17:07 +0200, Olivier Moysan wrote:
> 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@xxxxxxxxxxx>
> Reviewed-by: Nuno Sa <nuno.sa@xxxxxxxxxx>
> ---
> drivers/iio/industrialio-backend.c | 62 +++++++++++++++++++++---------
> include/linux/iio/backend.h | 2 +
> 2 files changed, 45 insertions(+), 19 deletions(-)
...
> --- a/include/linux/iio/backend.h
> +++ b/include/linux/iio/backend.h
> @@ -153,6 +153,8 @@ int iio_backend_extend_chan_spec(struct iio_dev
> *indio_dev,
> 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 *node);
node -> fwnode
- Nuno Sá