All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Marcelo Schmitt" <marcelo.schmitt@analog.com>,
	devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 08/15] iio: adc: ad4134: Add support for digital filter type selection
Date: Sat, 17 Oct 2026 02:16:31 +0000	[thread overview]
Message-ID: <sashiko-outbox-175200@kernel.org> (raw)
In-Reply-To: <a547bfc6d0b41413818f7048d4a685fbb43b6537.1792200021.git.marcelo.schmitt@analog.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] iio: adc: ad4134: undocumented sinc6 filter_type and sysfs ABI attributes
--

commit f7364f2a84e232ee97a6956a54b434e35fd7f79d
Author: Marcelo Schmitt <marcelo.schmitt@analog.com>

iio: adc: ad4134: Add support for digital filter type selection

This commit adds per-channel digital filter type configuration for the AD4134
ADC by exposing filter_type and filter_type_available sysfs attributes via
IIO_ENUM.

> diff --git a/drivers/iio/adc/ad4134.c b/drivers/iio/adc/ad4134.c
> index 91a7c21077709..b245001d45517 100644
> --- a/drivers/iio/adc/ad4134.c
> +++ b/drivers/iio/adc/ad4134.c
[ ... ]
> @@ -80,19 +83,18 @@
[ ... ]
> +enum ad4134_filter_type {
> +	AD4134_WIDEBAND,
> +	AD4134_SINC6,
> +	AD4134_SINC3,
> +	AD4134_SINC3_REJ60,
> +};
>  
> -static const struct iio_chan_spec ad4134_chan_set[] = {
> -	AD4134_CHANNEL(0),
> -	AD4134_CHANNEL(1),
> -	AD4134_CHANNEL(2),
> -	AD4134_CHANNEL(3),
> +static const char * const ad4134_filt_names[] = {
> +	[AD4134_WIDEBAND] = "wideband",
> +	[AD4134_SINC6] = "sinc6",
> +	[AD4134_SINC3] = "sinc3",
> +	[AD4134_SINC3_REJ60] = "sinc3+rej60",
>  };
>  
>  struct ad4134_state {
> @@ -115,6 +117,73 @@ struct ad4134_state {
>  	u8 tx_buf[AD4134_SPI_MAX_XFER_LEN];
>  };
>  
[ ... ]
> +static const struct iio_enum ad4134_filter_type_enum = {
> +	.items = ad4134_filt_names,
> +	.num_items = ARRAY_SIZE(ad4134_filt_names),
> +	.get = ad4134_get_filter_type,
> +	.set = ad4134_set_filter_type,
> +};
> +
> +static const struct iio_chan_spec_ext_info ad4134_filter_type_ext_info[] = {
> +	IIO_ENUM("filter_type", IIO_SEPARATE, &ad4134_filter_type_enum),
> +	IIO_ENUM_AVAILABLE("filter_type", IIO_SEPARATE, &ad4134_filter_type_enum),
> +	{ }
> +};
> +
> +#define AD4134_CHANNEL(_index) {						\
> +	.type = IIO_VOLTAGE,							\
> +	.indexed = 1,								\
> +	.channel = (_index),							\
> +	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),				\
> +	.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),			\
> +	.ext_info = ad4134_filter_type_ext_info,				\
> +}

[Severity: Low]
In drivers/iio/adc/ad4134.c, ad4134_filt_names[] introduces "sinc6" as a new
filter_type string option when the driver probes and registers
ad4134_chan_set[].

In addition, attaching ad4134_filter_type_ext_info[] with IIO_SEPARATE to
indexed non-differential IIO_VOLTAGE channels in AD4134_CHANNEL() exposes
/sys/bus/iio/devices/iio:deviceX/in_voltageY_filter_type and
/sys/bus/iio/devices/iio:deviceX/in_voltageY_filter_type_available to
userspace.

