<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/linux/iio/iio-opaque.h, branch linux-6.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.17.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.17.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-12-07T17:52:44Z</updated>
<entry>
<title>iio: core: fix doc reference to iio_push_to_buffers_with_ts_unaligned</title>
<updated>2024-12-07T17:52:44Z</updated>
<author>
<name>Javier Carrasco</name>
<email>javier.carrasco.cruz@gmail.com</email>
</author>
<published>2024-11-25T21:16:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e895f2edfe4820b671c700ccc17be35b1de3d295'/>
<id>urn:sha1:e895f2edfe4820b671c700ccc17be35b1de3d295</id>
<content type='text'>
Use the right name of the function, which is defined in
drivers/iio/industrialio-buffer.c

Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Link: https://patch.msgid.link/20241125-iio_memset_scan_holes-v1-11-0cb6e98d895c@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: Convert unsigned to unsigned int</title>
<updated>2024-10-12T11:41:24Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2024-10-10T18:15:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8fa714ca334e0880665a14fed13b16e3e01a67b2'/>
<id>urn:sha1:8fa714ca334e0880665a14fed13b16e3e01a67b2</id>
<content type='text'>
Simple type conversion with no functional change implied.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://patch.msgid.link/20241010181535.3083262-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: core: move 'mlock' to 'struct iio_dev_opaque'</title>
<updated>2022-11-23T19:44:00Z</updated>
<author>
<name>Nuno Sá</name>
<email>nuno.sa@analog.com</email>
</author>
<published>2022-10-12T15:16:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=16afe125b53f88b855d2713c8ba253d905dcf3cc'/>
<id>urn:sha1:16afe125b53f88b855d2713c8ba253d905dcf3cc</id>
<content type='text'>
Now that there are no more users accessing 'mlock' directly, we can move
it to the iio_dev private structure. Hence, it's now explicit that new
driver's should not directly use this lock.

Signed-off-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20221012151620.1725215-5-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: Use per-device lockdep class for mlock</title>
<updated>2022-09-05T17:08:42Z</updated>
<author>
<name>Vincent Whitchurch</name>
<email>vincent.whitchurch@axis.com</email>
</author>
<published>2022-08-29T09:18:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2bc9cd66eb25d0fefbb081421d6586495e25840e'/>
<id>urn:sha1:2bc9cd66eb25d0fefbb081421d6586495e25840e</id>
<content type='text'>
If an IIO driver uses callbacks from another IIO driver and calls
iio_channel_start_all_cb() from one of its buffer setup ops, then
lockdep complains due to the lock nesting, as in the below example with
lmp91000.

Since the locks are being taken on different IIO devices, there is no
actual deadlock.  Fix the warning by telling lockdep to use a different
class for each iio_device.

 ============================================
 WARNING: possible recursive locking detected
 --------------------------------------------
 python3/23 is trying to acquire lock:
 (&amp;indio_dev-&gt;mlock){+.+.}-{3:3}, at: iio_update_buffers

 but task is already holding lock:
 (&amp;indio_dev-&gt;mlock){+.+.}-{3:3}, at: enable_store

 other info that might help us debug this:
  Possible unsafe locking scenario:

        CPU0
        ----
   lock(&amp;indio_dev-&gt;mlock);
   lock(&amp;indio_dev-&gt;mlock);

  *** DEADLOCK ***

  May be due to missing lock nesting notation

 5 locks held by python3/23:
  #0: (sb_writers#5){.+.+}-{0:0}, at: ksys_write
  #1: (&amp;of-&gt;mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter
  #2: (kn-&gt;active#14){.+.+}-{0:0}, at: kernfs_fop_write_iter
  #3: (&amp;indio_dev-&gt;mlock){+.+.}-{3:3}, at: enable_store
  #4: (&amp;iio_dev_opaque-&gt;info_exist_lock){+.+.}-{3:3}, at: iio_update_buffers

 Call Trace:
  __mutex_lock
  iio_update_buffers
  iio_channel_start_all_cb
  lmp91000_buffer_postenable
  __iio_update_buffers
  enable_store

