<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/drivers/iio, branch linux-6.6.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-6.6.y</id>
<link rel='self' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-6.6.y'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-09-14T11:29:41+00:00</updated>
<entry>
<title>iio: light: gp2ap002: re-enable irq if runtime suspend fails</title>
<updated>2026-09-14T11:29:41+00:00</updated>
<author>
<name>Nikhil Gautam</name>
<email>nikhilgtr@gmail.com</email>
</author>
<published>2026-07-22T16:22:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=83db3f0d7982eb8d14153c5116d3458df317a5dc'/>
<id>urn:sha1:83db3f0d7982eb8d14153c5116d3458df317a5dc</id>
<content type='text'>
[ Upstream commit 5d89e7cbac40057f5241a0832a86ce0fe97e4818 ]

gp2ap002_runtime_suspend() disables the irq before writing OPMOD. If
the write fails, the callback returns an error with the irq still
disabled while the PM core marks the device active again.

re-enable the irq before returning the error so the irq state matches
the active state the PM core restores.

Fixes: 97d642e23037c ("iio: light: Add a driver for Sharp GP2AP002x00F")
Signed-off-by: Nikhil Gautam &lt;nikhilgtr@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: light: gp2ap002: Fix unbalanced runtime PM on repeated event writes</title>
<updated>2026-09-14T11:29:41+00:00</updated>
<author>
<name>Nikhil Gautam</name>
<email>nikhilgtr@gmail.com</email>
</author>
<published>2026-07-22T16:22:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8e76ab81319858736ccf23141e9415f9a1869337'/>
<id>urn:sha1:8e76ab81319858736ccf23141e9415f9a1869337</id>
<content type='text'>
[ Upstream commit 579c049b4cb6fc72ce2c505fc5334540be0efcd3 ]

The IIO core does not filter duplicate writes to the event enable
attribute, so writing the same value twice invokes
write_event_config() twice. Enabling twice leaks a runtime PM
reference, preventing the device from ever suspending again;
disabling twice underflows the usage count and triggers a
"Runtime PM usage count underflow" warning.

Bail out early when the requested state matches the current state.
While at it, switch to pm_runtime_resume_and_get() so a failed
resume is propagated to userspace instead of silently marking the
event enabled.

Fixes: 97d642e23037c ("iio: light: Add a driver for Sharp GP2AP002x00F")
Signed-off-by: Nikhil Gautam &lt;nikhilgtr@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: light: tsl2583: return zero in write_raw() on success</title>
<updated>2026-09-14T11:29:34+00:00</updated>
<author>
<name>Sang-Heon Jeon</name>
<email>ekffu200098@gmail.com</email>
</author>
<published>2026-07-27T18:47:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cf62dd07b08e9763f8a0e847ff1eb506ff7f2888'/>
<id>urn:sha1:cf62dd07b08e9763f8a0e847ff1eb506ff7f2888</id>
<content type='text'>
[ Upstream commit 42e8791841e0677418a3ccc97fa5c22a1455f417 ]

tsl2583_write_raw() returns the value of pm_runtime_put_autosuspend(),
which is 1 if the device is already runtime suspended.

In that case write() on the sysfs attribute returns 1 instead of the
number of bytes written. Make tsl2583_write_raw() always return zero
on success.

Fixes: 371894f5d1a0 ("iio: tsl2583: add runtime power management support")
Signed-off-by: Sang-Heon Jeon &lt;ekffu200098@gmail.com&gt;
Reviewed-by: Brian Masney &lt;bmasney@redhat.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: light: isl29028: return zero in write_raw() on success</title>
<updated>2026-09-14T11:29:34+00:00</updated>
<author>
<name>Sang-Heon Jeon</name>
<email>ekffu200098@gmail.com</email>
</author>
<published>2026-07-27T18:47:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d7c5a80939e1284a54f8f426999bbb566b2509e4'/>
<id>urn:sha1:d7c5a80939e1284a54f8f426999bbb566b2509e4</id>
<content type='text'>
[ Upstream commit 55b75622829779223b9e32aa9600a8651d3e2df4 ]

isl29028_write_raw() returns the value of pm_runtime_put_autosuspend(),
which is 1 if the device is already runtime suspended.

In that case write() on the sysfs attribute returns 1 instead of the
number of bytes written. Make isl29028_write_raw() always return zero
on success.

