<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/iio, branch v6.16</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-06-29T16:15:40Z</updated>
<entry>
<title>iio: dac: ad3530r: Fix incorrect masking for channels 4-7 in powerdown mode</title>
<updated>2025-06-29T16:15:40Z</updated>
<author>
<name>Kim Seer Paller</name>
<email>kimseer.paller@analog.com</email>
</author>
<published>2025-06-26T08:38:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1131e70558bc70f1fc52515281de2663e961e1cc'/>
<id>urn:sha1:1131e70558bc70f1fc52515281de2663e961e1cc</id>
<content type='text'>
In the current implementation of ad3530r_set_dac_powerdown() function,
the macro AD3530R_OP_MODE_CHAN_MSK(chan-&gt;channel) is used to generate
the bitmask for the operating mode of a specific channel. However, this
macro does not account for channels 4-7, which map to the second
register AD3530R_OUTPUT_OPERATING_MODE_1 for the 8 channeled device. As
a result, the bitmask is incorrectly calculated for these channels,
leading to improper configuration of the powerdown mode. Resolve this
issue by adjusting the channel index for channels 4-7 by subtracting 4
before applying the macro. This ensures that the correct bitmask is
generated for the second register.

Fixes: 93583174a3df ("iio: dac: ad3530r: Add driver for AD3530R and AD3531R")
Signed-off-by: Kim Seer Paller &lt;kimseer.paller@analog.com&gt;
Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Link: https://patch.msgid.link/20250626-bug_fix-v1-1-eb3c2b370f10@analog.com
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: adc: ad7380: fix adi,gain-milli property parsing</title>
<updated>2025-06-29T16:15:40Z</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2025-06-19T15:24:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24fa69894ea3f76ecb13d7160692ee574a912803'/>
<id>urn:sha1:24fa69894ea3f76ecb13d7160692ee574a912803</id>
<content type='text'>
Change the data type of the "adi,gain-milli" property from u32 to u16.
The devicetree binding specifies it as uint16, so we need to read it as
such to avoid an -EOVERFLOW error when parsing the property.

Fixes: c904e6dcf402 ("iio: adc: ad7380: add support for adaq4370-4 and adaq4380-4")
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
Link: https://patch.msgid.link/20250619-iio-adc-ad7380-fix-adi-gain-milli-parsing-v1-1-4c27fb426860@baylibre.com
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: adc: ad7949: use spi_is_bpw_supported()</title>
<updated>2025-06-29T16:15:39Z</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2025-06-11T15:04:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b86482632788acd48d7b9ee1867f5ad3a32ccbb'/>
<id>urn:sha1:7b86482632788acd48d7b9ee1867f5ad3a32ccbb</id>
<content type='text'>
Use spi_is_bpw_supported() instead of directly accessing spi-&gt;controller
-&gt;bits_per_word_mask. bits_per_word_mask may be 0, which implies that
8-bits-per-word is supported. spi_is_bpw_supported() takes this into
account while spi_ctrl_mask == SPI_BPW_MASK(8) does not.

Fixes: 0b2a740b424e ("iio: adc: ad7949: enable use with non 14/16-bit controllers")
Closes: https://lore.kernel.org/linux-spi/c8b8a963-6cef-4c9b-bfef-dab2b7bd0b0f@sirena.org.uk/
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Link: https://patch.msgid.link/20250611-iio-adc-ad7949-use-spi_is_bpw_supported-v1-1-c4e15bfd326e@baylibre.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: accel: fxls8962af: Fix use after free in fxls8962af_fifo_flush</title>
<updated>2025-06-29T16:15:39Z</updated>
<author>
<name>Sean Nyekjaer</name>
<email>sean@geanix.com</email>
</author>
<published>2025-06-03T12:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1fe16dc1a2f5057772e5391ec042ed7442966c9a'/>
<id>urn:sha1:1fe16dc1a2f5057772e5391ec042ed7442966c9a</id>
<content type='text'>
fxls8962af_fifo_flush() uses indio_dev-&gt;active_scan_mask (with
iio_for_each_active_channel()) without making sure the indio_dev
stays in buffer mode.
There is a race if indio_dev exits buffer mode in the middle of the
interrupt that flushes the fifo. Fix this by calling
synchronize_irq() to ensure that no interrupt is currently running when
disabling buffer mode.

Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read
[...]
_find_first_bit_le from fxls8962af_fifo_flush+0x17c/0x290
fxls8962af_fifo_flush from fxls8962af_interrupt+0x80/0x178
fxls8962af_interrupt from irq_thread_fn+0x1c/0x7c
irq_thread_fn from irq_thread+0x110/0x1f4
irq_thread from kthread+0xe0/0xfc
kthread from ret_from_fork+0x14/0x2c

