From: "Nuno Sá" <noname.nuno@gmail.com>
To: "Piyush Patle" <piyushpatle228@gmail.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: dac: ad3552r: use field_get() for power-down bit read
Date: Sat, 11 Apr 2026 13:49:31 +0100 [thread overview]
Message-ID: <76eda9d5a2ff1a3a4d21466d78632081dc9a5cd0.camel@gmail.com> (raw)
In-Reply-To: <20260411051650.11949-1-piyushpatle228@gmail.com>
On Sat, 2026-04-11 at 10:46 +0530, Piyush Patle wrote:
> Use field_get() for the per-channel DAC power-down bit instead of an
> open-coded mask-and-shift sequence.
>
> No functional change.
>
> Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
> ---
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> drivers/iio/dac/ad3552r.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/iio/dac/ad3552r.c b/drivers/iio/dac/ad3552r.c
> index 93c33bc3e1be..f206bba3a701 100644
> --- a/drivers/iio/dac/ad3552r.c
> +++ b/drivers/iio/dac/ad3552r.c
> @@ -167,8 +167,7 @@ static int ad3552r_read_raw(struct iio_dev *indio_dev,
> mutex_unlock(&dac->lock);
> if (err < 0)
> return err;
> - *val = !((tmp_val & AD3552R_MASK_CH_DAC_POWERDOWN(ch)) >>
> - __ffs(AD3552R_MASK_CH_DAC_POWERDOWN(ch)));
> + *val = !field_get(AD3552R_MASK_CH_DAC_POWERDOWN(ch), tmp_val);
> return IIO_VAL_INT;
> case IIO_CHAN_INFO_SCALE:
> *val = dac->ch_data[ch].scale_int;
next prev parent reply other threads:[~2026-04-11 13:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-11 5:16 [PATCH] iio: dac: ad3552r: use field_get() for power-down bit read Piyush Patle
2026-04-11 12:49 ` Nuno Sá [this message]
2026-04-19 16:57 ` Piyush Patle
2026-04-20 13:08 ` 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=76eda9d5a2ff1a3a4d21466d78632081dc9a5cd0.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=piyushpatle228@gmail.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