<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/iio/proximity, 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-08-28T14:21:32Z</updated>
<entry>
<title>iio: proximity: isl29501: fix buffered read on big-endian systems</title>
<updated>2025-08-28T14:21:32Z</updated>
<author>
<name>David Lechner</name>
</author>
<published>2025-07-22T20:54:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=04318dbadadd3014839aa14670ccc6c71d6634fa'/>
<id>urn:sha1:04318dbadadd3014839aa14670ccc6c71d6634fa</id>
<content type='text'>
commit de18e978d0cda23e4c102e18092b63a5b0b3a800 upstream.

Fix passing a u32 value as a u16 buffer scan item. This works on little-
endian systems, but not on big-endian systems.

A new local variable is introduced for getting the register value and
the array is changed to a struct to make the data layout more explicit
rather than just changing the type and having to recalculate the proper
length needed for the timestamp.

Fixes: 1c28799257bc ("iio: light: isl29501: Add support for the ISL29501 ToF sensor.")
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
Link: https://patch.msgid.link/20250722-iio-use-more-iio_declare_buffer_with_ts-7-v2-1-d3ebeb001ed3@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: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig</title>
<updated>2024-11-08T15:20:48Z</updated>
<author>
<name>Javier Carrasco</name>
</author>
<published>2024-10-03T21:04:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f36e441f30f20fd040d7ae6ba928c21354efa703'/>
<id>urn:sha1:f36e441f30f20fd040d7ae6ba928c21354efa703</id>
<content type='text'>
commit 75461a0b15d7c026924d0001abce0476bbc7eda8 upstream.

This driver makes use of triggered buffers, but does not select the
required modules.

Add the missing 'select IIO_BUFFER' and 'select IIO_TRIGGERED_BUFFER'.

Fixes: 16b05261537e ("mb1232.c: add distance iio sensor with i2c")
Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Link: https://patch.msgid.link/20241003-iio-select-v1-13-67c0385197cd@gmail.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: prox: isl29501: Fix buffer alignment in iio_push_to_buffers_with_timestamp()</title>
<updated>2021-07-14T14:53:45Z</updated>
<author>
<name>Jonathan Cameron</name>
</author>
<published>2021-06-13T15:23:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe9452c9d7adb56a0a32f6472f2d57da2605c948'/>
<id>urn:sha1:fe9452c9d7adb56a0a32f6472f2d57da2605c948</id>
<content type='text'>
[ Upstream commit 92babc9938ebbf4050f2fba774836f7edc16a570 ]

Add __aligned(8) to ensure the buffer passed to
iio_push_to_buffers_with_timestamp() is suitable for the naturally
aligned timestamp that will be inserted.

Here an explicit structure is not used, because the holes would
necessitate the addition of an explict memset(), to avoid a kernel
data leak, making for a less minimal fix.

Fixes: 1c28799257bc ("iio: light: isl29501: Add support for the ISL29501 ToF sensor.")
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Mathieu Othacehe &lt;m.othacehe@gmail.com&gt;
Reviewed-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Link: https://lore.kernel.org/r/20210613152301.571002-9-jic23@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: prox: as3935: Fix buffer alignment in iio_push_to_buffers_with_timestamp()</title>
<updated>2021-07-14T14:53:39Z</updated>
<author>
<name>Jonathan Cameron</name>
</author>
<published>2021-05-01T17:01:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9fc6ef022b4741c7d55adfc0d133a9208f5e12f6'/>
<id>urn:sha1:9fc6ef022b4741c7d55adfc0d133a9208f5e12f6</id>
<content type='text'>
[ Upstream commit 37eb8d8c64f2ecb3a5521ba1cc1fad973adfae41 ]

To make code more readable, use a structure to express the channel
layout and ensure the timestamp is 8 byte aligned.

Found during an audit of all calls of uses of
iio_push_to_buffers_with_timestamp()

Fixes: 37b1ba2c68cf ("iio: proximity: as3935: fix buffer stack trashing")
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Matt Ranostay &lt;matt.ranostay@konsulko.com&gt;
Acked-by: Matt Ranostay &lt;matt.ranostay@konsulko.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20210501170121.512209-15-jic23@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: prox: pulsed-light: Fix buffer alignment in iio_push_to_buffers_with_timestamp()</title>
<updated>2021-07-14T14:53:39Z</updated>
<author>
<name>Jonathan Cameron</name>
</author>
<published>2021-05-01T17:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da4dfaed9be8e4731cc3fa530a7f01b8a52d18b9'/>
<id>urn:sha1:da4dfaed9be8e4731cc3fa530a7f01b8a52d18b9</id>
<content type='text'>
[ Upstream commit 679cc377a03ff1944491eafc7355c1eb1fad4109 ]

To make code more readable, use a structure to express the channel
layout and ensure the timestamp is 8 byte aligned.

Found during an audit of all calls of uses of
iio_push_to_buffers_with_timestamp()