Fixes: 79e3a5bdd9ef ("iio: accel: fxls8962af: add hw buffered sampling")
Cc: stable@vger.kernel.org
Suggested-by: David Lechner &lt;dlechner@baylibre.com&gt;
Signed-off-by: Sean Nyekjaer &lt;sean@geanix.com&gt;
Link: https://patch.msgid.link/20250603-fxlsrace-v2-1-5381b36ba1db@geanix.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: adc: axp20x_adc: Add missing sentinel to AXP717 ADC channel maps</title>
<updated>2025-06-29T16:15:39Z</updated>
<author>
<name>Chen-Yu Tsai</name>
<email>wens@csie.org</email>
</author>
<published>2025-06-07T13:56:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3281ddcea6429f7bc1fdb39d407752dd1371aba9'/>
<id>urn:sha1:3281ddcea6429f7bc1fdb39d407752dd1371aba9</id>
<content type='text'>
The AXP717 ADC channel maps is missing a sentinel entry at the end. This
causes a KASAN warning.

Add the missing sentinel entry.

Fixes: 5ba0cb92584b ("iio: adc: axp20x_adc: add support for AXP717 ADC")
Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Link: https://patch.msgid.link/20250607135627.2086850-1-wens@kernel.org
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: common: st_sensors: Fix use of uninitialize device structs</title>
<updated>2025-06-29T16:15:39Z</updated>
<author>
<name>Maud Spierings</name>
<email>maudspierings@gocontroll.com</email>
</author>
<published>2025-05-27T06:36:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f92e93e257b33e73622640a9205f8642ec16ddd'/>
<id>urn:sha1:9f92e93e257b33e73622640a9205f8642ec16ddd</id>
<content type='text'>
Throughout the various probe functions &amp;indio_dev-&gt;dev is used before it
is initialized. This caused a kernel panic in st_sensors_power_enable()
when the call to devm_regulator_bulk_get_enable() fails and then calls
dev_err_probe() with the uninitialized device.

This seems to only cause a panic with dev_err_probe(), dev_err(),
dev_warn() and dev_info() don't seem to cause a panic, but are fixed
as well.

The issue is reported and traced here: [1]

Link: https://lore.kernel.org/all/AM7P189MB100986A83D2F28AF3FFAF976E39EA@AM7P189MB1009.EURP189.PROD.OUTLOOK.COM/ [1]
Cc: stable@vger.kernel.org
Signed-off-by: Maud Spierings &lt;maudspierings@gocontroll.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Link: https://... [1]
Link: https://patch.msgid.link/20250527-st_iio_fix-v4-1-12d89801c761@gocontroll.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: adc: adi-axi-adc: fix ad7606_bus_reg_read()</title>
<updated>2025-06-29T16:15:39Z</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2025-05-30T21:50:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ac609d1fba19d5d40fb3c81201ffadcb6d00fb3'/>
<id>urn:sha1:6ac609d1fba19d5d40fb3c81201ffadcb6d00fb3</id>
<content type='text'>
Mask the value read before returning it. The value read over the
parallel bus via the AXI ADC IP block contains both the address and
the data, but callers expect val to only contain the data.

axi_adc_raw_write() takes a u32 parameter, so addr was the wrong type.
This wasn't causing any issues but is corrected anyway since we are
touching the same line to add a new variable.

Cc: stable@vger.kernel.org
Fixes: 79c47485e438 ("iio: adc: adi-axi-adc: add support for AD7606 register writing")
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
Link: https://patch.msgid.link/20250530-iio-adc-adi-axi-adc-fix-ad7606_bus_reg_read-v2-1-ad2dfc0694ce@baylibre.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: adc: max1363: Reorder mode_list[] entries</title>
<updated>2025-06-09T06:45:19Z</updated>
<author>
<name>Fabio Estevam</name>
<email>festevam@denx.de</email>
</author>
<published>2025-05-16T17:39:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8d8d7c1dbc46aa07a76acab7336a42ddd900be10'/>
<id>urn:sha1:8d8d7c1dbc46aa07a76acab7336a42ddd900be10</id>
<content type='text'>
The IIO core issues warnings when a scan mask is a subset of a previous
entry in the available_scan_masks array.

On a board using a MAX11601, the following warning is observed:

max1363 1-0064: available_scan_mask 7 subset of 6. Never used

This occurs because the entries in the max11607_mode_list[] array are not
ordered correctly. To fix this, reorder the entries so that no scan mask is
a subset of an earlier one.