Fixes: 67e17300dc1d76 ("iio: potentiostat: add LMP91000 support")
Signed-off-by: Vincent Whitchurch &lt;vincent.whitchurch@axis.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20220829091840.2791846-1-vincent.whitchurch@axis.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: core: Move the currentmode entry to the opaque structure</title>
<updated>2022-04-10T15:23:01Z</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2022-02-07T14:38:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=51570c9d4b3a678f77a50ac139f67290e946ec86'/>
<id>urn:sha1:51570c9d4b3a678f77a50ac139f67290e946ec86</id>
<content type='text'>
This entry should, under no situation, be modified by device
drivers. Now that we have limited its read access to device drivers
really needing it and did so through a dedicated helper, we can
easily move this variable to the opaque structure in order to
prevent any further modification from non-authorized code (out of the
core, basically).

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Link: https://lore.kernel.org/r/20220207143840.707510-12-miquel.raynal@bootlin.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: core: Introduce iio_push_to_buffers_with_ts_unaligned()</title>
<updated>2021-10-19T07:29:22Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-06-13T15:10:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=95ec3fdf2b79eaff79e78688bbc2f7dbb98d68b6'/>
<id>urn:sha1:95ec3fdf2b79eaff79e78688bbc2f7dbb98d68b6</id>
<content type='text'>
Whilst it is almost always possible to arrange for scan data to be
read directly into a buffer that is suitable for passing to
iio_push_to_buffers_with_timestamp(), there are a few places where
leading data needs to be skipped over.

For these cases introduce a function that will allocate an appropriate
sized and aligned bounce buffer (if not already allocated) and copy
the unaligned data into that before calling
iio_push_to_buffers_with_timestamp() on the bounce buffer.
We tie the lifespace of this buffer to that of the iio_dev.dev
which should ensure no memory leaks occur.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Link: https://lore.kernel.org/r/20210613151039.569883-2-jic23@kernel.org
</content>
</entry>
<entry>
<title>iio: core: move @clock_id from struct iio_dev to struct iio_dev_opaque</title>
<updated>2021-05-17T12:54:21Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-04-26T17:49:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=62a486c46d61bc684967fc3f83eed15dde49cf9b'/>
<id>urn:sha1:62a486c46d61bc684967fc3f83eed15dde49cf9b</id>
<content type='text'>
There is already an acessor function used to access it, making this
move straight forward.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Link: https://lore.kernel.org/r/20210426174911.397061-10-jic23@kernel.org
</content>
</entry>
<entry>
<title>iio: core: move @flags from struct iio_dev to struct iio_dev_opaque</title>
<updated>2021-05-17T12:54:21Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-04-26T17:49:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8b1c82cb849f8f7c758891099f2128b8fbc05744'/>
<id>urn:sha1:8b1c82cb849f8f7c758891099f2128b8fbc05744</id>
<content type='text'>
No reason any driver should ever need access to this field, so hide it.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Link: https://lore.kernel.org/r/20210426174911.397061-9-jic23@kernel.org
</content>
</entry>
<entry>
<title>iio: core: move @chrdev from struct iio_dev to struct iio_dev_opaque</title>
<updated>2021-05-17T12:54:17Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-04-26T17:49:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=396f7234856956eb29f009da6e5d846f29f87ebd'/>
<id>urn:sha1:396f7234856956eb29f009da6e5d846f29f87ebd</id>
<content type='text'>
No reason for this to be exposed to the drivers, so lets move it to the
opaque structure.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Link: https://lore.kernel.org/r/20210426174911.397061-8-jic23@kernel.org
</content>
</entry>
<entry>
<title>iio: core: move @info_exist_lock to struct iio_dev_opaque</title>
<updated>2021-05-17T12:49:13Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-04-26T17:49:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b804e2b76ac6d5559b99588e0190ac97b5597497'/>
<id>urn:sha1:b804e2b76ac6d5559b99588e0190ac97b5597497</id>
<content type='text'>
This lock is only of interest to the IIO core, so make it only
visible there.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Link: https://lore.kernel.org/r/20210426174911.397061-7-jic23@kernel.org
</content>
</entry>
</feed>
