<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/iio/adc, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-12-03T11:45:09Z</updated>
<entry>
<title>iio: adc: spear_adc: mask SPEAR_ADC_STATUS channel and avg sample before setting register</title>
<updated>2025-12-03T11:45:09Z</updated>
<author>
<name>Rodrigo Gobbi</name>
</author>
<published>2025-07-17T22:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=206eed62a9f38c48f74d48faab5531b39af5eeb7'/>
<id>urn:sha1:206eed62a9f38c48f74d48faab5531b39af5eeb7</id>
<content type='text'>
[ Upstream commit d75c7021c08e8ae3f311ef2464dca0eaf75fab9f ]

avg sample info is a bit field coded inside the following
bits: 5,6,7 and 8 of a device status register.

Channel num info the same, but over bits: 1, 2 and 3.

Mask both values in order to avoid touching other register bits,
since the first info (avg sample), came from DT.

Signed-off-by: Rodrigo Gobbi &lt;rodrigo.gobbi.7@gmail.com&gt;
Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Link: https://patch.msgid.link/20250717221559.158872-1-rodrigo.gobbi.7@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: adc: stm32-adc: Fix race in installing chained IRQ handler</title>
<updated>2025-08-28T14:21:15Z</updated>
<author>
<name>Chen Ni</name>
</author>
<published>2025-05-15T08:31:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fedfd16c297bf6bcb78c20686dc98658b171cc3b'/>
<id>urn:sha1:fedfd16c297bf6bcb78c20686dc98658b171cc3b</id>
<content type='text'>
commit e8ad595064f6ebd5d2d1a5d5d7ebe0efce623091 upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: adc: max1363: Reorder mode_list[] entries</title>
<updated>2025-08-28T14:21:15Z</updated>
<author>
<name>Fabio Estevam</name>
</author>
<published>2025-05-16T17:39:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=14760b52482f08a7e87b2278da992b34f28804c1'/>
<id>urn:sha1:14760b52482f08a7e87b2278da992b34f28804c1</id>
<content type='text'>
commit 8d8d7c1dbc46aa07a76acab7336a42ddd900be10 upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: adc: max1363: Fix MAX1363_4X_CHANS/MAX1363_8X_CHANS[]</title>
<updated>2025-08-28T14:21:15Z</updated>
<author>
<name>Fabio Estevam</name>
</author>
<published>2025-05-16T17:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=016f13e0ad2a9372db932e770042fb5d23cb8fd6'/>
<id>urn:sha1:016f13e0ad2a9372db932e770042fb5d23cb8fd6</id>
<content type='text'>
commit 6d21f2c2dd843bceefd9455f2919f6bb526797f0 upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: adc: ad7606_spi: fix reg write value mask</title>
<updated>2025-06-27T10:02:52Z</updated>
<author>
<name>David Lechner</name>
</author>
<published>2025-04-29T01:55:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0068025928921b85e962b1a176f97cb21f0af294'/>
<id>urn:sha1:0068025928921b85e962b1a176f97cb21f0af294</id>
<content type='text'>
commit 89944d88f8795c6c89b9514cb365998145511cd4 upstream.

Fix incorrect value mask for register write. Register values are 8-bit,
not 9. If this function was called with a value &gt; 0xFF and an even addr,
it would cause writing to the next register.

Fixes: f2a22e1e172f ("iio: adc: ad7606: Add support for software mode for ad7616")
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Angelo Dureghello &lt;adureghello@baylibre.com&gt;
Link: https://patch.msgid.link/20250428-iio-adc-ad7606_spi-fix-write-value-mask-v1-1-a2d5e85a809f@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>
</entry>
<entry>
<title>iio: adc: ad7768-1: Fix insufficient alignment of timestamp.</title>
<updated>2025-06-04T12:32:28Z</updated>
<author>
<name>Jonathan Cameron</name>
</author>
<published>2025-04-13T10:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d04c98d2c857beaf423039b65337d7d20ab78a4f'/>
<id>urn:sha1:d04c98d2c857beaf423039b65337d7d20ab78a4f</id>
<content type='text'>
[ Upstream commit ffbc26bc91c1f1eb3dcf5d8776e74cbae21ee13a ]

On architectures where an s64 is not 64-bit aligned, this may result
insufficient alignment of the timestamp and the structure being too small.
Use aligned_s64 to force the alignment.

