<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-next.git/drivers/iio/buffer, branch master</title>
<subtitle>Linux kernel latest source</subtitle>
<id>http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/'/>
<updated>2026-10-05T07:34:50+00:00</updated>
<entry>
<title>Merge 7.3-rc6 into char-misc-next</title>
<updated>2026-10-05T07:34:50+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2026-10-05T07:34:50+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=d47322a612daf8e97b2e5e4dbbabdff27080c1ec'/>
<id>urn:sha1:d47322a612daf8e97b2e5e4dbbabdff27080c1ec</id>
<content type='text'>
This resolves a number of merge conflicts between the branches, and we
pick up the fixes in 7.3-rc6 that we need for testing.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v7.3-rc4' into togreg</title>
<updated>2026-09-21T02:18:53+00:00</updated>
<author>
<name>Jonathan Cameron</name>
<email>jonathan.cameron@oss.qualcomm.com</email>
</author>
<published>2026-09-21T02:18:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=c61194723749ab021284738ebcae2c7dba0cfb88'/>
<id>urn:sha1:c61194723749ab021284738ebcae2c7dba0cfb88</id>
<content type='text'>
Linux 7.3-rc4

Merged to pick up an x86 build fix needed for the ad9910 driver
and the IIO fixes recently picked up.
</content>
</entry>
<entry>
<title>iio: use dmaengine_get_dma_device() instead of chan-&gt;device-&gt;dev</title>
<updated>2026-09-20T23:24:56+00:00</updated>
<author>
<name>Frank Li</name>
<email>Frank.Li@nxp.com</email>
</author>
<published>2026-09-17T20:36:26+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=f65cd769875eb5024d3e2aec79dacf5ad3d06808'/>
<id>urn:sha1:f65cd769875eb5024d3e2aec79dacf5ad3d06808</id>
<content type='text'>
Replace direct dma_chan::device::dev access with the proper
dmaengine_get_dma_device() accessor in IIO DMA consumers.

chan-&gt;device-&gt;dev is not always the device used for DMA mapping.
Some DMA engines support per-channel IOMMU mappings, so different
channels may use different DMA devices.  dmaengine_get_dma_device()
returns the correct device for each channel.

This also prepares for making the DMA engine provider data structures
private. DMA consumers should not access DMA engine internals directly.

Assisted-by: LLM
Signed-off-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Reviewed-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'iio-fixes-for-7.3a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus</title>
<updated>2026-09-11T09:52:17+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2026-09-11T09:52:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=049094c8878062cebd93c8c22d2c13b1d6804e99'/>
<id>urn:sha1:049094c8878062cebd93c8c22d2c13b1d6804e99</id>
<content type='text'>
Jonathan writes:

IIO: 1st set of fixes for the 7.3 cycle.

A couple of core fixes, the rest usual mix of driver issues that surfaced
from merge window until now.

core
- buffer: Ensure that when using the iio_push_to_buffers_with_ts_unaligned()
  that the full buffer is zeroed.
- trigger: Cancel reenable_work() before freeing the trigger that might be
  re-enabled.
dma-buffer
- Fix wrong sizing for a mapped sg_list.  If an IOMMU was using a fused
  entry the mapping might walk off the end.

adi,ade9000
- Wait for power up before requesting interrupts.
- Fix overlap in scan index for current and voltage channels.
- Ensure Phase C dip event included in IRQ1 handler.
adi,adf4377
- Initialize all of a clk_init_data.
adi,adis*
- Ensure debugfs reads are finished before unbind.
adi,axi-adc
- Initialize mutex.
adi,admv1013
- Ensure mutex is intialized before notifier that might use it is
  registered.
- Fix wrong channel field used for read_raw.
allwinner,sun4i
- Drop a pm_runtime_put() when there was no get.
- Ensure correct cleanup on driver probe fail due to any issues with
  the thermal zone.
