From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Esteban Blanc" <eblanc@baylibre.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] iio: adc: ad4030: explain rearranging raw sample data
Date: Sat, 15 Mar 2025 13:04:39 +0000 [thread overview]
Message-ID: <20250315130439.63bfa105@jic23-huawei> (raw)
In-Reply-To: <5ee9f7cebe54313dbb4054a7215a5220316bce9c.camel@gmail.com>
On Tue, 11 Mar 2025 09:30:32 +0000
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Mon, 2025-03-10 at 15:43 -0500, David Lechner wrote:
> > Add a comment explaining why the raw sample data is rearranged in the
> > in the ad4030_conversion() function. It is not so obvious from the code
> > why this is done.
> >
> > Signed-off-by: David Lechner <dlechner@baylibre.com>
> > ---
>
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
>
> (BTW, for some reason I started to send the tags without first checking the
> complete series. So I could have just replied to the cover :facepalm:
I do that sometimes when I know I might not get to the end of the series :)
Just to add to the confusion...
Series applied to the testing branch of iio.git which I'll rebase after
rc1 is available.
Thanks
Jonathan
>
> - Nuno Sá
>
> > drivers/iio/adc/ad4030.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/iio/adc/ad4030.c b/drivers/iio/adc/ad4030.c
> > index
> > 54ad74b96c9f256a67848330f875379edc828b0b..636f9f33e66af73d102722b984dc1230e141
> > 7d1e 100644
> > --- a/drivers/iio/adc/ad4030.c
> > +++ b/drivers/iio/adc/ad4030.c
> > @@ -646,6 +646,12 @@ static int ad4030_conversion(struct iio_dev *indio_dev)
> > &st->rx_data.dual.diff[0],
> > &st->rx_data.dual.diff[1]);
> >
> > + /*
> > + * If no common mode voltage channel is enabled, we can use the raw
> > + * data as is. Otherwise, we need to rearrange the data a bit to
> > match
> > + * the natural alignment of the IIO buffer.
> > + */
> > +
> > if (st->mode != AD4030_OUT_DATA_MD_16_DIFF_8_COM &&
> > st->mode != AD4030_OUT_DATA_MD_24_DIFF_8_COM)
> > return 0;
> >
>
prev parent reply other threads:[~2025-03-15 13:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 20:43 [PATCH 0/5] iio: adc: ad4030: scan_type cleanups David Lechner
2025-03-10 20:43 ` [PATCH 1/5] iio: adc: ad4030: check scan_type for error David Lechner
2025-03-11 9:26 ` Nuno Sá
2025-03-10 20:43 ` [PATCH 2/5] iio: adc: ad4030: remove some duplicate code David Lechner
2025-03-11 9:27 ` Nuno Sá
2025-03-10 20:43 ` [PATCH 3/5] iio: adc: ad4030: move setting mode to update_scan_mode David Lechner
2025-03-11 9:27 ` Nuno Sá
2025-03-10 20:43 ` [PATCH 4/5] iio: adc: ad4030: don't store scan_type in state David Lechner
2025-03-11 9:29 ` Nuno Sá
2025-03-10 20:43 ` [PATCH 5/5] iio: adc: ad4030: explain rearranging raw sample data David Lechner
2025-03-11 9:30 ` Nuno Sá
2025-03-15 13:04 ` Jonathan Cameron [this message]
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=20250315130439.63bfa105@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=dlechner@baylibre.com \
--cc=eblanc@baylibre.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noname.nuno@gmail.com \
--cc=nuno.sa@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