Currently, Documentation/ABI/testing/sysfs-bus-iio only lists What entries
for filter_type, in_voltageY-voltageZ_filter_type, filter_type_available, and
in_voltage-voltage_filter_type_available, and its list of valid filter types
does not include "sinc6".

Should Documentation/ABI/testing/sysfs-bus-iio be updated to document the
"sinc6" filter option and the in_voltageY_filter_type and
in_voltageY_filter_type_available attributes?

> +
> +static const struct iio_chan_spec ad4134_chan_set[] = {
> +	AD4134_CHANNEL(0),
> +	AD4134_CHANNEL(1),
> +	AD4134_CHANNEL(2),
> +	AD4134_CHANNEL(3),
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1792200021.git.marcelo.schmitt@analog.com?part=8

  reply	other threads:[~2026-10-17  2:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-17  1:56 [PATCH v5 00/15] iio: adc: ad4134: Enable greater sample rate data capture Marcelo Schmitt
2026-10-17  1:56 ` [PATCH v5 01/15] iio: adc: ad4134: Adjust register map range Marcelo Schmitt
2026-10-17  1:56 ` [PATCH v5 02/15] iio: adc: ad4134: Sign extend sample data Marcelo Schmitt
2026-10-17  1:57 ` [PATCH v5 03/15] iio: adc: ad4134: Apply reset recovery wait time Marcelo Schmitt
2026-10-17  2:05   ` sashiko-bot
2026-10-17  5:55   ` Joshua Crofts
2026-10-17 19:13     ` Jonathan Cameron
2026-10-17  1:57 ` [PATCH v5 04/15] iio: adc: ad4134: Update include list to comply with IWYU principles Marcelo Schmitt
2026-10-17  1:57 ` [PATCH v5 05/15] iio: adc: ad4134: Serialize single-read operations Marcelo Schmitt
2026-10-17 18:39   ` Jonathan Cameron
2026-10-17  1:58 ` [PATCH v5 06/15] iio: adc: ad4134: Protect conventional device access from debug accesses Marcelo Schmitt
2026-10-17 18:47   ` Jonathan Cameron
2026-10-17  1:58 ` [PATCH v5 07/15] iio: adc: ad4134: Run shorter transfers when CRC is disabled Marcelo Schmitt
2026-10-17  1:58 ` [PATCH v5 08/15] iio: adc: ad4134: Add support for digital filter type selection Marcelo Schmitt
2026-10-17  2:16   ` sashiko-bot [this message]
2026-10-17  1:59 ` [PATCH v5 09/15] iio: adc: ad4134: Support buffered data read Marcelo Schmitt
2026-10-17  5:59   ` Joshua Crofts
2026-10-17  1:59 ` [PATCH v5 10/15] dt-bindings: iio: adc: adi,ad4134: Document SPI connection mode Marcelo Schmitt
2026-10-17  1:59 ` [PATCH v5 11/15] dt-bindings: iio: adc: adi,ad4134: Document external multiplexer usage Marcelo Schmitt
2026-10-17  1:59 ` [PATCH v5 12/15] iio: adc: ad4134: Support SPI 4-wire mode Marcelo Schmitt
2026-10-17  2:19   ` sashiko-bot
2026-10-17 19:03   ` Jonathan Cameron
2026-10-17  2:00 ` [PATCH v5 13/15] dt-bindings: iio: adc: adi,ad4134: Document PWM usage Marcelo Schmitt
2026-10-17  2:00 ` [PATCH v5 14/15] iio: adc: ad4134: Support high-speed data capture Marcelo Schmitt
2026-10-17  2:21   ` sashiko-bot
2026-10-17 19:10   ` Jonathan Cameron
2026-10-17  2:00 ` [PATCH v5 15/15] Docs: iio: Add AD4134 Marcelo Schmitt
2026-10-17 19:17 ` [PATCH v5 00/15] iio: adc: ad4134: Enable greater sample rate data capture Jonathan Cameron

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=sashiko-outbox-175200@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=marcelo.schmitt@analog.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.