Fixes: a1caeebab07e ("iio: adc: ad7768-1: Fix too small buffer passed to iio_push_to_buffers_with_timestamp()") # aligned_s64 newer
Reported-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Link: https://patch.msgid.link/20250413103443.2420727-3-jic23@kernel.org
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: adc: dln2: Use aligned_s64 for timestamp</title>
<updated>2025-06-04T12:32:28Z</updated>
<author>
<name>Jonathan Cameron</name>
</author>
<published>2025-04-13T10:34:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a1907a724cd7714326705bc34926b719d1237229'/>
<id>urn:sha1:a1907a724cd7714326705bc34926b719d1237229</id>
<content type='text'>
[ Upstream commit 5097eaae98e53f9ab9d35801c70da819b92ca907 ]

Here the lack of marking allows the overall structure to not be
sufficiently aligned resulting in misplacement of the timestamp
in iio_push_to_buffers_with_timestamp(). Use aligned_s64 to
force the alignment on all architectures.

Fixes: 7c0299e879dd ("iio: adc: Add support for DLN2 ADC")
Reported-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Link: https://patch.msgid.link/20250413103443.2420727-4-jic23@kernel.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: adc: ad7606: fix serial register access</title>
<updated>2025-06-04T12:32:26Z</updated>
<author>
<name>Angelo Dureghello</name>
</author>
<published>2025-04-18T18:37:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=196d4c5d4b17f9a63bea25509b4f6a9217c5c93c'/>
<id>urn:sha1:196d4c5d4b17f9a63bea25509b4f6a9217c5c93c</id>
<content type='text'>
commit f083f8a21cc785ebe3a33f756a3fa3660611f8db upstream.

Fix register read/write routine as per datasheet.

When reading multiple consecutive registers, only the first one is read
properly. This is due to missing chip select deassert and assert again
between first and second 16bit transfer, as shown in the datasheet
AD7606C-16, rev 0, figure 110.

Fixes: f2a22e1e172f ("iio: adc: ad7606: Add support for software mode for ad7616")
Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Signed-off-by: Angelo Dureghello &lt;adureghello@baylibre.com&gt;
Link: https://patch.msgid.link/20250418-wip-bl-ad7606-fix-reg-access-v3-1-d5eeb440c738@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>
</entry>
<entry>
<title>iio: adc: ad7768-1: Fix conversion result sign</title>
<updated>2025-05-02T05:39:25Z</updated>
<author>
<name>Sergiu Cuciurean</name>
</author>
<published>2025-03-06T21:00:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=546ce870eaf4cbe96729ba7087e5db5e2753e6d6'/>
<id>urn:sha1:546ce870eaf4cbe96729ba7087e5db5e2753e6d6</id>
<content type='text'>
[ Upstream commit 8236644f5ecb180e80ad92d691c22bc509b747bb ]

The ad7768-1 ADC output code is two's complement, meaning that the voltage
conversion result is a signed value.. Since the value is a 24 bit one,
stored in a 32 bit variable, the sign should be extended in order to get
the correct representation.

Also the channel description has been updated to signed representation,
to match the ADC specifications.

Fixes: a5f8c7da3dbe ("iio: adc: Add AD7768-1 ADC basic support")
Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Marcelo Schmitt &lt;marcelo.schmitt@analog.com&gt;
Signed-off-by: Sergiu Cuciurean &lt;sergiu.cuciurean@analog.com&gt;
Signed-off-by: Jonathan Santos &lt;Jonathan.Santos@analog.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Link: https://patch.msgid.link/505994d3b71c2aa38ba714d909a68e021f12124c.1741268122.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: adc: ad7768-1: Move setting of val a bit later to avoid unnecessary return value check</title>
<updated>2025-05-02T05:39:24Z</updated>
<author>
<name>Jonathan Cameron</name>
</author>
<published>2025-02-17T14:16:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dcf1a808abc03a9ea41e41f014d40ae4a51d3433'/>
<id>urn:sha1:dcf1a808abc03a9ea41e41f014d40ae4a51d3433</id>
<content type='text'>
[ Upstream commit 0af1c801a15225304a6328258efbf2bee245c654 ]

The data used is all in local variables so there is no advantage
in setting *val = ret with the direct mode claim held.
Move it later to after error check.

Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Link: https://patch.msgid.link/20250217141630.897334-13-jic23@kernel.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Stable-dep-of: 8236644f5ecb ("iio: adc: ad7768-1: Fix conversion result sign")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