aspeed,adc,
- Don't eat reset deassert errors.
awinic,aw96103
- Make sure firmware length is validated rather than blindly trusting
  it.
bosch,bmp280
- Fix out of bounds lookup of sampling frequency due to indexing based on
  elements in matrix rather than just the correct dimension.
invensense,timestamp library
- Ensure time estimate doesn't invert wrt to current time in a corner
  case occasionally seen.
kionix,kx022a
- Off by one in array boundary check.
- Close a memory leak and state corruption in error path.
maxim,max1363
- Sign extend bipolar values to ensure correct reporting to userspace.
maxim,max30102
- Fix NULL dereference by checking there is data in the FIFO before
  trying to do anything with it.
microchip,mcp47a1
- Ensure highest possible value actually settable.
pulsed-light,lidar-lite
- Don't leak the IIO device registration if runtime pm setup fails
  particularly as it was being freed.
rockchip,saradc
- Fix wrong fallback compatible for rv1106 that lead to trying
  to use too many channels (correct support will follow next
  merge window)
rohm,bd79124
- Correct limit used for rising alarms.
- Fix which registers related to limits are used in initialization.
- Apply GPIO mask to allow subset of GPIOs to be toggled.
- Add missing regmap error handling in a few places.
- Ensures scale is read only.
rohm,bm1390
- Don't silently eat a data read error.
rohm,bu27034
- Don't silently eat error when reading gain.
- Ensure we infinite delay doesn't happen on error.
semtech,sx9324
- Fix wrong proximity channel resolution.
sharp,gp2ap020a00f
- Make sure to drain irq_work in remove path.
st,vl5310x
- Ensure direct mode is claimed for read_raw avoiding corruption
  of buffered accesses.
vishay,vcnl3020
- Use write bits for ISR mask and ensure right event reported.
vti,sca3000
- Fix up a condition check for the frequency divider.
xilinx,xadc
- Swap registration of cleanup of work with that of irq
  to ensure that no irqs can cause work that has been freed
  to be queued.
x-powers,axp288
- Add bias override quirk for Haier HV103H.  Fix because we
  used to always override then moved to trusting the firmware
  setup - which fixed some boards, but broke others.

* tag 'iio-fixes-for-7.3a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (42 commits)
  iio: proximity: vcnl3020: fix ISR bitmask check in IRQ handler
  iio: proximity: vl53l0x-i2c: claim direct mode for raw reads
  iio: dac: mcp47a1: Allow full-scale output
  iio: accel: kionix-kx022a: Prevent memory leak and fix state
  iio: light: rohm-bu27034: Fix infinite delay on error
  iio: adc: sun4i-gpadc-iio: clean up on thermal zone registration failure
  iio: adc: sun4i-gpadc-iio: drop underflowing pm_runtime_put() calls
  iio: adc: axp288: Add TS bias override for Haier HV103H
  dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible
  dt-bindings: iio: adc: rockchip-saradc: Group single-entries into an enum list
  iio: inv_sensors: fix estimated value larger than interrupt timestamp
  iio: adc: aspeed: propagate reset deassert errors
  iio: buffer-dmaengine: fix sg entry iteration when building dma_vecs
  iio: proximity: pulsedlight: fix iio_device left registered on PM setup failure
  iio: trigger: cancel reenable_work before freeing trigger
  iio: frequency: admv1013: fix wrong channel field used in admv1013_read_raw()
  iio: accel: sca3000: fix frequency divider condition check
  iio: admv1013: initialize callback mutex before registering notifier
  iio: gyro: adis16136: fix unprotected debugfs reads
  iio: imu: adis16400: fix unprotected debugfs reads
  ...
</content>
</entry>
<entry>
<title>treewide: refresh kmalloc_obj() conversions</title>
<updated>2026-09-05T04:37:00+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees+treewide@kernel.org</email>
</author>
<published>2026-09-02T22:31:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d'/>
<id>urn:sha1:3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d</id>
<content type='text'>
This is another run of the Coccinelle script for converting kmalloc()
family of allocations to kmalloc_obj() via the existing rules in
scripts/coccinelle/api/kmalloc_objs.cocci

