<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/iio/light, branch v7.0.12</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.12</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.12'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-06-09T10:32:37+00:00</updated>
<entry>
<title>iio: light: cm3323: fix reg_conf not being initialized correctly</title>
<updated>2026-06-09T10:32:37+00:00</updated>
<author>
<name>Aldo Conte</name>
<email>aldocontelk@gmail.com</email>
</author>
<published>2026-04-07T15:17:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ebe14cfea48843f7ac52845d313cfd8e345cb09c'/>
<id>urn:sha1:ebe14cfea48843f7ac52845d313cfd8e345cb09c</id>
<content type='text'>
commit 1f4f0bcc5255dec5c4c3a1551bf49d8c33b69b20 upstream.

The code stores the return value of i2c_smbus_write_word_data()
in data-&gt;reg_conf; however, this value represents the result
of the write operation and not the value actually written to
the configuration register. This meant that the contents of
data-&gt;reg_conf did not truly reflect the contents
of the hardware register.

Instead, save the value of the register before the write
and use this value in the I2C write.

The bug was found by code inspection: i2c_smbus_write_word_data()
returns 0 on success, not the value written to the register.

Tested using i2c-stub on a Raspberry Pi 3B running a custom 6.19.10
kernel. Before loading the driver, the configuration register 0x00
CM3323_CMD_CONF was populated with 0x0030 using
`i2cset -y 11 0x10 0x00 0x0030 w`, encoding an integration time of 320ms
in bits[6:4].

Due to incorrect initialization of data-&gt;reg_conf in
cm3323_init(), the print of integration_time returns 0.040000
instead of the expected 0.320000. This happens because the read of the
integration_time depends on cm3323_get_it_bits() that is based on the
value of data-&gt;reg_conf, which is erroneously set to 0.

With this fix applied, data-&gt;reg_conf correctly saves 0x0030 after init
and the successive integration_time reports 0.320000 as expected.

Fixes: 8b0544263761 ("iio: light: Add support for Capella CM3323 color sensor")
Cc: stable@vger.kernel.org
Signed-off-by: Aldo Conte &lt;aldocontelk@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: light: veml6070: Fix resource leak in probe error path</title>
<updated>2026-06-09T10:32:36+00:00</updated>
<author>
<name>Felix Gu</name>
<email>ustc.gu@gmail.com</email>
</author>
<published>2026-03-27T12:27:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a4762f4b4234a40089b2b77b7824026dec76971e'/>
<id>urn:sha1:a4762f4b4234a40089b2b77b7824026dec76971e</id>
<content type='text'>
commit b66f922f6a4fa92840f662fbcfeb4f8a0f774bcc upstream.

The driver calls i2c_new_dummy_device() to create a dummy device,
then calls i2c_smbus_write_byte(). If i2c_smbus_write_byte() fails and
returns, the cleanup via devm_add_action_or_reset() was never registered,
so the dummy device leaks.

Switch to devm_i2c_new_dummy_device() which registers cleanup atomically
with device creation, eliminating the error-path window.

Fixes: 7501bff87c3e ("iio: light: veml6070: add action for i2c_unregister_device")
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Signed-off-by: Felix Gu &lt;ustc.gu@gmail.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: light: veml6070: fix veml6070_read() return value</title>
<updated>2026-03-26T08:22:33+00:00</updated>
<author>
<name>Aldo Conte</name>
<email>aldocontelk@gmail.com</email>
</author>
<published>2026-03-25T11:32:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d0b224cf9ab12e86a4d1ca55c760dfaa5c19cbe7'/>
<id>urn:sha1:d0b224cf9ab12e86a4d1ca55c760dfaa5c19cbe7</id>
<content type='text'>
veml6070_read() computes the sensor value in ret but
returns 0 instead of the actual result. This causes
veml6070_read_raw() to always report 0.

Return the computed value instead of 0.

Running make W=1 returns no errors. I was unable
to test the patch because I do not have the hardware.
Found by code inspection.

Fixes: fc38525135dd ("iio: light: veml6070: use guard to handle mutex")
Signed-off-by: Aldo Conte &lt;aldocontelk@gmail.com&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: light: vcnl4035: fix scan buffer on big-endian</title>
<updated>2026-03-21T20:59:50+00:00</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2026-03-14T22:18:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fdc7aa54a5d44c05880a4aad7cfb41aacfd16d7b'/>
<id>urn:sha1:fdc7aa54a5d44c05880a4aad7cfb41aacfd16d7b</id>
<content type='text'>
Rework vcnl4035_trigger_consumer_handler() so that we are not passing
what should be a u16 value as an int * to regmap_read(). This won't
work on bit endian systems.

Instead, add a new unsigned int variable to pass to regmap_read(). Then
copy that value into the buffer struct.

The buffer array is replaced with a struct since there is only one value
being read. This allows us to use the correct u16 data type and has a
side-effect of simplifying the alignment specification.

Also fix the endianness of the scan format from little-endian to CPU
endianness. Since we are using regmap to read the value, it will be
CPU-endian.

Fixes: 55707294c4eb ("iio: light: Add support for vishay vcnl4035")
Signed-off-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;
</content>
</entry>
<entry>
<title>iio: light: bh1780: fix PM runtime leak on error path</title>
<updated>2026-02-23T08:24:37+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=dd72e6c3cdea05cad24e99710939086f7a113fb5'/>
<id>urn:sha1:dd72e6c3cdea05cad24e99710939086f7a113fb5</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>iio: Use IRQF_NO_THREAD</title>
<updated>2026-01-29T16:10:44+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2026-01-28T09:55:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=04d390af97f2c28166f7ddfe1a6bda622e3a4766'/>
<id>urn:sha1:04d390af97f2c28166f7ddfe1a6bda622e3a4766</id>
<content type='text'>
The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke
other interrupt handler and this supposed to happen from within the
hardirq.

Use IRQF_NO_THREAD to forbid forced-threading.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: light: opt4060: Use IIO cleanup helpers</title>
<updated>2026-01-22T20:53:17+00:00</updated>
<author>
<name>Kurt Borja</name>
<email>kuurtb@gmail.com</email>
</author>
<published>2026-01-20T06:20:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8284a498541623414abc616450371b08f24a4aac'/>
<id>urn:sha1:8284a498541623414abc616450371b08f24a4aac</id>
<content type='text'>
Use IIO_DEV_GUARD_CURRENT_MODE() cleanup helper to simplify and drop
busy-waiting code in opt4060_set_driver_state().

Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Kurt Borja &lt;kuurtb@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: light: vcnl4000: Use IIO cleanup helpers</title>
<updated>2026-01-22T20:53:17+00:00</updated>
<author>
<name>Kurt Borja</name>
<email>kuurtb@gmail.com</email>
</author>
<published>2026-01-20T06:20:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a3fe0fc9e623352ccf65650cb31c4309f853d1d'/>
<id>urn:sha1:6a3fe0fc9e623352ccf65650cb31c4309f853d1d</id>
<content type='text'>
Use IIO_DEV_ACQUIRE_DIRECT_MODE() helper to automatically release direct
mode.

Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Kurt Borja &lt;kuurtb@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: core: Match iio_device_claim_*() semantics and implementation</title>
<updated>2026-01-22T20:53:17+00:00</updated>
<author>
<name>Kurt Borja</name>
<email>kuurtb@gmail.com</email>
</author>
<published>2026-01-20T06:20:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2daee817df13fb539be01a6a8094d52667d402f6'/>
<id>urn:sha1:2daee817df13fb539be01a6a8094d52667d402f6</id>
<content type='text'>
Implement iio_device_claim_buffer_mode() fully inline with the use of
__iio_dev_mode_lock(), which takes care of sparse annotations.

To completely match iio_device_claim_direct() semantics, we need to
also change iio_device_claim_buffer_mode() return semantics to usual
true/false conditional lock semantics.

Additionally, to avoid silently breaking out-of-tree drivers, rename
iio_device_claim_buffer_mode() to iio_device_claim_try_buffer_mode().

Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Signed-off-by: Kurt Borja &lt;kuurtb@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: light: isl29018: replace sprintf() with safer alternatives</title>
<updated>2025-12-21T11:41:12+00:00</updated>
<author>
<name>Tomas Borquez</name>
<email>tomasborquez13@gmail.com</email>
</author>
<published>2025-11-26T20:32:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a306a64bf790ed084601d7f3e89d5dc4a18a5c2'/>
<id>urn:sha1:5a306a64bf790ed084601d7f3e89d5dc4a18a5c2</id>
<content type='text'>
This patch replaces sprintf() with sysfs_emit() and sysfs_emit_at() safer
alternative with no functional changes.

Signed-off-by: Tomas Borquez &lt;tomasborquez13@gmail.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