While at it, reorder the mode_list[] arrays for other supported chips as
well, to prevent similar warnings on different variants.

Note fixes tag dropped as these were introduced over many commits a long
time back and the side effect until recently was a reduction in sampling
rate due to reading too many channels when only a few were desired.
Now we have a sanity check that reports this error but that is not
where the issue was introduced.

Cc: stable@vger.kernel.org
Signed-off-by: Fabio Estevam &lt;festevam@denx.de&gt;
Acked-by: Matti Vaittinen &lt;mazziesaccount@gmail.com&gt;
Link: https://patch.msgid.link/20250516173900.677821-2-festevam@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: adc: max1363: Fix MAX1363_4X_CHANS/MAX1363_8X_CHANS[]</title>
<updated>2025-06-09T06:45:19Z</updated>
<author>
<name>Fabio Estevam</name>
<email>festevam@denx.de</email>
</author>
<published>2025-05-16T17:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6d21f2c2dd843bceefd9455f2919f6bb526797f0'/>
<id>urn:sha1:6d21f2c2dd843bceefd9455f2919f6bb526797f0</id>
<content type='text'>
Since commit 2718f15403fb ("iio: sanity check available_scan_masks array"),
booting a board populated with a MAX11601 results in a flood of warnings:

max1363 1-0064: available_scan_mask 8 subset of 0. Never used
max1363 1-0064: available_scan_mask 9 subset of 0. Never used
max1363 1-0064: available_scan_mask 10 subset of 0. Never used
max1363 1-0064: available_scan_mask 11 subset of 0. Never used
max1363 1-0064: available_scan_mask 12 subset of 0. Never used
max1363 1-0064: available_scan_mask 13 subset of 0. Never used
...

These warnings are caused by incorrect offsets used for differential
channels in the MAX1363_4X_CHANS() and MAX1363_8X_CHANS() macros.

The max1363_mode_table[] defines the differential channel mappings as
follows:

MAX1363_MODE_DIFF_SINGLE(0, 1, 1 &lt;&lt; 12),
MAX1363_MODE_DIFF_SINGLE(2, 3, 1 &lt;&lt; 13),
MAX1363_MODE_DIFF_SINGLE(4, 5, 1 &lt;&lt; 14),
MAX1363_MODE_DIFF_SINGLE(6, 7, 1 &lt;&lt; 15),
MAX1363_MODE_DIFF_SINGLE(8, 9, 1 &lt;&lt; 16),
MAX1363_MODE_DIFF_SINGLE(10, 11, 1 &lt;&lt; 17),
MAX1363_MODE_DIFF_SINGLE(1, 0, 1 &lt;&lt; 18),
MAX1363_MODE_DIFF_SINGLE(3, 2, 1 &lt;&lt; 19),
MAX1363_MODE_DIFF_SINGLE(5, 4, 1 &lt;&lt; 20),
MAX1363_MODE_DIFF_SINGLE(7, 6, 1 &lt;&lt; 21),
MAX1363_MODE_DIFF_SINGLE(9, 8, 1 &lt;&lt; 22),
MAX1363_MODE_DIFF_SINGLE(11, 10, 1 &lt;&lt; 23),

Update the macros to follow this same pattern, ensuring that the scan masks
are valid and preventing the warnings.

Cc: stable@vger.kernel.org
Suggested-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Fabio Estevam &lt;festevam@denx.de&gt;
Acked-by: Matti Vaittinen &lt;mazziesaccount@gmail.com&gt;
Link: https://patch.msgid.link/20250516173900.677821-1-festevam@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: adc: stm32-adc: Fix race in installing chained IRQ handler</title>
<updated>2025-06-09T06:45:19Z</updated>
<author>
<name>Chen Ni</name>
<email>nichen@iscas.ac.cn</email>
</author>
<published>2025-05-15T08:31:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8ad595064f6ebd5d2d1a5d5d7ebe0efce623091'/>
<id>urn:sha1:e8ad595064f6ebd5d2d1a5d5d7ebe0efce623091</id>
<content type='text'>
Fix a race where a pending interrupt could be received and the handler
called before the handler's data has been setup, by converting to
irq_set_chained_handler_and_data().

Fixes: 1add69880240 ("iio: adc: Add support for STM32 ADC core")
Signed-off-by: Chen Ni &lt;nichen@iscas.ac.cn&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Tested-by: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.com&gt;
Reviewed-by: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.com&gt;
Link: https://patch.msgid.link/20250515083101.3811350-1-nichen@iscas.ac.cn
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