This catches both the set of kmalloc() uses added since the first
kmalloc_obj() conversions in v7.0 and adds a large group missed in the
first pass due to Coccinelle not interacting well with the cleanup.h
scoped_...() family of macros[1]. I worked around this with spatch's
"--macro-file" argument to a file with all the scoped_...() macros mapped
to Coccinelle's YACFE_ITERATOR[2] as that was the closest viable control
flow indicator I could find.

Build tested allmodconfig on x86, arm64, arm, loongarch, mips, powerpc,
riscv, and s390 with no new warnings.

Link: https://lore.kernel.org/lkml/202609021314.8A9C0B8@keescook/ [1]
Link: https://github.com/coccinelle/coccinelle/blob/master/standard.h [2]
Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: buffer-dmaengine: drop dead max_size computation</title>
<updated>2026-08-31T01:58:30+00:00</updated>
<author>
<name>Nuno Sá</name>
<email>nuno.sa@analog.com</email>
</author>
<published>2026-08-28T10:46:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=5957dcaf106e796e7e63952769930fb0ff0b999c'/>
<id>urn:sha1:5957dcaf106e796e7e63952769930fb0ff0b999c</id>
<content type='text'>
iio_dmaengine_buffer_submit_block() computes max_size unconditionally at
the top of the function, but only the fileio branch consumes it - and
that branch already computes it again right where it is used. Drop the
unconditional copy.

No functional change intended.

Signed-off-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>iio: buffer-dmaengine: fix sg entry iteration when building dma_vecs</title>
<updated>2026-08-30T23:52:42+00:00</updated>
<author>
<name>Michael Hennerich</name>
<email>michael.hennerich@analog.com</email>
</author>
<published>2026-08-28T10:46:55+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=0d0ffbcc92e30a8d656ad76a6e278fa3400fed85'/>
<id>urn:sha1:0d0ffbcc92e30a8d656ad76a6e278fa3400fed85</id>
<content type='text'>
iio_dmaengine_buffer_submit_block() counts scatterlist entries with
sg_nents_for_len(), which walks the CPU-side lengths (sg-&gt;length), but
then consumes the DMA-side fields (sg_dma_address()/sg_dma_len()).
After dma_map_sgtable() the two views may differ: an IOMMU can coalesce
the mapping so that only the first sgt-&gt;nents entries carry valid DMA
addresses, with nents &lt; orig_nents.

On x86 with an IOMMU enabled, a DMABUF block backed by two 1 MiB
system-heap chunks maps to a single 2 MiB IOVA range. The CPU-side
count is 2, so the loop reads one entry past the mapped set and emits a
garbage vec ({addr = ~0, len = 0}). The DMA engine driver rejects the
vec array (prep returns NULL), the fence is signalled with -ENOMEM,
which a userspace poller cannot observe, and the block is left in
ACTIVE state so every further enqueue of it fails with -EBUSY. The
visible symptom is a stream of zero-filled blocks followed by a wedged
buffer.

Platforms without an IOMMU never hit this because nents == orig_nents.

Size the vec array with sgt-&gt;nents, i.e. the DMA-mapped view, and stop
the fill loop once bytes_used is covered - which is allowed to be
smaller than the block size - passing the number of vecs actually
filled to dmaengine_prep_peripheral_dma_vec().

One vec per mapped entry is enough since coalescing can only ever
reduce the number of entries. A single mapped entry longer than the
device's maximum segment size would need more than one, but the DMA API
already assumes no single segment exceeds it [1], and splitting a vec
down to the hardware descriptor size is the DMA engine driver's job -
which both current .device_prep_peripheral_dma_vec() implementations
do.

