mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Jonathan Santos <Jonathan.Santos@analog.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	lars@metafoo.de, Michael.Hennerich@analog.com,
	dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	jonath4nns@gmail.com
Subject: Re: [PATCH v2 4/4] iio: adc: ad7768-1: add support for SPI offload
Date: Sat, 28 Feb 2026 19:20:44 +0000	[thread overview]
Message-ID: <20260228192044.42d3a51b@jic23-huawei> (raw)
In-Reply-To: <aZxaMPWtxwCvmtdd@smile.fi.intel.com>

On Mon, 23 Feb 2026 15:46:24 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Mon, Feb 23, 2026 at 08:59:53AM -0300, Jonathan Santos wrote:
> > The AD7768-1 family supports sampling rates up to 1 MSPS, which exceeds
> > the capabilities of conventional triggered buffer operations due to SPI
> > transaction overhead and interrupt latency.
> > 
> > Add SPI offload support to enable hardware-accelerated data acquisition
> > that bypasses software SPI transactions using continuous data streaming.  
> 
> ...
> 
> > +static int ad7768_spi_offload_probe(struct iio_dev *indio_dev,
> > +				    struct ad7768_state *st)
> > +{
> > +	struct device *dev = &st->spi->dev;
> > +	struct spi_offload_trigger_info trigger_info = {
> > +		.fwnode = dev_fwnode(dev),
> > +		.ops = &ad7768_offload_trigger_ops,
> > +		.priv = st,
> > +	};
> > +	struct dma_chan *rx_dma;
> > +	int ret;
> > +
> > +	ret = devm_spi_offload_trigger_register(dev, &trigger_info);
> > +	if (ret)
> > +		return dev_err_probe(dev, ret,  "failed to register offload trigger\n");  
> 
> Double space...
> (do not resend just for addressing this)
Tidied up.

Series applied to the togreg branch of iio.git and for now pushed out as testing

Thanks!
Jonathan

> 
> > +	st->offload_trigger = devm_spi_offload_trigger_get(dev, st->offload,
> > +							   SPI_OFFLOAD_TRIGGER_DATA_READY);
> > +	if (IS_ERR(st->offload_trigger))
> > +		return dev_err_probe(dev, PTR_ERR(st->offload_trigger),
> > +				     "failed to get offload trigger\n");
> > +
> > +	rx_dma = devm_spi_offload_rx_stream_request_dma_chan(dev, st->offload);
> > +	if (IS_ERR(rx_dma))
> > +		return dev_err_probe(dev, PTR_ERR(rx_dma), "failed to get offload RX DMA\n");
> > +
> > +	ret = devm_iio_dmaengine_buffer_setup_with_handle(dev, indio_dev, rx_dma,
> > +							  IIO_BUFFER_DIRECTION_IN);
> > +	if (ret)
> > +		return dev_err_probe(dev, ret, "failed to setup offload RX DMA\n");
> > +
> > +	indio_dev->setup_ops = &ad7768_offload_buffer_ops;
> > +
> > +	return 0;
> > +}  
> 


  reply	other threads:[~2026-02-28 19:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 11:59 [PATCH v2 0/4] iio: adc: ad7768-1: add SPI offload support and fixes Jonathan Santos
2026-02-23 11:59 ` [PATCH v2 1/4] iio: adc: ad7768-1: fix one-shot mode data acquisition Jonathan Santos
2026-02-23 11:59 ` [PATCH v2 2/4] iio: adc: ad7768-1: remove switch to one-shot mode Jonathan Santos
2026-02-23 11:59 ` [PATCH v2 3/4] iio: adc: ad7768-1: disable IRQ autoenable Jonathan Santos
2026-02-23 11:59 ` [PATCH v2 4/4] iio: adc: ad7768-1: add support for SPI offload Jonathan Santos
2026-02-23 13:46   ` Andy Shevchenko
2026-02-28 19:20     ` Jonathan Cameron [this message]
2026-02-28 17:18   ` David Lechner
2026-03-01 12:10     ` Jonathan Cameron
2026-02-28 17:19 ` [PATCH v2 0/4] iio: adc: ad7768-1: add SPI offload support and fixes David Lechner

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=20260228192044.42d3a51b@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jonathan.Santos@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jonath4nns@gmail.com \
    --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

Powered by JetHome