[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220731170743.238e0e8c@jic23-huawei>
Date: Sun, 31 Jul 2022 17:07:43 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Angel Iglesias <ang.iglesiasg@...il.com>,
linux-iio <linux-iio@...r.kernel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Paul Cercueil <paul@...pouillou.net>,
Ulf Hansson <ulf.hansson@...aro.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 3/5] iio: pressure: bmp280: Fix alignment for DMA
safety
On Mon, 25 Jul 2022 23:08:47 +0200
Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> On Sat, Jul 23, 2022 at 7:40 PM Angel Iglesias <ang.iglesiasg@...il.com> wrote:
> >
> > Adds a DMA-safe buffer to driver data struct to store raw data from sensor
> >
> > Updated calibration read functions to use DMA-safe buffers as well.
> > In this case, as calibration data is only read at sensor initialization,
> > the buffers are allocated with kmalloc and freed after being processed.
>
> > Suggested-by: Jonathan Cameron <jic23@...nel.org>
>
> Jonathan, maybe it's easier to fix in regmap once for all (something
> like a new flag there dma_safe)? Also a side note: i2c doesn't need
> that, since it has its own implementation.
Possibly... Not something I want to tie up with an individual driver though
as it might take a while and be (somewhat) controversial. Nice idea though as, if
a bounce buffer is needed for a particular regmap operation it can implement one
and when not, it can elide that step and just use the provided buffer directly.
Jonathan
>
> P.S. Use sizeof() in regmap calls where it's appropriate.
>
Powered by blists - more mailing lists