From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá" <nuno.sa@analog.com>
Cc: <linux-iio@vger.kernel.org>,
Alexandru Ardelean <alexandru.ardelean@analog.com>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH 0/4] Refactor ADIS Burst Mode
Date: Sat, 19 Sep 2020 14:21:48 +0100 [thread overview]
Message-ID: <20200919142148.5ed5ff9d@archlinux> (raw)
In-Reply-To: <20200917155223.218500-1-nuno.sa@analog.com>
On Thu, 17 Sep 2020 17:52:19 +0200
Nuno Sá <nuno.sa@analog.com> wrote:
> This series refactors the ADIS burst mode. The 2 main ideas of the
> refactor are:
>
> 1. As discussed in previous patches, there's no point in
> enabling/disabling burst mode at runtime. Hence, we can drop the `en`
> variable.
> 2. Replace the `extra_len` by `burst_len` where users have now to
> explicitly define the size of the burst buffer. The point is to remove
> the following line from the lib:
>
> ```
> /* All but the timestamp channel */
> burst_length = (indio_dev->num_channels - 1) * sizeof(u16);
> ```
>
> The library should not assume that a timestamp channel is defined.
> Moreover, most parts also include some diagnostic data, crc, etc.. in
> the burst buffer that needed to be included in an `extra_len` variable
> which is not that nice. On top of this, some devices already start to
> have some 32bit size channels ...
>
> While doing this (and mainly when looking at the adis16400) drivers it
> felt that the burst variables belong to the per chip `adis_data`
> structure. As seen in the adis16400 driver, some drivers might support
> multiple devices with different burst sizes.
>
> For now, it does not feel necessary to wrap these variables in a
> `adis_burst` structure but I don't see any problem in doing so if
> required...
Looks good to me as it stands.
Series applied to the togreg branch of iio.git.
Thanks,
Jonathan
>
> Nuno Sá (4):
> iio: adis: Move burst mode into adis_data
> iio: adis16400: Drop adis_burst usage
> iio: adis16475: Drop adis_burst usage
> iio: adis. Drop adis_burst struct
>
> drivers/iio/imu/adis16400.c | 32 +++++++++++++-------------------
> drivers/iio/imu/adis16475.c | 18 +++---------------
> drivers/iio/imu/adis_buffer.c | 12 +++++-------
> include/linux/iio/imu/adis.h | 26 +++++++++-----------------
> 4 files changed, 30 insertions(+), 58 deletions(-)
>
prev parent reply other threads:[~2020-09-19 13:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 15:52 [PATCH 0/4] Refactor ADIS Burst Mode Nuno Sá
2020-09-17 15:52 ` [PATCH 1/4] iio: adis: Move burst mode into adis_data Nuno Sá
2020-09-17 15:52 ` [PATCH 2/4] iio: adis16400: Drop adis_burst usage Nuno Sá
2020-09-17 15:52 ` [PATCH 3/4] iio: adis16475: " Nuno Sá
2020-09-17 15:52 ` [PATCH 4/4] iio: adis. Drop adis_burst struct Nuno Sá
2020-09-19 13:21 ` 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=20200919142148.5ed5ff9d@archlinux \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=alexandru.ardelean@analog.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=pmeerw@pmeerw.net \
/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