<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/iio/proximity, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-07-14T15:00:23Z</updated>
<entry>
<title>iio: prox: isl29501: Fix buffer alignment in iio_push_to_buffers_with_timestamp()</title>
<updated>2021-07-14T15:00:23Z</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=dd8437a8820b1a4b9fa7d4b748218c6df98f0180'/>
<id>urn:sha1:dd8437a8820b1a4b9fa7d4b748218c6df98f0180</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-14T15:00:11Z</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=8e9ad18f78cbda78aad14dadbeece319abe1be8b'/>
<id>urn:sha1:8e9ad18f78cbda78aad14dadbeece319abe1be8b</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-14T15:00:11Z</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=a37309a2cf09f597cd2d00eb2044a99b5ff3f9b9'/>
<id>urn:sha1:a37309a2cf09f597cd2d00eb2044a99b5ff3f9b9</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-14T15:00:11Z</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=a4ff9711c9ebd3a9717ff8b2a26cc1923de86277'/>
<id>urn:sha1:a4ff9711c9ebd3a9717ff8b2a26cc1923de86277</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:56:37Z</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=37b2153a79be949c1dddc8f326d61d3b5069c586'/>
<id>urn:sha1:37b2153a79be949c1dddc8f326d61d3b5069c586</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: sx9310: Fix access to variable DT array</title>
<updated>2021-05-14T08:52:05Z</updated>
<author>
<name>Gwendal Grignou</name>
</author>
<published>2021-03-26T18:46:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99f8854ad3dadda15fd46deca57fc9205f888980'/>
<id>urn:sha1:99f8854ad3dadda15fd46deca57fc9205f888980</id>
<content type='text'>
commit 6f0078ae704d94b1a93e5f3d0a44cf3d8090fa91 upstream.

With the current code, we want to read 4 entries from DT array
"semtech,combined-sensors". If there are less, we silently fail as
of_property_read_u32_array() returns -EOVERFLOW.

First count the number of entries and if between 1 and 4, collect the
content of the array.

Fixes: 5b19ca2c78a0 ("iio: sx9310: Set various settings from DT")
Signed-off-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20210326184603.251683-2-gwendal@chromium.org
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: sx9310: Fix write_.._debounce()</title>
<updated>2021-05-14T08:52:04Z</updated>
<author>
<name>Gwendal Grignou</name>
</author>
<published>2021-03-31T18:22:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47007b0dd0f7251e277d205ca055e3f74d490405'/>
<id>urn:sha1:47007b0dd0f7251e277d205ca055e3f74d490405</id>
<content type='text'>
commit fc948409ccc1e8afe8655cee77c686eedbfbee60 upstream.

Check input to be sure it matches Semtech sx9310 specification and
can fit into debounce register.
Compare argument writen to thresh_.._period with read from same
sysfs attribute:

Before:                   Afer:
write   |  read           write   |  read
-1      |     8           -1 fails: -EINVAL
0       |     8           0       |     0
1       |     0           1       |     0
2..15   |  2^log2(N)      2..15   |  2^log2(N)
16      |     0           &gt;= 16 fails: -EINVAL

Fixes: 1b6872015f0b ("iio: sx9310: Support setting debounce values")
Signed-off-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Link: https://lore.kernel.org/r/20210331182222.219533-1-gwendal@chromium.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: sx9310: Fix semtech,avg-pos-strength setting when &gt; 16</title>
<updated>2021-01-14T21:01:22Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2020-12-02T20:02:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8653aff1c8876142f965fc69e12ba217da13182'/>
<id>urn:sha1:b8653aff1c8876142f965fc69e12ba217da13182</id>
<content type='text'>
This DT property can be 0, 16, and then 64, but not 32. The math here
doesn't recognize this slight bump in the power of 2 numbers and
translates a DT property of 64 into the register value '3' when it
really should be '2'. Fix it by subtracting one more if the number being
translated is larger than 31. Also use clamp() because we're here.

Cc: Daniel Campello &lt;campello@chromium.org&gt;
Cc: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Cc: Peter Meerwald-Stadler &lt;pmeerw@pmeerw.net&gt;
Cc: Douglas Anderson &lt;dianders@chromium.org&gt;
Cc: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Cc: Evan Green &lt;evgreen@chromium.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20201202200252.986230-1-swboyd@chromium.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: sx9310: Off by one in sx9310_read_thresh()</title>
<updated>2021-01-14T20:54:42Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2020-12-01T07:03:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a06b63a1200bd40fd20fa695739e479e2b2ae948'/>
<id>urn:sha1:a06b63a1200bd40fd20fa695739e479e2b2ae948</id>
<content type='text'>
This &gt; should be &gt;= to prevent reading one element beyond the end of
the sx9310_pthresh_codes[] array.

Fixes: ad2b473e2ba3 ("iio: sx9310: Support setting proximity thresholds")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/X8XqwK0z//8sSWJR@mwanda
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: proximity: vl53l0x-i2c add i2c_device_id</title>
<updated>2020-11-01T15:28:32Z</updated>
<author>
<name>Vaishnav M A</name>
</author>
<published>2020-10-18T19:51:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8bb97bab3f13f396f53d32defd4f267309733884'/>
<id>urn:sha1:8bb97bab3f13f396f53d32defd4f267309733884</id>
<content type='text'>
Add i2c_device_id table for the vl53l0x-i2c driver,
helps in device instantiation using i2c_new_client_device()
or from userspace in cases where device-tree based description
is not possible now, like device(s) on a gbphy i2c adapter
created by greybus.

Signed-off-by: Vaishnav M A &lt;vaishnav@beagleboard.org&gt;
Link: https://lore.kernel.org/r/20201018195102.GA814713@ubuntu
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