[1]: commit ab2cbeb0ed30 ("iommu/dma: Handle SG length overflow better")

Assisted-by: Claude:claude-fable-5
Fixes: 7a86d469983a ("iio: buffer-dmaengine: Support new DMABUF based userspace API")
Signed-off-by: Michael Hennerich &lt;michael.hennerich@analog.com&gt;
Signed-off-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>iio: buffer-dmaengine: Add support for cyclic DMA transfers</title>
<updated>2026-07-19T22:16:22+00:00</updated>
<author>
<name>Nuno Sá</name>
<email>nuno.sa@analog.com</email>
</author>
<published>2026-07-15T11:24:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=0c76b5213482b597d545255710768e4b7934defc'/>
<id>urn:sha1:0c76b5213482b597d545255710768e4b7934defc</id>
<content type='text'>
Allow buffer blocks flagged as cyclic to be submitted as repeating DMA
transfers. For cyclic blocks, use DMA_PREP_REPEAT so the engine keeps
replaying the descriptor.

This is useful for output buffers where the same data should be driven
continuously without userspace having to requeue it. Examples include
continuous RF transmit paths replaying a calibration, test or beacon
pattern.

Skip installing the completion callback for cyclic blocks. Since the
transfer is continuously replayed, the callback would fire on every
period, throwing off the block refcount.

Because nothing prevents a new cyclic transfer from replacing an
already active cyclic one, always set DMA_PREP_LOAD_EOT so the engine
correctly terminates the active transfer before loading the new
descriptor.

Limit the DMA buffer queue to one cyclic DMABUF at a time. There is
currently no known use case for queueing multiple cyclic blocks, and
cyclic blocks stay referenced until the buffer is disabled.

Signed-off-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>iio: inkern: Use namespaced exports</title>
<updated>2026-07-05T00:37:19+00:00</updated>
<author>
<name>Romain Gantois</name>
<email>romain.gantois@bootlin.com</email>
</author>
<published>2025-12-09T08:25:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=ebf1d03dab9659749d5605656cf92fb6700f33bb'/>
<id>urn:sha1:ebf1d03dab9659749d5605656cf92fb6700f33bb</id>
<content type='text'>
Use namespaced exports for IIO consumer API functions.

This will make it easier to manage the IIO export surface. Consumer drivers
will only be provided access to a specific set of functions, thereby
restricting usage of internal IIO functions by other parts of the kernel.

This change cannot be split into several parts without breaking
bisectability, thus all of the affected drivers are modified at once.

Acked-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt; # for power-supply
Acked-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Signed-off-by: Romain Gantois &lt;romain.gantois@bootlin.com&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Acked-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: buffer: hw-consumer: free scan_mask on buffer release</title>
<updated>2026-05-26T18:22:56+00:00</updated>
<author>
<name>Felix Gu</name>
<email>ustc.gu@gmail.com</email>
</author>
<published>2026-04-27T11:11:39+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=6325d6e2204327965b849c0a16efb6ac9202e5a8'/>
<id>urn:sha1:6325d6e2204327965b849c0a16efb6ac9202e5a8</id>
<content type='text'>
The scan_mask lifetime changed in commit 9a2e1233d38c ("iio: buffer:
hw-consumer: remove redundant scan_mask flexible array").

Before that change, the scan mask storage was embedded in struct
hw_consumer_buffer, so iio_hw_buf_release() could free the whole
allocation with a single kfree(hw_buf).

That commit moved the scan mask to a separate bitmap_zalloc() allocation
stored in buffer.scan_mask, but left iio_hw_buf_release() unchanged.

Free the scan mask in iio_hw_buf_release() before freeing the buffer
wrapper.

Fixes: 9a2e1233d38c ("iio: buffer: hw-consumer: remove redundant scan_mask flexible array")
Signed-off-by: Felix Gu &lt;ustc.gu@gmail.com&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
</feed>
