[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36729a039fb1c19cf0e6d5f85df4d774b40a8334.camel@gmail.com>
Date: Wed, 19 Jun 2024 07:25:30 +0200
From: Nuno Sá <noname.nuno@...il.com>
To: Olivier Moysan <olivier.moysan@...s.st.com>, Nuno Sa
<nuno.sa@...log.com>, Jonathan Cameron <jic23@...nel.org>, Lars-Peter
Clausen <lars@...afoo.de>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/8] iio: add read raw service to iio backend framework
On Tue, 2024-06-18 at 18:08 +0200, Olivier Moysan wrote:
> Add iio_backend_read_raw() service to support attributes read
> from an IIO backend.
>
> Signed-off-by: Olivier Moysan <olivier.moysan@...s.st.com>
> ---
Small note. With it:
Reviewed-by: Nuno Sa <nuno.sa@...log.com>
> drivers/iio/industrialio-backend.c | 16 ++++++++++++++++
> include/linux/iio/backend.h | 3 +++
> 2 files changed, 19 insertions(+)
>
> diff --git a/drivers/iio/industrialio-backend.c b/drivers/iio/industrialio-
> backend.c
> index 929aff4040ed..b950e30018ca 100644
> --- a/drivers/iio/industrialio-backend.c
> +++ b/drivers/iio/industrialio-backend.c
> @@ -357,6 +357,22 @@ int devm_iio_backend_request_buffer(struct device *dev,
> }
> EXPORT_SYMBOL_NS_GPL(devm_iio_backend_request_buffer, IIO_BACKEND);
>
> +/**
> + * iio_backend_read_raw - Request a value from the backend.
> + * @back: Backend device
> + * @val: First element of the returned value
> + * @val2: Second element of the returned value
> + * @mask: Specify value to retrieve
> + *
> + * RETURNS:
> + * 0 on success, negative error number on failure.
> + */
> +int iio_backend_read_raw(struct iio_backend *back, int *val, int *val2, long mask)
> +{
> + return iio_backend_op_call(back, read_raw, val, val2, mask);
> +}
> +EXPORT_SYMBOL_NS_GPL(iio_backend_read_raw, IIO_BACKEND);
> +
I would completely mimic the IIO API (only change being indio_dev -> back). Meaning
that 'struct iio_chan_spec const *chan' is missing.
- Nuno Sá
Powered by blists - more mailing lists