From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Marcelo Schmitt <marcelo.schmitt@analog.com>
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux@analog.com, jic23@kernel.org,
nuno.sa@analog.com, dlechner@baylibre.com, andy@kernel.org,
Michael.Hennerich@analog.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, corbet@lwn.net,
skhan@linuxfoundation.org, marcelo.schmitt1@gmail.com
Subject: Re: [PATCH v1 06/13] iio: adc: ad4134: Add support for digital filter type selection
Date: Thu, 3 Sep 2026 09:31:16 +0300 [thread overview]
Message-ID: <apkUNH9qCcfTNZqU@ashevche-desk.local> (raw)
In-Reply-To: <058e82fb421c6794cc3002bde25d9e3485f74be2.1788368334.git.marcelo.schmitt@analog.com>
On Wed, Sep 02, 2026 at 02:23:22PM -0300, Marcelo Schmitt wrote:
> AD4134 supports four types of programmable digital filters that allow users
> to choose between different output data rates and input bandwidths. Enable
> basic digital filter configuration by providing a way to select which
> filter type is activated for each channel.
...
> +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),
Make it a single line (it's only 82 characters).
> + { }
> +};
...
> +static int ad4134_get_filter_type(struct iio_dev *indio_dev,
> + struct iio_chan_spec const *chan)
int
> +{
> + struct ad4134_state *st = iio_priv(indio_dev);
> + enum ad4134_filter_type f_type;
enum
> + unsigned int mask, reg_val;
> + int ret;
> +
> + IIO_DEV_ACQUIRE_DIRECT_MODE(indio_dev, claim);
> + if (IIO_DEV_ACQUIRE_FAILED(claim))
> + return -EBUSY;
> +
> + ret = regmap_read(st->regmap, AD4134_CHAN_DIG_FILTER_SEL_REG, ®_val);
> + if (ret)
> + return ret;
> +
> + mask = AD4134_CHAN_DIG_FILTER_SEL_CH_MASK(chan->channel);
> + f_type = field_get(mask, reg_val);
> +
> + return f_type;
field_get() macro...
I think you can get rid of temporary variable if it's not used afterwards.
> +}
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-09-03 6:31 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 17:21 [PATCH v1 00/13] iio: adc: ad4134: Enable greater sample rate data capture Marcelo Schmitt
2026-09-02 17:21 ` [PATCH v1 01/13] iio: Fix typo in vendor name Marcelo Schmitt
2026-09-03 6:22 ` Andy Shevchenko
2026-09-04 19:41 ` Marcelo Schmitt
2026-09-05 7:40 ` Andy Shevchenko
2026-09-05 7:41 ` Andy Shevchenko
2026-09-02 17:21 ` [PATCH v1 02/13] iio: adc: ad4134: Drop import to empty name space Marcelo Schmitt
2026-09-02 17:22 ` [PATCH v1 03/13] iio: adc: ad4134: Update include list to comply with IWYU principles Marcelo Schmitt
2026-09-03 6:26 ` Andy Shevchenko
2026-09-02 17:22 ` [PATCH v1 04/13] iio: adc: ad4134: Serialize single-read operations Marcelo Schmitt
2026-09-03 6:27 ` Andy Shevchenko
2026-09-06 18:50 ` Jonathan Cameron
2026-09-02 17:23 ` [PATCH v1 05/13] iio: adc: ad4134: Run shorter transfers when CRC is disabled Marcelo Schmitt
2026-09-02 17:23 ` [PATCH v1 06/13] iio: adc: ad4134: Add support for digital filter type selection Marcelo Schmitt
2026-09-03 6:31 ` Andy Shevchenko [this message]
2026-09-02 17:23 ` [PATCH v1 07/13] iio: adc: ad4134: Support buffered data read Marcelo Schmitt
2026-09-02 17:24 ` [PATCH v1 08/13] dt-bindings: iio: adc: adi,ad4134: Document SPI connection mode Marcelo Schmitt
2026-09-03 18:14 ` Conor Dooley
2026-09-04 20:47 ` Marcelo Schmitt
2026-09-04 22:06 ` Marcelo Schmitt
2026-09-06 19:26 ` Jonathan Cameron
2026-09-09 15:17 ` Marcelo Schmitt
2026-09-14 0:34 ` Jonathan Cameron
2026-09-07 17:52 ` Conor Dooley
2026-09-10 22:19 ` Marcelo Schmitt
2026-09-15 14:06 ` Conor Dooley
2026-09-06 19:15 ` Jonathan Cameron
2026-09-02 17:24 ` [PATCH v1 09/13] iio: adc: ad4134: Support SPI 4-wire mode Marcelo Schmitt
2026-09-03 6:39 ` Andy Shevchenko
2026-09-02 17:24 ` [PATCH v1 10/13] dt-bindings: iio: adc: adi,ad4134: Document PWM usage Marcelo Schmitt
2026-09-04 15:53 ` Conor Dooley
2026-09-02 17:25 ` [PATCH v1 11/13] dt-bindings: iio: adc: adi,ad4134: Add high data throughput example Marcelo Schmitt
2026-09-02 17:25 ` [PATCH v1 12/13] iio: adc: ad4134: Support high-speed data capture Marcelo Schmitt
2026-09-03 7:00 ` Andy Shevchenko
2026-09-02 17:25 ` [PATCH v1 13/13] Docs: iio: Add AD4134 Marcelo Schmitt
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=apkUNH9qCcfTNZqU@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=marcelo.schmitt1@gmail.com \
--cc=marcelo.schmitt@analog.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.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
all inboxes | Powered by JetHome®