devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 v3 01/11] iio: backend: add support for filter config
Date: Tue, 29 Apr 2025 09:14:56 +0100	[thread overview]
Message-ID: <23fbfcd79d2d8c924c84ea8a16ed28697bfd326b.camel@gmail.com> (raw)
In-Reply-To: <20250425112538.59792-2-antoniu.miclaus@analog.com>

On Fri, 2025-04-25 at 14:25 +0300, Antoniu Miclaus wrote:
> Add backend support for digital filter type selection.
> 
> 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>
> ---

This one LGTM:

Reviewed-by: Nuno Sá <nuno.sa@analog.com>

> changes in v3:
>  - update function to set the actual filter type instead of just
> enable/disable.
>  drivers/iio/industrialio-backend.c | 15 +++++++++++++++
>  include/linux/iio/backend.h        | 13 +++++++++++++
>  2 files changed, 28 insertions(+)
> 
> diff --git a/drivers/iio/industrialio-backend.c b/drivers/iio/industrialio-
> backend.c
> index d4ad36f54090..2d28eabb1607 100644
> --- a/drivers/iio/industrialio-backend.c
> +++ b/drivers/iio/industrialio-backend.c
> @@ -778,6 +778,21 @@ static int __devm_iio_backend_get(struct device *dev,
> struct iio_backend *back)
>  	return 0;
>  }
>  
> +/**
> + * iio_backend_filter_type_set - Set filter type
> + * @back: Backend device
> + * @type: Filter type.
> + *
> + * RETURNS:
> + * 0 on success, negative error number on failure.
> + */
> +int iio_backend_filter_type_set(struct iio_backend *back,
> +				enum iio_backend_filter_type type)
> +{
> +	return iio_backend_op_call(back, filter_type_set, type);
> +}
> +EXPORT_SYMBOL_NS_GPL(iio_backend_filter_type_set, "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 e45b7dfbec35..5526800f5d4a 100644
> --- a/include/linux/iio/backend.h
> +++ b/include/linux/iio/backend.h
> @@ -76,6 +76,14 @@ enum iio_backend_interface_type {
>  	IIO_BACKEND_INTERFACE_MAX
>  };
>  
> +enum iio_backend_filter_type {
> +	IIO_BACKEND_FILTER_TYPE_DISABLED,
> +	IIO_BACKEND_FILTER_TYPE_SINC1,
> +	IIO_BACKEND_FILTER_TYPE_SINC5,
> +	IIO_BACKEND_FILTER_TYPE_SINC5_PLUS_COMP,
> +	IIO_BACKEND_FILTER_TYPE_MAX
> +};
> +
>  /**
>   * struct iio_backend_ops - operations structure for an iio_backend
>   * @enable: Enable backend.
> @@ -100,6 +108,7 @@ enum iio_backend_interface_type {
>   * @read_raw: Read a channel attribute from a backend device
>   * @debugfs_print_chan_status: Print channel status into a buffer.
>   * @debugfs_reg_access: Read or write register value of backend.
> + * @filter_type_set: Set filter type.
>   * @ddr_enable: Enable interface DDR (Double Data Rate) mode.
>   * @ddr_disable: Disable interface DDR (Double Data Rate) mode.
>   * @data_stream_enable: Enable data stream.
> @@ -150,6 +159,8 @@ struct iio_backend_ops {
>  					 size_t len);
>  	int (*debugfs_reg_access)(struct iio_backend *back, unsigned int reg,
>  				  unsigned int writeval, unsigned int
> *readval);
> +	int (*filter_type_set)(struct iio_backend *back,
> +			       enum iio_backend_filter_type type);
>  	int (*ddr_enable)(struct iio_backend *back);
>  	int (*ddr_disable)(struct iio_backend *back);
>  	int (*data_stream_enable)(struct iio_backend *back);
> @@ -190,6 +201,8 @@ int iio_backend_data_sample_trigger(struct iio_backend
> *back,
>  int devm_iio_backend_request_buffer(struct device *dev,
>  				    struct iio_backend *back,
>  				    struct iio_dev *indio_dev);
> +int iio_backend_filter_type_set(struct iio_backend *back,
> +				enum iio_backend_filter_type type);
>  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);

  parent reply	other threads:[~2025-04-29  8:14 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25 11:25 [PATCH v3 00/11] Add support for AD4080 ADC Antoniu Miclaus
2025-04-25 11:25 ` [PATCH v3 01/11] iio: backend: add support for filter config Antoniu Miclaus
2025-04-26 13:14   ` Jonathan Cameron
2025-04-29  8:14   ` Nuno Sá [this message]
2025-04-25 11:25 ` [PATCH v3 02/11] iio: backend: add support for data alignment Antoniu Miclaus
2025-04-25 11:25 ` [PATCH v3 03/11] iio: backend: add support for sync status Antoniu Miclaus
2025-04-25 11:25 ` [PATCH v3 04/11] iio: backend: add support for number of lanes Antoniu Miclaus
2025-04-29  8:19   ` Nuno Sá
2025-04-25 11:25 ` [PATCH v3 05/11] dt-bindings: iio: adc: add ad408x axi variant Antoniu Miclaus
2025-04-25 11:25 ` [PATCH v3 06/11] iio: adc: adi-axi-adc: add filter type config Antoniu Miclaus
2025-04-29  8:18   ` Nuno Sá
2025-04-25 11:25 ` [PATCH v3 07/11] iio: adc: adi-axi-adc: add sync enable/disable Antoniu Miclaus
2025-04-29  8:28   ` Nuno Sá
2025-04-29 17:22   ` David Lechner
2025-04-25 11:25 ` [PATCH v3 08/11] iio: adc: adi-axi-adc: add sync status Antoniu Miclaus
2025-04-25 11:25 ` [PATCH v3 09/11] iio: adc: adi-axi-adc: add num lanes support Antoniu Miclaus
2025-04-29  8:26   ` Nuno Sá
2025-04-29 17:26   ` David Lechner
2025-04-25 11:25 ` [PATCH v3 10/11] dt-bindings: iio: adc: add ad4080 Antoniu Miclaus
2025-04-25 11:25 ` [PATCH v3 11/11] iio: adc: ad4080: add driver support Antoniu Miclaus
2025-04-26 13:13   ` Jonathan Cameron
2025-04-26 16:48   ` kernel test robot
2025-04-29  8:46   ` Nuno Sá
2025-04-29 19:15   ` David Lechner
2025-04-30 12:31     ` Miclaus, Antoniu
2025-04-30 14:11       ` David Lechner

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=23fbfcd79d2d8c924c84ea8a16ed28697bfd326b.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).