<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/iio, branch v6.15.1</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.15.1</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.15.1'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2025-02-22T12:23:49Z</updated>
<entry>
<title>iio: imu: adis: Add DIAG_STAT register</title>
<updated>2025-02-22T12:23:49Z</updated>
<author>
<name>Robert Budai</name>
<email>robert.budai@analog.com</email>
</author>
<published>2025-02-17T10:57:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9fa98d94131806cae0441d05213d36da480d7389'/>
<id>urn:sha1:9fa98d94131806cae0441d05213d36da480d7389</id>
<content type='text'>
Some devices may have more than 16 bits of status. This patch allows the
user to specify the size of the DIAG_STAT register. It defaults to 2 if
not specified. This is mainly for backward compatibility.

Co-developed-by: Ramona Gradinariu &lt;ramona.gradinariu@analog.com&gt;
Signed-off-by: Ramona Gradinariu &lt;ramona.gradinariu@analog.com&gt;
Co-developed-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
Signed-off-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
Co-developed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Robert Budai &lt;robert.budai@analog.com&gt;
Link: https://patch.msgid.link/20250217105753.605465-4-robert.budai@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: imu: adis: Add reset to custom ops</title>
<updated>2025-02-22T12:23:19Z</updated>
<author>
<name>Robert Budai</name>
<email>robert.budai@analog.com</email>
</author>
<published>2025-02-17T10:57:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7f15d7a7d12dbcb4a846ca19d9565e0c11ea6694'/>
<id>urn:sha1:7f15d7a7d12dbcb4a846ca19d9565e0c11ea6694</id>
<content type='text'>
This patch allows the custom definition of reset functionality for adis object.
It is useful in cases where the driver does not need to sleep after the reset
since it is handled by the library.

Co-developed-by: Ramona Gradinariu &lt;ramona.gradinariu@analog.com&gt;
Signed-off-by: Ramona Gradinariu &lt;ramona.gradinariu@analog.com&gt;
Co-developed-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
Signed-off-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
Co-developed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Robert Budai &lt;robert.budai@analog.com&gt;
Link: https://patch.msgid.link/20250217105753.605465-3-robert.budai@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: imu: adis: Add custom ops struct</title>
<updated>2025-02-22T12:22:45Z</updated>
<author>
<name>Robert Budai</name>
<email>robert.budai@analog.com</email>
</author>
<published>2025-02-17T10:57:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3b29bcee8f6f703a5952b85fc2ffcbcfb0862db4'/>
<id>urn:sha1:3b29bcee8f6f703a5952b85fc2ffcbcfb0862db4</id>
<content type='text'>
This patch introduces a custom ops struct letting users define custom read and
write functions. Some adis devices might define a completely different spi
protocol from the one used in the default implementation.

Co-developed-by: Ramona Gradinariu &lt;ramona.gradinariu@analog.com&gt;
Signed-off-by: Ramona Gradinariu &lt;ramona.gradinariu@analog.com&gt;
Co-developed-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
Signed-off-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
Co-developed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Robert Budai &lt;robert.budai@analog.com&gt;
Link: https://patch.msgid.link/20250217105753.605465-2-robert.budai@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: Drop iio_device_claim_direct_scoped() and related infrastructure</title>
<updated>2025-02-17T13:04:09Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2025-02-09T18:06:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4c571885898c5c98934d086f2ab11b5e27e4f41f'/>
<id>urn:sha1:4c571885898c5c98934d086f2ab11b5e27e4f41f</id>
<content type='text'>
Scoped conditional automated cleanup turned out to be harder to work
with than expected. Despite several attempts to find a better solution
non have surfaced. As such rip it out of the IIO code.

Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Nuno Sa &lt;nuno.sa@analog.com&gt;
Link: https://patch.msgid.link/20250209180624.701140-28-jic23@kernel.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: core: Rework claim and release of direct mode to work with sparse.</title>
<updated>2025-02-17T12:57:13Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2025-02-09T18:05:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d795e38df4b7ebac1072bbf7d8a5500c1ea83332'/>
<id>urn:sha1:d795e38df4b7ebac1072bbf7d8a5500c1ea83332</id>
<content type='text'>
Initial thought was to do something similar to __cond_lock()

	do_iio_device_claim_direct_mode(iio_dev) ? : ({ __acquire(iio_dev); 0; })
+ Appropriate static inline iio_device_release_direct_mode()

However with that, sparse generates false positives. E.g.

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c:1811:17: warning: context imbalance in 'st_lsm6dsx_read_raw' - unexpected unlock

So instead, this patch rethinks the return type and makes it more
'conditional lock like' (which is part of what is going on under the hood
anyway) and return a boolean - true for successfully acquired, false for
did not acquire.

To allow a migration path given the rework is now non trivial, take a leaf
out of the naming of the conditional guard we currently have for IIO
device direct mode and drop the _mode postfix from the new functions giving
iio_device_claim_direct() and iio_device_release_direct()

