From: "Nuno Sá" <noname.nuno@gmail.com>
To: Antoniu Miclaus <antoniu.miclaus@analog.com>,
jic23@kernel.org, robh@kernel.org, conor+dt@kernel.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 03/13] iio: backend: add support for self sync
Date: Tue, 15 Apr 2025 10:02:45 +0100 [thread overview]
Message-ID: <85458f261a66815507170a980b17fb45135548bd.camel@gmail.com> (raw)
In-Reply-To: <20250411123627.6114-4-antoniu.miclaus@analog.com>
On Fri, 2025-04-11 at 15:36 +0300, Antoniu Miclaus wrote:
> Add iio backend support for self sync enable/disable.
> When disabled data capture synchronization is done
> through CNV signal, otherwise through bit-slip.
>
It is still not clear what API's will come out of this but you need to improve
the commit description (and the API docs). Note that the above is very focused
on your use case and you're just using the same names defined in the device docs
and hdl IP. While that might be ok for the device drivers commits, it is not
that nice for something that "tries" to be more generic.
This is true for all the new API's being introduced...
- Nuno Sá
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> ---
> no changes in v2.
> drivers/iio/industrialio-backend.c | 30 ++++++++++++++++++++++++++++++
> include/linux/iio/backend.h | 6 ++++++
> 2 files changed, 36 insertions(+)
>
> diff --git a/drivers/iio/industrialio-backend.c b/drivers/iio/industrialio-
> backend.c
> index 60578267643d..cb23433b22c6 100644
> --- a/drivers/iio/industrialio-backend.c
> +++ b/drivers/iio/industrialio-backend.c
> @@ -830,6 +830,36 @@ int iio_backend_data_alignment_disable(struct iio_backend
> *back)
> }
> EXPORT_SYMBOL_NS_GPL(iio_backend_data_alignment_disable, "IIO_BACKEND");
>
> +/**
> + * iio_backend_self_sync_enable - Enable the self sync data capture.
> + * @back: Backend device
> + *
> + * Data capture synchronization is done through bit-slip.
> + *
> + * RETURNS:
> + * 0 on success, negative error number on failure.
> + */
> +int iio_backend_self_sync_enable(struct iio_backend *back)
> +{
> + return iio_backend_op_call(back, self_sync_enable);
> +}
> +EXPORT_SYMBOL_NS_GPL(iio_backend_self_sync_enable, "IIO_BACKEND");
> +
> +/**
> + * iio_backend_self_sync_disable - Disable the self sync data capture.
> + * @back: Backend device
> + *
> + * Data capture synchronization is done through CNV signal.
> + *
> + * RETURNS:
> + * 0 on success, negative error number on failure.
> + */
> +int iio_backend_self_sync_disable(struct iio_backend *back)
> +{
> + return iio_backend_op_call(back, self_sync_disable);
> +}
> +EXPORT_SYMBOL_NS_GPL(iio_backend_self_sync_disable, "IIO_BACKEND");
> +
> /**
> * iio_backend_ddr_enable - Enable interface DDR (Double Data Rate) mode
> * @back: Backend device
> diff --git a/include/linux/iio/backend.h b/include/linux/iio/backend.h
> index beff66d18151..6d006cb0da5a 100644
> --- a/include/linux/iio/backend.h
> +++ b/include/linux/iio/backend.h
> @@ -104,6 +104,8 @@ enum iio_backend_interface_type {
> * @filter_disable: Disable filter.
> * @data_alignment_enable: Enable sync process.
> * @data_alignment_disable: Disable sync process.
> + * @self_sync_enable: Enable the self sync data capture.
> + * @self_sync_disable: Disable the self sync data capture.
> * @ddr_enable: Enable interface DDR (Double Data Rate) mode.
> * @ddr_disable: Disable interface DDR (Double Data Rate) mode.
> * @data_stream_enable: Enable data stream.
> @@ -158,6 +160,8 @@ struct iio_backend_ops {
> int (*filter_disable)(struct iio_backend *back);
> int (*data_alignment_enable)(struct iio_backend *back);
> int (*data_alignment_disable)(struct iio_backend *back);
> + int (*self_sync_enable)(struct iio_backend *back);
> + int (*self_sync_disable)(struct iio_backend *back);
> int (*ddr_enable)(struct iio_backend *back);
> int (*ddr_disable)(struct iio_backend *back);
> int (*data_stream_enable)(struct iio_backend *back);
> @@ -202,6 +206,8 @@ int iio_backend_filter_enable(struct iio_backend *back);
> int iio_backend_filter_disable(struct iio_backend *back);
> int iio_backend_data_alignment_enable(struct iio_backend *back);
> int iio_backend_data_alignment_disable(struct iio_backend *back);
> +int iio_backend_self_sync_enable(struct iio_backend *back);
> +int iio_backend_self_sync_disable(struct iio_backend *back);
> int iio_backend_ddr_enable(struct iio_backend *back);
> int iio_backend_ddr_disable(struct iio_backend *back);
> int iio_backend_data_stream_enable(struct iio_backend *back);
next prev parent reply other threads:[~2025-04-15 9:02 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 12:36 [PATCH v2 00/13] Add support for AD4080 ADC Antoniu Miclaus
2025-04-11 12:36 ` [PATCH v2 01/13] iio: backend: add support for filter config Antoniu Miclaus
2025-04-11 15:37 ` Nuno Sá
2025-04-11 12:36 ` [PATCH v2 02/13] iio: backend: add support for sync process Antoniu Miclaus
2025-04-11 12:36 ` [PATCH v2 03/13] iio: backend: add support for self sync Antoniu Miclaus
2025-04-15 9:02 ` Nuno Sá [this message]
2025-04-11 12:36 ` [PATCH v2 04/13] iio: backend: add support for sync status Antoniu Miclaus
2025-04-11 12:36 ` [PATCH v2 05/13] iio: backend: add support for number of lanes Antoniu Miclaus
2025-04-11 12:36 ` [PATCH v2 06/13] dt-bindings: iio: adc: add ad408x axi variant Antoniu Miclaus
2025-04-11 21:42 ` Rob Herring (Arm)
2025-04-11 12:36 ` [PATCH v2 07/13] iio: adc: adi-axi-adc: add filter enable/disable Antoniu Miclaus
2025-04-11 12:36 ` [PATCH v2 08/13] iio: adc: adi-axi-adc: add bitslip enable/disable Antoniu Miclaus
2025-04-11 12:36 ` [PATCH v2 09/13] iio: adc: adi-axi-adc: add self sync support Antoniu Miclaus
2025-04-11 12:36 ` [PATCH v2 10/13] iio: adc: adi-axi-adc: add sync status Antoniu Miclaus
2025-04-12 17:04 ` Jonathan Cameron
2025-04-11 12:36 ` [PATCH v2 11/13] iio: adc: adi-axi-adc: add num lanes support Antoniu Miclaus
2025-04-11 12:36 ` [PATCH v2 12/13] dt-bindings: iio: adc: add ad4080 Antoniu Miclaus
2025-04-11 21:43 ` Rob Herring (Arm)
2025-04-11 12:36 ` [PATCH v2 13/13] iio: adc: ad4080: add driver support Antoniu Miclaus
2025-04-12 17:19 ` Jonathan Cameron
2025-04-15 8:58 ` Nuno Sá
2025-04-18 14:33 ` Jonathan Cameron
2025-04-22 8:12 ` Miclaus, Antoniu
2025-04-22 11:39 ` Nuno Sá
2025-04-25 7:56 ` Miclaus, Antoniu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85458f261a66815507170a980b17fb45135548bd.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox