<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/drivers/iio/light, branch linux-7.2.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-7.2.y</id>
<link rel='self' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-7.2.y'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-09-14T11:40:32+00:00</updated>
<entry>
<title>iio: light: gp2ap002: re-enable irq if runtime suspend fails</title>
<updated>2026-09-14T11:40:32+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=0ffd3e983069b033b98e9d6c4d88c5c5745d9b9d'/>
<id>urn:sha1:0ffd3e983069b033b98e9d6c4d88c5c5745d9b9d</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:40:32+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=470edb012b1d9a4fba1cd59e329e60f0798c791a'/>
<id>urn:sha1:470edb012b1d9a4fba1cd59e329e60f0798c791a</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: opt4060: Fix pointer type passed to div_u64_rem()</title>
<updated>2026-09-14T11:40:32+00:00</updated>
<author>
<name>Vidhu Sarwal</name>
<email>vidhu.linux@gmail.com</email>
</author>
<published>2026-07-15T01:15:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=38c077c815901f01bbaf81f9725966fcfd8c12b5'/>
<id>urn:sha1:38c077c815901f01bbaf81f9725966fcfd8c12b5</id>
<content type='text'>
[ Upstream commit 0ba0ed0d42ebd3144f0050c48374817f5f3f07d6 ]

div_u64_rem() expects a u32 * for the remainder, but
opt4060_read_ev_period() passes val2, which is declared as an
int *. While this has no functional impact, it triggers a pointer type
mismatch.

There is no behavioural change because int and u32 have the same
size and representation on all supported architectures, and the
remainder is always less than MICRO, so it fits within the positive
range of int.

Use a local u32 to receive the remainder before assigning it to
*val2.

Fixes: 0c6db4506ad0 ("iio: light: Add support for TI OPT4060 color sensor")
Signed-off-by: Vidhu Sarwal &lt;vidhu.linux@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:40:15+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=3ad0fd538503a24b0d3805fbfd012f8fb8021c81'/>
<id>urn:sha1:3ad0fd538503a24b0d3805fbfd012f8fb8021c81</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:40:15+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=0649178f3cedbd7ec53b952288e3440140b60c8d'/>
<id>urn:sha1:0649178f3cedbd7ec53b952288e3440140b60c8d</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:40:15+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=fe73809bc314f23933c9a1fb57c0082f9138f918'/>
<id>urn:sha1:fe73809bc314f23933c9a1fb57c0082f9138f918</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: light: opt4001: Fix reversed GENMASK() arguments in fault count mask</title>
<updated>2026-09-11T09:51:06+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=d393ef49d94f59e378023854cf383be8070f41ed'/>
<id>urn:sha1:d393ef49d94f59e378023854cf383be8070f41ed</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-11T09:51:06+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=fb21a4113e9119c7a9f3c1a129773af0cbd67a51'/>
<id>urn:sha1:fb21a4113e9119c7a9f3c1a129773af0cbd67a51</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-11T09:51:06+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=2fb1e09451aef2a39ad32f4f8b2f48d8fdf0c201'/>
<id>urn:sha1:2fb1e09451aef2a39ad32f4f8b2f48d8fdf0c201</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>
<entry>
<title>iio: light: opt4001: Fix power down clearing bits of the wrong register</title>
<updated>2026-09-11T09:51:06+00:00</updated>
<author>
<name>Nikhil Gautam</name>
<email>nikhilgtr@gmail.com</email>
</author>
<published>2026-07-14T11:31:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4157573b37f648dd640ad7b30a9d8e100fbbe9dd'/>
<id>urn:sha1:4157573b37f648dd640ad7b30a9d8e100fbbe9dd</id>
<content type='text'>
commit 3b2cd82c524c75a2173f2e3f874652a75f81cd1d upstream.

opt4001_power_down() intends to clear the operating mode bits in the
CTRL register but reads OPT4001_DEVICE_ID instead of OPT4001_CTRL, so
the value written back to CTRL contains device ID bits rather than the
current configuration.

Fix and simplify this by using regmap_clear_bits() on the CTRL register
directly in the devm action, and drop opt4001_power_down() which has no
other users.

Suggested-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
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>
