linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Angel Iglesias <ang.iglesiasg@gmail.com>,
	linux-iio <linux-iio@vger.kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Paul Cercueil <paul@crapouillou.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 3/5] iio: pressure: bmp280: Fix alignment for DMA safety
Date: Sun, 31 Jul 2022 17:07:43 +0100	[thread overview]
Message-ID: <20220731170743.238e0e8c@jic23-huawei> (raw)
In-Reply-To: <CAHp75VfwhUEdpkRKNme_rVn=bxEgV+p+RK4G961oVnikB35vCA@mail.gmail.com>

On Mon, 25 Jul 2022 23:08:47 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Sat, Jul 23, 2022 at 7:40 PM Angel Iglesias <ang.iglesiasg@gmail.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@kernel.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.
> 


  reply	other threads:[~2022-07-31 15:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23 17:36 [PATCH v4 0/5] Add support for pressure sensor Bosch BMP380 Angel Iglesias
2022-07-23 17:38 ` [PATCH v4 1/5] dt-bindings: iio: pressure: bmp085: Add BMP380 compatible string Angel Iglesias
2022-07-23 17:38 ` [PATCH v4 2/5] iio: pressure: bmp280: simplify driver initialization logic Angel Iglesias
2022-07-25 21:05   ` Andy Shevchenko
2022-07-23 17:39 ` [PATCH v4 3/5] iio: pressure: bmp280: Fix alignment for DMA safety Angel Iglesias
2022-07-25 21:08   ` Andy Shevchenko
2022-07-31 16:07     ` Jonathan Cameron [this message]
2022-07-31 16:13   ` Jonathan Cameron
2022-08-01  8:08     ` Angel Iglesias
2022-07-23 17:39 ` [PATCH v4 4/5] iio: pressure: bmp280: Add support for BMP380 sensor family Angel Iglesias
2022-07-23 22:50   ` kernel test robot
2022-07-24  0:02   ` kernel test robot
2022-07-24  0:22   ` kernel test robot
2022-07-25 21:15   ` Andy Shevchenko
2022-08-01  7:49     ` Angel Iglesias
2022-07-31 16:16   ` Jonathan Cameron
2022-08-01  7:57     ` Angel Iglesias
2022-07-23 17:40 ` [PATCH v4 5/5] iio: pressure: bmp280: Add more tunable config parameters for BMP380 Angel Iglesias
2022-07-25 21:19   ` Andy Shevchenko

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=20220731170743.238e0e8c@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=ang.iglesiasg@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@crapouillou.net \
    --cc=rafael.j.wysocki@intel.com \
    --cc=ulf.hansson@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).