Fixes: 2db5054ac28d ("staging: iio: isl29028: add runtime power management support")
Signed-off-by: Sang-Heon Jeon &lt;ekffu200098@gmail.com&gt;
Reviewed-by: Brian Masney &lt;bmasney@redhat.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: light: tsl2772: fix ALS calibscale readback</title>
<updated>2026-09-14T11:29:34+00:00</updated>
<author>
<name>Yuanshen Cao</name>
<email>alex.caoys@gmail.com</email>
</author>
<published>2026-07-24T23:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3f701835d082a48a3e12a2ced0ed50ae009a5767'/>
<id>urn:sha1:3f701835d082a48a3e12a2ced0ed50ae009a5767</id>
<content type='text'>
[ Upstream commit ac75550ab5b5d73649bffea245c2075fd9249bd0 ]

The read_raw() implementation uses IIO_LIGHT to distinguish between the
ambient light and proximity channels when handling
IIO_CHAN_INFO_CALIBSCALE.

However, the ALS channel is registered as IIO_INTENSITY, while
write_raw() correctly writes to IIO_INTENSITY. As a result, reading
in_intensity0_calibscale incorrectly returns the proximity gain instead
of the ALS gain.

This causes the following user-visible behavior:
- Writing in_intensity0_calibscale appears to have no effect because the
  readback reports the proximity gain.
- Writing in_proximity0_calibscale causes both in_proximity0_calibscale
  and in_intensity0_calibscale to report the same value.

Fix this by checking for IIO_INTENSITY in read_raw(), matching the
channel definition and the existing write_raw() implementation.

Fixes: 3c97c08b5735 ("staging: iio: add TAOS tsl2x7x driver")
Signed-off-by: Yuanshen Cao &lt;alex.caoys@gmail.com&gt;
Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: accel: dmard09: Implement IIO_CHAN_INFO_SCALE</title>
<updated>2026-09-14T11:29:09+00:00</updated>
<author>
<name>Mert Seftali</name>
<email>mertsftl@gmail.com</email>
</author>
<published>2026-07-10T08:36:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=39bb722b7e2c99702dd4c6a64699cedf12ac8a32'/>
<id>urn:sha1:39bb722b7e2c99702dd4c6a64699cedf12ac8a32</id>
<content type='text'>
[ Upstream commit aa58ecc73466d0cb8c418de98e2225490bf600e3 ]

Reading the in_accel_scale attribute on the DMARD09 has always returned
-EINVAL: the channels advertise scale via info_mask_shared_by_type so the
IIO core exposes the attribute, but dmard09_read_raw() only handles
IIO_CHAN_INFO_RAW, so a SCALE read falls through to 'default: return
-EINVAL':

    $ cat .../iio:deviceX/in_accel_scale
    cat: in_accel_scale: Invalid argument

leaving userspace with raw counts it cannot convert to m/s^2.

The driver was written from a vendor source [1] without a datasheet, and
the scale was declared but never implemented. The vendor source carries
the sensitivity: its conversion is

    acc = raw * GRAVITY_EARTH_1000 / sensitivity   (then / 1000 -&gt; m/s^2)