Whilst the kernel supports __cond_acquires() upstream sparse does not
yet do so.  Hence rely on sparse expanding a static inline wrapper
to explicitly see whether __acquire() is called.

Note that even with the solution here, sparse sometimes gives false
positives. However in the few cases seen they were complex code
structures that benefited from simplification anyway.

Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Nuno Sa &lt;nuno.sa@analog.com&gt;
Link: https://patch.msgid.link/20250209180624.701140-2-jic23@kernel.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: backend: add API for oversampling</title>
<updated>2025-02-16T15:12:11Z</updated>
<author>
<name>Antoniu Miclaus</name>
<email>antoniu.miclaus@analog.com</email>
</author>
<published>2025-02-14T13:19:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=22894e0be908791e3df011cdfac02589c2f340bd'/>
<id>urn:sha1:22894e0be908791e3df011cdfac02589c2f340bd</id>
<content type='text'>
Add backend support for setting oversampling ratio.

Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Signed-off-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
Link: https://patch.msgid.link/20250214131955.31973-4-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: backend: add support for data size set</title>
<updated>2025-02-16T15:11:55Z</updated>
<author>
<name>Antoniu Miclaus</name>
<email>antoniu.miclaus@analog.com</email>
</author>
<published>2025-02-14T13:19:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fc3fdb835eebb2ba88c6fdbf2c8b9eae1ceab106'/>
<id>urn:sha1:fc3fdb835eebb2ba88c6fdbf2c8b9eae1ceab106</id>
<content type='text'>
Add backend support for setting the data size used.
This setting can be adjusted within the IP cores interfacing devices.

Reviewed-by: Nuno Sa &lt;nuno.sa@analog.com&gt;
Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Signed-off-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
Link: https://patch.msgid.link/20250214131955.31973-3-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: backend: add API for interface get</title>
<updated>2025-02-16T15:11:25Z</updated>
<author>
<name>Antoniu Miclaus</name>
<email>antoniu.miclaus@analog.com</email>
</author>
<published>2025-02-14T13:19:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4018ab42636cbea1bcf4fd69afc31d51cd905ba0'/>
<id>urn:sha1:4018ab42636cbea1bcf4fd69afc31d51cd905ba0</id>
<content type='text'>
Add backend support for obtaining the interface type used.

Reviewed-by: Nuno Sa &lt;nuno.sa@analog.com&gt;
Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Signed-off-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
Link: https://patch.msgid.link/20250214131955.31973-2-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: buffer-dmaengine: add devm_iio_dmaengine_buffer_setup_with_handle()</title>
<updated>2025-02-10T18:47:49Z</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2025-02-07T20:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=79f24971b4ffbdba9733365e298982c45338e6b1'/>
<id>urn:sha1:79f24971b4ffbdba9733365e298982c45338e6b1</id>
<content type='text'>
Add a new devm_iio_dmaengine_buffer_setup_with_handle() function to
handle cases where the DMA channel is managed by the caller rather than
being requested and released by the iio_dmaengine module.

Reviewed-by: Nuno Sa &lt;nuno.sa@analog.com&gt;
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
Link: https://patch.msgid.link/20250207-dlech-mainline-spi-engine-offload-2-v8-9-e48a489be48c@baylibre.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: buffer-dmaengine: split requesting DMA channel from allocating buffer</title>
<updated>2025-02-10T18:47:29Z</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2025-02-07T20:09:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4fe7fd17fe66a5e243c1de7ff32c29fac7039b8d'/>
<id>urn:sha1:4fe7fd17fe66a5e243c1de7ff32c29fac7039b8d</id>
<content type='text'>
Refactor the IIO dmaengine buffer code to split requesting the DMA
channel from allocating the buffer. We want to be able to add a new
function where the IIO device driver manages the DMA channel, so these
two actions need to be separate.

To do this, calling dma_request_chan() is moved from
iio_dmaengine_buffer_alloc() to iio_dmaengine_buffer_setup_ext(). A new
__iio_dmaengine_buffer_setup_ext() helper function is added to simplify
error unwinding and will also be used by a new function in a later
patch.

iio_dmaengine_buffer_free() now only frees the buffer and does not
release the DMA channel. A new iio_dmaengine_buffer_teardown() function
is added to unwind everything done in iio_dmaengine_buffer_setup_ext().
This keeps things more symmetrical with obvious pairs alloc/free and
setup/teardown.

Calling dma_get_slave_caps() in iio_dmaengine_buffer_alloc() is moved so
that we can avoid any gotos for error unwinding.

Reviewed-by: Nuno Sa &lt;nuno.sa@analog.com&gt;
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
Link: https://patch.msgid.link/20250207-dlech-mainline-spi-engine-offload-2-v8-8-e48a489be48c@baylibre.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
