public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Antoniu Miclaus" <antoniu.miclaus@analog.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iio: amplifiers: ada4250: use DMA-safe memory for regmap_bulk_read()
Date: Sat, 19 Apr 2025 13:07:25 -0500	[thread overview]
Message-ID: <9cdc7053-ae22-4ad5-801c-46df7398ebf9@baylibre.com> (raw)
In-Reply-To: <aAO7Lw13xrEGmZLL@smile.fi.intel.com>

On 4/19/25 10:03 AM, Andy Shevchenko wrote:
> On Fri, Apr 18, 2025 at 02:09:04PM -0500, David Lechner wrote:
>> On 4/18/25 1:58 PM, Andy Shevchenko wrote:
>>> пʼятниця, 18 квітня 2025 р. David Lechner <dlechner@baylibre.com <mailto:dlechner@baylibre.com>> пише:
>>>
>>>     Use DMA-safe memory instead of stack-allocated memory for the call to
>>>     regmap_bulk_read() in the ada4250_init() function as this could be used
>>>     directly by a SPI controller.
>>>
>>> Sorry, but can you elaborate more on this? If driver doesn’t override the
>>> callbacks the regmap SPI uses spi_write_then_read() which is supposed to be
>>> dma safe. 
>>
>> Ah, I didn't dig that far down. Will send a new patch that just cleans up the
>> unnecessary alignment and unaligned call.
> 
> But do you have a real life issue with that? Coincidentally we discussed
> similar case in another driver with colleague of mine, and he insists that it
> might be still broken (somewhere).
> 

Some drivers that use regmap with SPI implement their own read and write
callbacks if the default one doesn't work, so maybe something like that?

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

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18 18:16 [PATCH] iio: amplifiers: ada4250: use DMA-safe memory for regmap_bulk_read() David Lechner
     [not found] ` <CAHp75Vdxdbqu6qkbuo5y4jADOH_h9Re6m8icSj3Je4hnVsha0g@mail.gmail.com>
2025-04-18 19:09   ` David Lechner
2025-04-19 15:03     ` Andy Shevchenko
2025-04-19 18:07       ` David Lechner [this message]
2025-04-21 10:57         ` Jonathan Cameron
2025-04-21 13:00           ` Nuno Sá
2025-04-21 13:56             ` Jonathan Cameron
2025-05-25 17:31               ` Jonathan Cameron
2025-04-21 10:59 ` 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=9cdc7053-ae22-4ad5-801c-46df7398ebf9@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=antoniu.miclaus@analog.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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