<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/iio/buffer, branch linux-5.10.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>iio: buffer-dmaengine: fix releasing dma channel on error</title>
<updated>2024-09-12T09:06:50+00:00</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2024-07-23T16:32:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f3a54c27bacd07b21ac8c79ce21d9632d1a8e008'/>
<id>f3a54c27bacd07b21ac8c79ce21d9632d1a8e008</id>
<content type='text'>
commit 84c65d8008764a8fb4e627ff02de01ec4245f2c4 upstream.

If dma_get_slave_caps() fails, we need to release the dma channel before
returning an error to avoid leaking the channel.

Fixes: 2d6ca60f3284 ("iio: Add a DMAengine framework based buffer")
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
Link: https://patch.msgid.link/20240723-iio-fix-dmaengine-free-on-error-v1-1-2c7cbc9b92ff@baylibre.com
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 84c65d8008764a8fb4e627ff02de01ec4245f2c4 upstream.

If dma_get_slave_caps() fails, we need to release the dma channel before
returning an error to avoid leaking the channel.

Fixes: 2d6ca60f3284 ("iio: Add a DMAengine framework based buffer")
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
Link: https://patch.msgid.link/20240723-iio-fix-dmaengine-free-on-error-v1-1-2c7cbc9b92ff@baylibre.com
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: buffer: Kconfig: add title for IIO_TRIGGERED_BUFFER symbol</title>
<updated>2020-09-29T16:27:08+00:00</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2020-09-24T11:17:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c8283ba8e28c6863d0b8703a4e567d6555c43ac2'/>
<id>c8283ba8e28c6863d0b8703a4e567d6555c43ac2</id>
<content type='text'>
For some embedded systems, a workflow involving external kernel modules
that implement IIO devices is more practical than working with in-tree
sources.

Kconfig symbols without any titles do not show up in menuconfig, and as
such are more difficult to configure granularly, as they need to be
selected by potentially unused/un-needed drivers.

This change adds a title to the IIO_TRIGGERED_BUFFER Kconfig symbol.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Link: https://lore.kernel.org/r/20200924111758.196367-4-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For some embedded systems, a workflow involving external kernel modules
that implement IIO devices is more practical than working with in-tree
sources.

Kconfig symbols without any titles do not show up in menuconfig, and as
such are more difficult to configure granularly, as they need to be
selected by potentially unused/un-needed drivers.

This change adds a title to the IIO_TRIGGERED_BUFFER Kconfig symbol.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Link: https://lore.kernel.org/r/20200924111758.196367-4-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: dma-buffer: Kconfig: Provide titles for IIO DMA Kconfig symbols</title>
<updated>2020-09-29T16:27:08+00:00</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2020-09-24T11:17:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3cd137f591e18588f730a2c53f291d65382050d0'/>
<id>3cd137f591e18588f730a2c53f291d65382050d0</id>
<content type='text'>
For some embedded systems, a workflow involving external kernel modules
that implement IIO devices is more practical than working with in-tree
sources.

Kconfig symbols without any titles do not show up in menuconfig, and as
such are more difficult to configure granularly, as they need to be
selected by potentially unused/un-needed drivers.

This change adds titles to the IIO DMA Kconfig symbols to address this.

This change also updates DMAengine -&gt; DMAEngine, which is the
correct/nitpick-y name of the framework.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Link: https://lore.kernel.org/r/20200924111758.196367-2-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For some embedded systems, a workflow involving external kernel modules
that implement IIO devices is more practical than working with in-tree
sources.

Kconfig symbols without any titles do not show up in menuconfig, and as
such are more difficult to configure granularly, as they need to be
selected by potentially unused/un-needed drivers.

This change adds titles to the IIO DMA Kconfig symbols to address this.

This change also updates DMAengine -&gt; DMAEngine, which is the
correct/nitpick-y name of the framework.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Link: https://lore.kernel.org/r/20200924111758.196367-2-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: buffer-dmaengine: remove non managed alloc/free</title>
<updated>2020-09-29T16:27:06+00:00</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2020-09-23T12:18:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=25918a9c641c3c73ae94354605860c06fd73a05e'/>
<id>25918a9c641c3c73ae94354605860c06fd73a05e</id>
<content type='text'>
This is to encourage the use of devm_iio_dmaengine_buffer_alloc().
Currently the managed version of the DMAEngine buffer alloc is the only
function used from this part of the framework.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Link: https://lore.kernel.org/r/20200923121810.944075-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is to encourage the use of devm_iio_dmaengine_buffer_alloc().
Currently the managed version of the DMAEngine buffer alloc is the only
function used from this part of the framework.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Link: https://lore.kernel.org/r/20200923121810.944075-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: buffer-dmaengine: adjust `bytes_used` with residue info</title>
<updated>2020-09-03T18:40:58+00:00</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2020-08-26T05:20:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=65e02d0b5039f393c1918e992322ebbb5f077490'/>
<id>65e02d0b5039f393c1918e992322ebbb5f077490</id>
<content type='text'>
A transfer may fall shorter than the bytes in the block.
This information is available in the residue from the DMA engine, so we can
compute actual `bytes_used` with that by subtracting the residue.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Link: https://lore.kernel.org/r/20200826052011.13348-1-lars@metafoo.de
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A transfer may fall shorter than the bytes in the block.
This information is available in the residue from the DMA engine, so we can
compute actual `bytes_used` with that by subtracting the residue.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Link: https://lore.kernel.org/r/20200826052011.13348-1-lars@metafoo.de
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: Move attach/detach of the poll func to the core</title>
<updated>2020-06-20T16:34:44+00:00</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2020-05-25T11:38:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f11d59d87b8622d4cf9f856c0b8029fb030d8612'/>
<id>f11d59d87b8622d4cf9f856c0b8029fb030d8612</id>
<content type='text'>
All devices using a triggered buffer need to attach and detach the trigger
to the device in order to properly work. Instead of doing this in each and
every driver by hand move this into the core.

