public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com>
Cc: "Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Cosmin Tanislav" <cosmin.tanislav@analog.com>,
	"Tomasz Duszynski" <tduszyns@gmail.com>,
	"Andreas Klinger" <ak@it-klinger.de>,
	"Petre Rodan" <petre.rodan@subdimension.ro>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH 7/8] iio: imu: inv_mpu6050: align buffer for timestamp
Date: Fri, 18 Apr 2025 16:09:22 +0100	[thread overview]
Message-ID: <20250418160922.33bffa7f@jic23-huawei> (raw)
In-Reply-To: <20250418160238.204701e7@jic23-huawei>

On Fri, 18 Apr 2025 16:02:38 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> On Fri, 18 Apr 2025 11:26:39 +0000
> Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com> wrote:
> 
> > On Thu, 17 Apr 2025 19:46:00, Jonathan Cameron wrote:  
> > > On Thu, 17 Apr 2025 20:00:05 +0300
> > > Andy Shevchenko <andy@kernel.org> wrote:
> > >     
> > > > On Thu, Apr 17, 2025 at 11:52:39AM -0500, David Lechner wrote:    
> > > > > Align the buffer used with iio_push_to_buffers_with_timestamp() to
> > > > > ensure the s64 timestamp is aligned to 8 bytes.      
> > > > 
> > > > Same question as per previous patch.
> > > >     
> > > In this case I don't think we know the position of the timestamp
> > > so a structure would be misleading.
> > > 
> > > The comment above the define certainly suggests it is variable..    
> > 
> > I confirm timestamp position is changing depending on channels enabled. It
> > can be at address 8, 16 or 24.
> > 
> > If there is only 1 sensor enabled (6 bytes of data), timestamp is at address
> > 8. 2 sensors (12 bytes of data), timestamp will be at address 16. 3 sensors
> > for MPU-9xxx (19 bytes of data), timestamp will be at address 24.
> > 
> > If the buffer is aligned on 8 bytes, it will always work without any problem.
> >   
> > > 
> > > /*
> > >  * Maximum of 6 + 6 + 2 + 7 (for MPU9x50) = 21 round up to 24 and plus 8.
> > >  * May be less if fewer channels are enabled, as long as the timestamp
> > >  * remains 8 byte aligned
> > >  */
> > > #define INV_MPU6050_OUTPUT_DATA_SIZE         32    
> > 
> > Thanks,
> > JB  
> 
> I applied this one as it stands with fixes tag and +CC stable.
> 
> Fixes: 0829edc43e0a ("iio: imu: inv_mpu6050: read the full fifo when processing data")
> 
> I thought about seeing if all the cases that are fixes are separable enough
> to take through togreg-fixes whilst the with_ts() series goes through togreg
> in parallel.  I might see if that is doable easily.
> 
I have done so and it seems fine as we didn't rename anything...

52d349884738 (HEAD -> fixes-togreg) iio: adc: ad7266: Fix potential timestamp alignment issue.
ffbc26bc91c1 iio: adc: ad7768-1: Fix insufficient alignment of timestamp.
5097eaae98e5 iio: adc: dln2: Use aligned_s64 for timestamp
1bb942287e05 iio: accel: adxl355: Make timestamp 64-bit aligned using aligned_s64
f79aeb6c631b iio: temp: maxim-thermocouple: Fix potential lack of DMA safe buffer.
6ffa69867405 iio: chemical: pms7003: use aligned_s64 for timestamp
bb49d940344b iio: chemical: sps30: use aligned_s64 for timestamp

Now on the fixes-togreg branch of iio.git.
> Jonathan



  reply	other threads:[~2025-04-18 15:15 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17 16:52 [PATCH 0/8] iio: more timestamp alignment David Lechner
2025-04-17 16:52 ` [PATCH 1/8] iio: adc: dln2-adc: use aligned_s64 for timestamp David Lechner
2025-04-17 17:28   ` Jonathan Cameron
2025-04-18  8:58   ` Nuno Sá
2025-04-18 14:44     ` Jonathan Cameron
2025-04-17 16:52 ` [PATCH 2/8] iio: adc: mt6360-adc: " David Lechner
2025-04-18  8:57   ` Nuno Sá
2025-04-18 14:45     ` Jonathan Cameron
2025-04-17 16:52 ` [PATCH 3/8] iio: addac: ad74413r: " David Lechner
2025-04-18  8:57   ` Nuno Sá
2025-04-18 14:46     ` Jonathan Cameron
2025-04-17 16:52 ` [PATCH 4/8] iio: chemical: pms7003: " David Lechner
2025-04-17 17:35   ` Jonathan Cameron
2025-04-18  8:51     ` Nuno Sá
2025-04-18 14:51       ` Jonathan Cameron
2025-04-18  8:58   ` Nuno Sá
2025-04-17 16:52 ` [PATCH 5/8] iio: chemical: sps30: " David Lechner
2025-04-17 17:36   ` Jonathan Cameron
2025-04-18 14:53     ` Jonathan Cameron
2025-04-18  8:58   ` Nuno Sá
2025-04-17 16:52 ` [PATCH 6/8] iio: imu: adis16550: align buffers " David Lechner
2025-04-17 16:59   ` Andy Shevchenko
2025-04-17 17:07     ` David Lechner
2025-04-17 17:44       ` Jonathan Cameron
2025-04-17 20:48         ` David Lechner
2025-04-18  9:17           ` Nuno Sá
2025-04-18 14:55           ` Jonathan Cameron
2025-04-17 16:52 ` [PATCH 7/8] iio: imu: inv_mpu6050: align buffer " David Lechner
2025-04-17 17:00   ` Andy Shevchenko
2025-04-17 17:46     ` Jonathan Cameron
2025-04-18 11:26       ` Jean-Baptiste Maneyrol
2025-04-18 15:02         ` Jonathan Cameron
2025-04-18 15:09           ` Jonathan Cameron [this message]
2025-04-17 16:52 ` [PATCH 8/8] iio: pressure: mprls0025pa: use aligned_s64 " David Lechner
2025-04-17 17:48   ` Jonathan Cameron
2025-04-18  9:00   ` Nuno Sá
2025-04-17 17:01 ` [PATCH 0/8] iio: more timestamp alignment Andy Shevchenko
2025-04-17 17:16   ` David Lechner
2025-04-17 17:24     ` Andy Shevchenko
2025-04-17 17:47   ` Jonathan Cameron
2025-04-17 18:05     ` Andy Shevchenko
2025-04-18 14:57       ` Jonathan Cameron
2025-04-17 17:30 ` Jonathan Cameron
2025-04-18 15:12 ` 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=20250418160922.33bffa7f@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jean-Baptiste.Maneyrol@tdk.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=ak@it-klinger.de \
    --cc=andy@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=cosmin.tanislav@analog.com \
    --cc=dlechner@baylibre.com \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=petre.rodan@subdimension.ro \
    --cc=tduszyns@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