public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: rodrigo.alencar@analog.com
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Stefan Popa <stefan.popa@analog.com>,
	Jonathan Cameron <jic23@cam.ac.uk>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Michael Auchter <michael.auchter@ni.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	David Lechner <dlechner@baylibre.com>,
	Andy Shevchenko <andy@kernel.org>
Subject: Re: [PATCH v2 09/11] iio: dac: ad5686: add control_sync() for single-channel devices
Date: Mon, 27 Apr 2026 21:09:18 +0300	[thread overview]
Message-ID: <ae-mTn2o0amSJ_xq@ashevche-desk.local> (raw)
In-Reply-To: <20260427-ad5686-fixes-v2-9-188e05199368@analog.com>

On Mon, Apr 27, 2026 at 12:30:16PM +0100, Rodrigo Alencar via B4 Relay wrote:

> Create ad5310_control_sync() and ad5683_control_sync() functions that
> properly consumes the mask definitions with FIELD_PREP(). This allows to
> reuse a function that updates the control register with cached values,
> without relying on confusing logic that depends on st->use_internal_vref,
> which is initialized earlier in ad5686_probe() because it is also
> applicable to the AD5686_REGMAP case, removing the need for the
> has_external_vref. The change cleans up ad5686_write_dac_powerdown() and
> ad5686_probe(), organizing the code for feature extension, e.g. gain
> control support for single-channel devices.

...

>  #define AD5310_REF_BIT_MSK			BIT(8)
> +#define AD5310_PD_MSK				GENMASK(10, 9)
>  #define AD5683_REF_BIT_MSK			BIT(12)
> +#define AD5683_PD_MSK				GENMASK(14, 13)
>  #define AD5686_REF_BIT_MSK			BIT(0)

Since now it's a set of groups of the masks, I would add blank lines to make it
clearer (from the first glance I failed to see that, then I have noticed that
there are the same names, but prefixes, made me harder to understand).

#define AD5310_REF_BIT_MSK			BIT(8)
#define AD5310_PD_MSK				GENMASK(10, 9)

#define AD5683_REF_BIT_MSK			BIT(12)
#define AD5683_PD_MSK				GENMASK(14, 13)

#define AD5686_REF_BIT_MSK			BIT(0)

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-04-27 18:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27 11:30 [PATCH v2 00/11] Fixes and cleanups for the AD5686 IIO driver Rodrigo Alencar via B4 Relay
2026-04-27 11:30 ` [PATCH v2 01/11] iio: dac: ad5686: fix ref bit initialization for single-channel parts Rodrigo Alencar via B4 Relay
2026-04-27 17:53   ` Andy Shevchenko
2026-04-27 11:30 ` [PATCH v2 02/11] iio: dac: ad5686: fix input raw value check Rodrigo Alencar via B4 Relay
2026-04-27 11:30 ` [PATCH v2 03/11] iio: dac: ad5686: acquire lock when doing powerdown control Rodrigo Alencar via B4 Relay
2026-04-27 17:56   ` Andy Shevchenko
2026-04-27 11:30 ` [PATCH v2 04/11] iio: dac: ad5686: fix powerdown control on dual-channel devices Rodrigo Alencar via B4 Relay
2026-04-27 18:02   ` Andy Shevchenko
2026-04-28 12:36     ` Rodrigo Alencar
2026-04-27 11:30 ` [PATCH v2 05/11] iio: dac: ad5686: refactor include headers Rodrigo Alencar via B4 Relay
2026-04-27 11:30 ` [PATCH v2 06/11] iio: dac: ad5686: remove redundant register definition Rodrigo Alencar via B4 Relay
2026-04-27 11:30 ` [PATCH v2 07/11] iio: dac: ad5686: drop enum id Rodrigo Alencar via B4 Relay
2026-04-27 11:30 ` [PATCH v2 08/11] iio: dac: ad5686: add of_match table to the spi driver Rodrigo Alencar via B4 Relay
2026-04-27 11:30 ` [PATCH v2 09/11] iio: dac: ad5686: add control_sync() for single-channel devices Rodrigo Alencar via B4 Relay
2026-04-27 18:09   ` Andy Shevchenko [this message]
2026-04-27 11:30 ` [PATCH v2 10/11] iio: dac: ad5686: cleanup doc header of local structs Rodrigo Alencar via B4 Relay
2026-04-27 11:30 ` [PATCH v2 11/11] iio: dac: ad5686: create bus ops struct Rodrigo Alencar via B4 Relay
2026-04-27 18:12 ` [PATCH v2 00/11] Fixes and cleanups for the AD5686 IIO driver Andy Shevchenko
2026-04-28 16:56   ` 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=ae-mTn2o0amSJ_xq@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=gregkh@suse.de \
    --cc=jic23@cam.ac.uk \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.auchter@ni.com \
    --cc=rodrigo.alencar@analog.com \
    --cc=stefan.popa@analog.com \
    /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