At this point in time, all drivers should have been resolved to
attach/detach the poll-function in the same order.

This patch removes all explicit calls of iio_triggered_buffer_postenable()
&amp; iio_triggered_buffer_predisable() in all drivers, since the core handles
now the pollfunc attach/detach.

The more peculiar change is for the 'at91-sama5d2_adc' driver, since it's
not immediately obvious that removing the hooks doesn't break anything.
Eugen was able to test on at91-sama5d2-adc driver, sama5d2-xplained board.
All seems to be fine.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Tested-by: Eugen Hristev &lt;eugen.hristev@microchip.com&gt; #for at91-sama5d2-adc
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All devices using a triggered buffer need to attach and detach the trigger
to the device in order to properly work. Instead of doing this in each and
every driver by hand move this into the core.

At this point in time, all drivers should have been resolved to
attach/detach the poll-function in the same order.

This patch removes all explicit calls of iio_triggered_buffer_postenable()
&amp; iio_triggered_buffer_predisable() in all drivers, since the core handles
now the pollfunc attach/detach.

The more peculiar change is for the 'at91-sama5d2_adc' driver, since it's
not immediately obvious that removing the hooks doesn't break anything.
Eugen was able to test on at91-sama5d2-adc driver, sama5d2-xplained board.
All seems to be fine.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Tested-by: Eugen Hristev &lt;eugen.hristev@microchip.com&gt; #for at91-sama5d2-adc
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: buffer: drop devm_iio_kfifo_free() API call</title>
<updated>2020-04-19T15:56:38+00:00</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2020-02-27T13:52:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=608d98a2c4a0a72c15fa16ef1542df67afe41fee'/>
<id>608d98a2c4a0a72c15fa16ef1542df67afe41fee</id>
<content type='text'>
It's unused so far, so it can be removed. Also makes sense to remove it
to discourage weird uses of this call during review.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's unused so far, so it can be removed. Also makes sense to remove it
to discourage weird uses of this call during review.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: buffer: drop devm_iio_hw_consumer_free() API call</title>
<updated>2020-04-19T15:56:37+00:00</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2020-02-27T13:52:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=05c09e3cee0aa97a51c2eac1a2f453cac0ba5683'/>
<id>05c09e3cee0aa97a51c2eac1a2f453cac0ba5683</id>
<content type='text'>
It's unused so far, so it can be removed. Also makes sense to remove it
to discourage weird uses of this call during review.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's unused so far, so it can be removed. Also makes sense to remove it
to discourage weird uses of this call during review.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: core: drop devm_iio_triggered_buffer_cleanup() API call</title>
<updated>2020-04-19T15:56:35+00:00</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2020-02-27T13:52:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=666e4de43d942fbe0d7f1d9dbc993f5b5c81760c'/>
<id>666e4de43d942fbe0d7f1d9dbc993f5b5c81760c</id>
<content type='text'>
It's unused so far, so it can be removed. Also makes sense to remove it
to discourage weird uses of this call during review.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's unused so far, so it can be removed. Also makes sense to remove it
to discourage weird uses of this call during review.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes</title>
<updated>2020-04-19T15:56:31+00:00</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2020-04-01T16:57:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c0ae3591d900c0d1a54a86666c2102dd39b3d4f7'/>
<id>c0ae3591d900c0d1a54a86666c2102dd39b3d4f7</id>
<content type='text'>
The IIO DMA buffer is a DMA buffer implementation. As such it should
include buffer_impl.h rather than buffer.h.

The include to buffer.h in buffer-dma.h should be buffer_impl.h so it has
access to the struct iio_buffer definition. The code currently only works
because all places that use buffer-dma.h include buffer_impl.h before it.

The include to buffer.h in industrialio-buffer-dma.c  can be removed since
those file does not reference any of buffer consumer functions.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Tested-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The IIO DMA buffer is a DMA buffer implementation. As such it should
include buffer_impl.h rather than buffer.h.

The include to buffer.h in buffer-dma.h should be buffer_impl.h so it has
access to the struct iio_buffer definition. The code currently only works
because all places that use buffer-dma.h include buffer_impl.h before it.

The include to buffer.h in industrialio-buffer-dma.c  can be removed since
those file does not reference any of buffer consumer functions.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Tested-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
