<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/iio, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-03-19T15:08:47+00:00</updated>
<entry>
<title>iio: proximity: hx9023s: Protect against division by zero in set_samp_freq</title>
<updated>2026-03-19T15:08:47+00:00</updated>
<author>
<name>Yasin Lee</name>
<email>yasin.lee.x@gmail.com</email>
</author>
<published>2026-02-13T15:14:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad9da7d39cecd3e92f54149ea0ebca390f33fe69'/>
<id>urn:sha1:ad9da7d39cecd3e92f54149ea0ebca390f33fe69</id>
<content type='text'>
commit a318cfc0853706f1d6ce682dba660bc455d674ef upstream.

Avoid division by zero when sampling frequency is unspecified.

Fixes: 60df548277b7 ("iio: proximity: Add driver support for TYHX's HX9023S capacitive proximity sensor")
Signed-off-by: Yasin Lee &lt;yasin.lee.x@gmail.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;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: proximity: hx9023s: fix assignment order for __counted_by</title>
<updated>2026-03-19T15:08:47+00:00</updated>
<author>
<name>Yasin Lee</name>
<email>yasin.lee.x@gmail.com</email>
</author>
<published>2026-02-13T15:14:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=05723a2c4b09dddc258fc7c496b7750c729d3fd9'/>
<id>urn:sha1:05723a2c4b09dddc258fc7c496b7750c729d3fd9</id>
<content type='text'>
commit 585b90c0161ab77416fe3acdbdc55b978e33e16c upstream.

Initialize fw_size before copying firmware data into the flexible
array member to match the __counted_by() annotation. This fixes the
incorrect assignment order that triggers runtime safety checks.

Fixes: e9ed97be4fcc ("iio: proximity: hx9023s: Added firmware file parsing functionality")
Signed-off-by: Yasin Lee &lt;yasin.lee.x@gmail.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;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: imu: inv_icm42600: fix odr switch when turning buffer off</title>
<updated>2026-03-19T15:08:47+00:00</updated>
<author>
<name>Jean-Baptiste Maneyrol</name>
<email>jean-baptiste.maneyrol@tdk.com</email>
</author>
<published>2026-01-30T16:10:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=70b455484a661ed6da5a3f6c8273d77dd95d4af6'/>
<id>urn:sha1:70b455484a661ed6da5a3f6c8273d77dd95d4af6</id>
<content type='text'>
commit ffd32db8263d2d785a2c419486a450dc80693235 upstream.

ODR switch is done in 2 steps when FIFO is on : change the ODR register
value and acknowledge change when reading the FIFO ODR change flag.
When we are switching odr and turning buffer off just afterward, we are
losing the FIFO ODR change flag and ODR switch is blocked.

Fix the issue by force applying any waiting ODR change when turning
buffer off.

Fixes: ec74ae9fd37c ("iio: imu: inv_icm42600: add accurate timestamping")
Signed-off-by: Jean-Baptiste Maneyrol &lt;jean-baptiste.maneyrol@tdk.com&gt;
Cc: stable@vger.kernel.org
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: imu: inv_icm42600: fix odr switch to the same value</title>
<updated>2026-03-19T15:08:47+00:00</updated>
<author>
<name>Jean-Baptiste Maneyrol</name>
<email>jean-baptiste.maneyrol@tdk.com</email>
</author>
<published>2026-01-30T15:38:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b5a6825579a7ca5e2958521a9ce6d8e37cab9409'/>
<id>urn:sha1:b5a6825579a7ca5e2958521a9ce6d8e37cab9409</id>
<content type='text'>
commit c9f3a593137d862d424130343e77d4b5260a4f5a upstream.

ODR switch is done in 2 steps when FIFO is on : change the ODR register
value and acknowledge change when reading the FIFO ODR change flag.
When we are switching to the same odr value, we end up waiting for a
FIFO ODR flag that is never happening.

Fix the issue by doing nothing and exiting properly when we are
switching to the same ODR value.

Fixes: ec74ae9fd37c ("iio: imu: inv_icm42600: add accurate timestamping")
Signed-off-by: Jean-Baptiste Maneyrol &lt;jean-baptiste.maneyrol@tdk.com&gt;
Cc: stable@vger.kernel.org
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: light: bh1780: fix PM runtime leak on error path</title>
<updated>2026-03-19T15:08:47+00:00</updated>
<author>
<name>Antoniu Miclaus</name>
<email>antoniu.miclaus@analog.com</email>
</author>
<published>2026-01-30T11:30:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aae572ddc28578af476cce7da3faec0395ef0bf0'/>
<id>urn:sha1:aae572ddc28578af476cce7da3faec0395ef0bf0</id>
<content type='text'>
commit dd72e6c3cdea05cad24e99710939086f7a113fb5 upstream.

Move pm_runtime_put_autosuspend() before the error check to ensure
the PM runtime reference count is always decremented after
pm_runtime_get_sync(), regardless of whether the read operation
succeeds or fails.

Fixes: 1f0477f18306 ("iio: light: new driver for the ROHM BH1780")
Signed-off-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
Reviewed-by: Linus Walleij &lt;linusw@kernel.org&gt;
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: gyro: mpu3050-i2c: fix pm_runtime error handling</title>
<updated>2026-03-19T15:08:47+00:00</updated>
<author>
<name>Antoniu Miclaus</name>
<email>antoniu.miclaus@analog.com</email>
</author>
<published>2026-02-16T09:57:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a8714d2d0df4e0f5a89b27e3993ea665a68e1b01'/>
<id>urn:sha1:a8714d2d0df4e0f5a89b27e3993ea665a68e1b01</id>
<content type='text'>
commit 91f950b4cbb1aa9ea4eb3999f1463e8044b717fb upstream.