with sensitivity = 32 and GRAVITY_EARTH_1000 = 9807 ("about
(9.80665)*1000"), i.e. 32 counts correspond to 1 g.

That sensitivity applies to the value this driver already reports as raw:
the vendor reduces each 16-bit sample to a signed 9-bit value, and the
preparation in dmard09_read_raw() yields the same value. It is
self-consistent: 256 counts / 32 = 8 g full scale, matching the +/-8g
range.

Implement the scale derived from that sensitivity using standard gravity:

    scale = 9.80665 / 32 = 0.3064578125 m/s^2 per LSB

Link: https://github.com/minstrelsy/mediatek/blob/1f49d8c87b839651bc89afc870277e8e0f2e2d55/custom/common/kernel/accelerometer/dmard09/dmard09.c [1]
Fixes: a4fa6509dda4 ("iio: accel: add support for the Domintech DMARD09 3-axis accelerometer")
Signed-off-by: Mert Seftali &lt;mertsftl@gmail.com&gt;
Reviewed-by: Joshua Crofts &lt;joshua.crofts1@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: orientation: hid-sensor-rotation: Avoid race between callback setup and device exposure</title>
<updated>2026-09-14T11:29:04+00:00</updated>
<author>
<name>Sanjay Chitroda</name>
<email>sanjayembeddedse@gmail.com</email>
</author>
<published>2026-06-22T05:29:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8d32795f0a49f9faa6df281ba5119e18d79a32b3'/>
<id>urn:sha1:8d32795f0a49f9faa6df281ba5119e18d79a32b3</id>
<content type='text'>
[ Upstream commit 0e32649a7cf3cd784862f8dc0c68a5134731bfff ]

The driver currently exposes the IIO device to userspace before
completing sensor hub callback registration, and similarly removes
callbacks while the device can still be accessed during teardown.

This creates a timing window where userspace may enable the buffer
before callbacks are available. In such cases:
- samples can be dropped,
- buffered reads may observe stale or no data.

Reorder probe and remove paths to ensure callbacks are active before
device exposure and are removed after device is no longer accessible.

This avoids a race window leading to data loss.

Signed-off-by: Sanjay Chitroda &lt;sanjayembeddedse@gmail.com&gt;
Fixes: fc18dddc0625 ("iio: hid-sensors: Added device rotation support")
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: light: opt4001: Fix reversed GENMASK() arguments in fault count mask</title>
<updated>2026-09-14T11:28:45+00:00</updated>
<author>
<name>Nikhil Gautam</name>
<email>nikhilgtr@gmail.com</email>
</author>
<published>2026-07-14T11:31:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ee2d20a386668df5bdf4721843600d2737d2ab24'/>
<id>urn:sha1:ee2d20a386668df5bdf4721843600d2737d2ab24</id>
<content type='text'>
commit d64bfd9f3352b9d9bdeca06de1a0a1c1bd47b896 upstream.

GENMASK(h, l) requires h &gt;= l, but OPT4001_CTRL_FAULT_COUNT is defined
as GENMASK(0, 1). The define is currently unused so there is no
functional impact, but fix it before anyone builds on it, and add the
_MASK suffix for consistency with the neighbouring definitions.

Fixes: 9a9608418292 ("iio: light: Add support for TI OPT4001 light sensor")
Signed-off-by: Nikhil Gautam &lt;nikhilgtr@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@oss.qualcomm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: light: opt4001: Reject integration times with a non-zero seconds part</title>
<updated>2026-09-14T11:28:44+00:00</updated>
<author>
<name>Nikhil Gautam</name>
<email>nikhilgtr@gmail.com</email>
</author>
<published>2026-07-14T11:31:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7a1be6e7a857e989ed04801e8fdbb5c33c750937'/>
<id>urn:sha1:7a1be6e7a857e989ed04801e8fdbb5c33c750937</id>
<content type='text'>
commit d0f21621f8b2b46661ea066d20705dbf7253db87 upstream.

opt4001_write_raw() only looks at val2 when setting the integration
time, so a write such as 1.000600 is silently accepted as 600 us.
Return -EINVAL if val is non-zero.

Fixes: 9a9608418292 ("iio: light: Add support for TI OPT4001 light sensor")
Signed-off-by: Nikhil Gautam &lt;nikhilgtr@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@oss.qualcomm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: light: opt4001: Fix incompatible pointer type passed to div_u64_rem()</title>
<updated>2026-09-14T11:28:44+00:00</updated>
<author>
<name>Nikhil Gautam</name>
<email>nikhilgtr@gmail.com</email>
</author>
<published>2026-07-14T11:31:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0f9f6d0ee5a594ceee7913a954232d41affef2b1'/>
<id>urn:sha1:0f9f6d0ee5a594ceee7913a954232d41affef2b1</id>
<content type='text'>
commit afa28741c9a2cf6edb2e41e25ff146a562160bb3 upstream.

div_u64_rem() takes a u32 * for the remainder but is passed val2, which
is an int *. There is no functional impact as int and u32 have the same
size and representation on all supported architectures and the remainder
is always smaller than the divisor, so it fits in the positive range of
int. Fix the type mismatch by using a local u32 for the remainder and
assigning the result to *val2.

Fixes: 9a9608418292 ("iio: light: Add support for TI OPT4001 light sensor")
Signed-off-by: Nikhil Gautam &lt;nikhilgtr@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@oss.qualcomm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