Fixes: cb119d535083 ("iio: proximity: add support for PulsedLight LIDAR")
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Matt Ranostay &lt;matt.ranostay@konsulko.com&gt;
Acked-by: Matt Ranostay &lt;matt.ranostay@konsulko.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20210501170121.512209-14-jic23@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: prox: srf08: Fix buffer alignment in iio_push_to_buffers_with_timestamp()</title>
<updated>2021-07-14T14:53:38Z</updated>
<author>
<name>Jonathan Cameron</name>
</author>
<published>2021-05-01T17:01:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b40dab164dc3fe587533f0d81d120adac41b394e'/>
<id>urn:sha1:b40dab164dc3fe587533f0d81d120adac41b394e</id>
<content type='text'>
[ Upstream commit 19f1a254fe4949fff1e67db386409f48cf438bd7 ]

To make code more readable, use a structure to express the channel
layout and ensure the timestamp is 8 byte aligned.

Found during an audit of all calls of uses of
iio_push_to_buffers_with_timestamp()

Fixes: 78f839029e1d ("iio: distance: srf08: add IIO driver for us ranger")
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Andreas Klinger &lt;ak@it-klinger.de&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20210501170121.512209-13-jic23@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: proximity: pulsedlight: Fix rumtime PM imbalance on error</title>
<updated>2021-05-19T08:08:30Z</updated>
<author>
<name>Dinghao Liu</name>
</author>
<published>2021-04-12T05:32:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=57f99e92e2f7c421fb9a6c253c3a996e3be2260e'/>
<id>urn:sha1:57f99e92e2f7c421fb9a6c253c3a996e3be2260e</id>
<content type='text'>
[ Upstream commit a2fa9242e89f27696515699fe0f0296bf1ac1815 ]

When lidar_write_control() fails, a pairing PM usage counter
decrement is needed to keep the counter balanced.

Fixes: 4ac4e086fd8c5 ("iio: pulsedlight-lidar-lite: add runtime PM")
Signed-off-by: Dinghao Liu &lt;dinghao.liu@zju.edu.cn&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20210412053204.4889-1-dinghao.liu@zju.edu.cn
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:proximity:mb1232: Fix timestamp alignment and prevent data leak.</title>
<updated>2020-09-17T11:47:50Z</updated>
<author>
<name>Jonathan Cameron</name>
</author>
<published>2020-07-22T15:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=66b8b8f75e3541d002f3c16f5fabbfafd4552120'/>
<id>urn:sha1:66b8b8f75e3541d002f3c16f5fabbfafd4552120</id>
<content type='text'>
commit f60e8bb84282b8e633956cfe74b4f0d64ca73cec upstream.

One of a class of bugs pointed out by Lars in a recent review.
iio_push_to_buffers_with_timestamp assumes the buffer used is aligned
to the size of the timestamp (8 bytes).  This is not guaranteed in
this driver which uses a 16 byte s16 array on the stack   As Lars also noted
this anti pattern can involve a leak of data to userspace and that
indeed can happen here.  We close both issues by moving to
a suitable structure in the iio_priv() data with alignment
ensured by use of an explicit c structure.  This data is allocated
with kzalloc so no data can leak appart from previous readings.

In this case the forced alignment of the ts is necessary to ensure
correct padding on x86_32 where the s64 would only be 4 byte aligned.

Fixes: 16b05261537e ("mb1232.c: add distance iio sensor with i2c")
Reported-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Cc: Andreas Klinger &lt;ak@it-klinger.de&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>iio: srf04: fix wrong limitation in distance measuring</title>
<updated>2019-10-12T13:31:09Z</updated>
<author>
<name>Andreas Klinger</name>
</author>
<published>2019-10-06T14:29:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=431f7667bd6889a274913162dfd19cce9d84848e'/>
<id>urn:sha1:431f7667bd6889a274913162dfd19cce9d84848e</id>
<content type='text'>
The measured time value in the driver is limited to the maximum distance
which can be read by the sensor. This limitation was wrong and is fixed
by this patch.

It also takes into account that we are supporting a variety of sensors
today and that the recently added sensors have a higher maximum
distance range.

Changes in v2:
- Added a Tested-by

Suggested-by: Zbyněk Kocur &lt;zbynek.kocur@fel.cvut.cz&gt;
Tested-by: Zbyněk Kocur &lt;zbynek.kocur@fel.cvut.cz&gt;
Signed-off-by: Andreas Klinger &lt;ak@it-klinger.de&gt;
Cc:&lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>Kconfig: Fix the reference to the RFD77402 ToF sensor in the 'help' section</title>
<updated>2019-08-25T18:08:36Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2019-08-19T04:48:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a5e353c16d13168b8906c96013b887896ccf41a'/>
<id>urn:sha1:4a5e353c16d13168b8906c96013b887896ccf41a</id>
<content type='text'>
This should be RFD77402, not RFD77420.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