The return value of pm_runtime_get_sync() is not checked, and the
function always returns success. This allows I2C mux operations to
proceed even when the device fails to resume.

Use pm_runtime_resume_and_get() and propagate its return value to
properly handle resume failures.

Fixes: 3904b28efb2c ("iio: gyro: Add driver for the MPU-3050 gyroscope")
Signed-off-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
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: imu: adis: Fix NULL pointer dereference in adis_init</title>
<updated>2026-03-19T15:08:47+00:00</updated>
<author>
<name>Radu Sabau</name>
<email>radu.sabau@analog.com</email>
</author>
<published>2026-02-20T14:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ba19dd366528b961430f5195c2e382420703074f'/>
<id>urn:sha1:ba19dd366528b961430f5195c2e382420703074f</id>
<content type='text'>
commit 9990cd4f8827bd1ae3fb6eb7407630d8d463c430 upstream.

The adis_init() function dereferences adis-&gt;ops to check if the
individual function pointers (write, read, reset) are NULL, but does
not first check if adis-&gt;ops itself is NULL.

Drivers like adis16480, adis16490, adis16545 and others do not set
custom ops and rely on adis_init() assigning the defaults. Since struct
adis is zero-initialized by devm_iio_device_alloc(), adis-&gt;ops is NULL
when adis_init() is called, causing a NULL pointer dereference:

    Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
    pc : adis_init+0xc0/0x118
    Call trace:
     adis_init+0xc0/0x118
     adis16480_probe+0xe0/0x670

Fix this by checking if adis-&gt;ops is NULL before dereferencing it,
falling through to assign the default ops in that case.

Fixes: 3b29bcee8f6f ("iio: imu: adis: Add custom ops struct")
Signed-off-by: Radu Sabau &lt;radu.sabau@analog.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Reviewed-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
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: gyro: mpu3050-core: fix pm_runtime error handling</title>
<updated>2026-03-19T15:08:47+00:00</updated>
<author>
<name>Antoniu Miclaus</name>
<email>antoniu.miclaus@analog.com</email>
</author>
<published>2026-02-16T09:57:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=42685cf96e28262e0b84d74447f3d99f3f6a72e0'/>
<id>urn:sha1:42685cf96e28262e0b84d74447f3d99f3f6a72e0</id>
<content type='text'>
commit acc3949aab3e8094641a9c7c2768de1958c88378 upstream.

The return value of pm_runtime_get_sync() is not checked, allowing
the driver to access hardware that may fail to resume. The device
usage count is also unconditionally incremented. Use
pm_runtime_resume_and_get() which propagates errors and avoids
incrementing the usage count on failure.

In preenable, add pm_runtime_put_autosuspend() on set_8khz_samplerate()
failure since postdisable does not run when preenable fails.

Fixes: 3904b28efb2c ("iio: gyro: Add driver for the MPU-3050 gyroscope")
Reviewed-by: Linus Walleij &lt;linusw@kernel.org&gt;
Signed-off-by: Antoniu Miclaus &lt;antoniu.miclaus@analog.com&gt;
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: buffer: Fix wait_queue not being removed</title>
<updated>2026-03-19T15:08:47+00:00</updated>
<author>
<name>Nuno Sá</name>
<email>nuno.sa@analog.com</email>
</author>
<published>2026-02-16T13:24:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c7ae426705b0102338957b3648229a1b32a4eb9a'/>
<id>urn:sha1:c7ae426705b0102338957b3648229a1b32a4eb9a</id>
<content type='text'>
commit 064234044056c93a3719d6893e6e5a26a94a61b6 upstream.

In the edge case where the IIO device is unregistered while we're
buffering, we were directly returning an error without removing the wait
queue. Instead, set 'ret' and break out of the loop.

Fixes: 9eeee3b0bf19 ("iio: Add output buffer support")
Signed-off-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
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: chemical: bme680: Fix measurement wait duration calculation</title>
<updated>2026-03-19T15:08:46+00:00</updated>
<author>
<name>Chris Spencer</name>
<email>spencercw@gmail.com</email>
</author>
<published>2026-02-05T14:55:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c528dc22d58b714e50ebe8d656a0d7350743d219'/>
<id>urn:sha1:c528dc22d58b714e50ebe8d656a0d7350743d219</id>
<content type='text'>
commit f55b9510cd9437da3a0efa08b089caeb47595ff1 upstream.

This function refers to the Bosch BME680 API as the source of the
calculation, but one of the constants does not match the Bosch
implementation. This appears to be a simple transposition of two digits,
resulting in a wait time that is too short. This can cause the following
'device measurement cycle incomplete' check to occasionally fail, returning
EBUSY to user space.

Adjust the constant to match the Bosch implementation and resolve the EBUSY
errors.

Fixes: 4241665e6ea0 ("iio: chemical: bme680: Fix sensor data read operation")
Link: https://github.com/boschsensortec/BME68x_SensorAPI/blob/v4.4.8/bme68x.c#L521
Signed-off-by: Chris Spencer &lt;spencercw@gmail.com&gt;
Acked-by: Vasileios Amoiridis &lt;vassilisamir@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
