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 01/13] iio: backend: add support for filter config
Date: Fri, 11 Apr 2025 16:37:28 +0100 [thread overview]
Message-ID: <c352c000a9d2c855dc4e5b01e16682a239e8cae7.camel@gmail.com> (raw)
In-Reply-To: <20250411123627.6114-2-antoniu.miclaus@analog.com>
Hi Antoniu,
I do not have time today for going through all the series but I'll already leave
my comment on this on..
On Fri, 2025-04-11 at 15:36 +0300, Antoniu Miclaus wrote:
> Add backend support for digital filter enable/disable.
>
> This setting can be adjusted within the IP cores interfacing devices.
>
> The IP core can be configured based on the state of the actual
> digital filter configuration of the part.
>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> ---
> changes in v2:
> - improve commit description
> drivers/iio/industrialio-backend.c | 26 ++++++++++++++++++++++++++
> include/linux/iio/backend.h | 6 ++++++
> 2 files changed, 32 insertions(+)
>
> diff --git a/drivers/iio/industrialio-backend.c b/drivers/iio/industrialio-
> backend.c
> index d4ad36f54090..ffafe7c73508 100644
> --- a/drivers/iio/industrialio-backend.c
> +++ b/drivers/iio/industrialio-backend.c
> @@ -778,6 +778,32 @@ static int __devm_iio_backend_get(struct device *dev,
> struct iio_backend *back)
> return 0;
> }
>
> +/**
> + * iio_backend_filter_enable - Enable filter
> + * @back: Backend device
> + *
> + * RETURNS:
> + * 0 on success, negative error number on failure.
> + */
> +int iio_backend_filter_enable(struct iio_backend *back)
> +{
> + return iio_backend_op_call(back, filter_enable);
> +}
> +EXPORT_SYMBOL_NS_GPL(iio_backend_filter_enable, "IIO_BACKEND");
> +
> +/**
> + * iio_backend_filter_disable - Disable filter
> + * @back: Backend device
> + *
> + * RETURNS:
> + * 0 on success, negative error number on failure.
> + */
> +int iio_backend_filter_disable(struct iio_backend *back)
> +{
> + return iio_backend_op_call(back, filter_disable);
> +}
> +EXPORT_SYMBOL_NS_GPL(iio_backend_filter_disable, "IIO_BACKEND");
This seems to resemble the filter_type IIO attr so I would likely be more
explicit in the API naming. Like 'iio_backend_filter_type_set()'. And that also
takes me into the more important point. I would consider having this API taking
an unsigned int filter_type (or an enum with the same possibilities as defined
in the ABI) argument rather than an enable vs disable thing. Like this, we're
just thinking about this particular usecase but it can very well happen that in
the future some backends might need to know the specific filter being
configured. Sure we could change things later on but doing it now is pretty
straight so why not :)?
- Nuno Sá
next prev parent reply other threads:[~2025-04-11 15:37 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á [this message]
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á
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=c352c000a9d2c855dc4e5b01e16682a239e8cae7.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;
as well as URLs for NNTP newsgroup(s).