<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/iio/proximity/hx9023s.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2026-03-19T15:15:31Z</updated>
<entry>
<title>iio: proximity: hx9023s: Protect against division by zero in set_samp_freq</title>
<updated>2026-03-19T15:15:31Z</updated>
<author>
<name>Yasin Lee</name>
<email>yasin.lee.x@gmail.com</email>
</author>
<published>2026-02-13T15:14:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=739fdfe65678d8e5dcf59496c56b32ab3ba3dbaa'/>
<id>urn:sha1:739fdfe65678d8e5dcf59496c56b32ab3ba3dbaa</id>
<content type='text'>
commit a318cfc0853706f1d6ce682dba660bc455d674ef upstream.

Avoid division by zero when sampling frequency is unspecified.

Fixes: 60df548277b7 ("iio: proximity: Add driver support for TYHX's HX9023S capacitive proximity sensor")
Signed-off-by: Yasin Lee &lt;yasin.lee.x@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@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: proximity: hx9023s: fix assignment order for __counted_by</title>
<updated>2026-03-19T15:15:31Z</updated>
<author>
<name>Yasin Lee</name>
<email>yasin.lee.x@gmail.com</email>
</author>
<published>2026-02-13T15:14:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2c2661e1ed3c5c25677ceb7fb53471f742e75158'/>
<id>urn:sha1:2c2661e1ed3c5c25677ceb7fb53471f742e75158</id>
<content type='text'>
commit 585b90c0161ab77416fe3acdbdc55b978e33e16c upstream.

Initialize fw_size before copying firmware data into the flexible
array member to match the __counted_by() annotation. This fixes the
incorrect assignment order that triggers runtime safety checks.

Fixes: e9ed97be4fcc ("iio: proximity: hx9023s: Added firmware file parsing functionality")
Signed-off-by: Yasin Lee &lt;yasin.lee.x@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@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: proximity: Remove dev_err_probe() if error is -ENOMEM</title>
<updated>2025-08-25T08:40:55Z</updated>
<author>
<name>Xichao Zhao</name>
<email>zhao.xichao@vivo.com</email>
</author>
<published>2025-08-21T08:06:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7216d7b9beb87f4afd62d737f024254ca3c0746c'/>
<id>urn:sha1:7216d7b9beb87f4afd62d737f024254ca3c0746c</id>
<content type='text'>
The dev_err_probe() doesn't do anything when the error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just return the
value instead.

Signed-off-by: Xichao Zhao &lt;zhao.xichao@vivo.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Link: https://patch.msgid.link/20250821080723.525379-7-zhao.xichao@vivo.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: proximity: Use iio_push_to_buffers_with_ts() to provide length for runtime checks.</title>
<updated>2025-05-21T13:20:26Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2025-04-13T10:34:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fc11c42dd13710342c05008a0bccf426247cb101'/>
<id>urn:sha1:fc11c42dd13710342c05008a0bccf426247cb101</id>
<content type='text'>
This new function allows us to perform debug checks in the helper to ensure
that the overrun does not occur. Use it in all the simple cases where
either a static buffer or a structure is used in the drivers.

Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Link: https://patch.msgid.link/20250413103443.2420727-18-jic23@kernel.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: normalize array sentinel style</title>
<updated>2025-04-22T18:10:04Z</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2025-04-11T20:49:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=70788d26ae1c482dba843efcc0cf166c2ba36a38'/>
<id>urn:sha1:70788d26ae1c482dba843efcc0cf166c2ba36a38</id>
<content type='text'>
Use `\t(\{ ?\},|\{\}|\{\s*/\*.*\*/\s*\},?)$` regex to find and replace
the array sentinel in all IIO drivers to the same style.

For some time, we've been trying to consistently use `{ }` (no trailing
comma, no comment, one space between braces) for array sentinels in the
IIO subsystem. Still nearly 50% of existing code uses a different style.
To save reviewers from having to request this trivial change as
frequently, let's normalize the style in all existing IIO drivers.
At least when code is copy/pasted to new drivers, the style will be
consistent.

Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Link: https://patch.msgid.link/20250411-iio-sentinel-normalization-v1-1-d293de3e3d93@baylibre.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: proximity: hx9023s: Switch to sparse friendly iio_device_claim/release_direct()</title>
<updated>2025-04-22T18:10:01Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2025-03-31T12:13:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9dc7ed3bfe437b3a9fc5399fbe594a4b054eeeec'/>
<id>urn:sha1:9dc7ed3bfe437b3a9fc5399fbe594a4b054eeeec</id>
<content type='text'>
These new functions allow sparse to find failures to release
direct mode reducing chances of bugs over the claim_direct_mode()
functions that are deprecated.

Cc: Yasin Lee &lt;yasin.lee.x@gmail.com&gt;
Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Marcelo Schmitt &lt;marcelo.schmitt1@gmail.com&gt;
Link: https://patch.msgid.link/20250331121317.1694135-32-jic23@kernel.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: proximity: Fix use-after-free in hx9023s_send_cfg()</title>
<updated>2025-02-03T19:30:11Z</updated>
<author>
<name>Dheeraj Reddy Jonnalagadda</name>
<email>dheeraj.linuxdev@gmail.com</email>
</author>
<published>2025-01-07T12:35:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5d702aa2a47bbab6231382f9ead5be40a287a53b'/>
<id>urn:sha1:5d702aa2a47bbab6231382f9ead5be40a287a53b</id>
<content type='text'>
Reorder the assignment of fw_size to happen before release_firmware()
to avoid accessing the firmware structure after it's been freed.

Fixes: e9ed97be4fcc ("iio: proximity: hx9023s: Added firmware file parsing functionality")
Closes: https://scan7.scan.coverity.com/#/project-view/52337/11354?selectedIssue=1602791
Signed-off-by: Dheeraj Reddy Jonnalagadda &lt;dheeraj.linuxdev@gmail.com&gt;
Reviewed-by: David Lechner &lt;dlechner@baylibre.com&gt;
Link: https://patch.msgid.link/20250107123510.44978-1-dheeraj.linuxdev@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: proximity: Use aligned_s64 instead of open coding alignment.</title>
<updated>2024-12-28T14:28:15Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2024-12-15T18:28:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8ee2a74efff70e8d79a93e4f4347a347d19b95cd'/>
<id>urn:sha1:8ee2a74efff70e8d79a93e4f4347a347d19b95cd</id>
<content type='text'>
Use this new type to both slightly simplify the code and avoid
confusing static analysis tools. Mostly this series is about consistency
to avoid this code pattern getting copied into more drivers.

Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://patch.msgid.link/20241215182912.481706-6-jic23@kernel.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: proximity: hx9023s: Added firmware file parsing functionality</title>
<updated>2024-12-28T14:28:14Z</updated>
<author>
<name>Yasin Lee</name>
<email>yasin.lee.x@gmail.com</email>
</author>
<published>2024-12-16T07:59:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e9ed97be4fccd44beae4347eed38ea801c5d814d'/>
<id>urn:sha1:e9ed97be4fccd44beae4347eed38ea801c5d814d</id>
<content type='text'>
Configuration information is now prioritized from the firmware file.
If the firmware file is missing or fails to parse, the driver falls
back to using the default configuration list for writing the settings.

Signed-off-by: Yasin Lee &lt;yasin.lee.x@gmail.com&gt;
Link: https://patch.msgid.link/20241216-hx9023s-firmware-20241209-v2-1-ce1b0a1121d0@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: fix write_event_config signature</title>
<updated>2024-11-03T20:33:44Z</updated>
<author>
<name>Julien Stephan</name>
<email>jstephan@baylibre.com</email>
</author>
<published>2024-10-31T15:27:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b4b42f28a0df6b9d31f0003f7dea3bddf272eaa4'/>
<id>urn:sha1:b4b42f28a0df6b9d31f0003f7dea3bddf272eaa4</id>
<content type='text'>
write_event_config callback use an int for state, but it is actually a
boolean. iio_ev_state_store is actually using kstrtobool to check user
input, then gives the converted boolean value to write_event_config.

Fix signature and update all iio drivers to use the new signature.

This patch has been partially written using coccinelle with the
following script:

$ cat iio-bool.cocci
// Options: --all-includes

virtual patch

@c1@
identifier iioinfo;
identifier wecfunc;
@@
 static const struct iio_info iioinfo = {
        ...,
        .write_event_config =
(
 wecfunc
|
 &amp;wecfunc
),
        ...,
 };

@@
identifier c1.wecfunc;
identifier indio_dev, chan, type, dir, state;
@@
 int wecfunc(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir,
-int
+bool
 state) {
  ...
 }

make coccicheck MODE=patch COCCI=iio-bool.cocci M=drivers/iio

Unfortunately, this script didn't match all files:
* all write_event_config callbacks using iio_device_claim_direct_scoped
  were not detected and not patched.
* all files that do not assign and declare the write_event_config
  callback in the same file.

iio.h was also manually updated.

The patch was build tested using allmodconfig config.

cc: Julia Lawall &lt;julia.lawall@inria.fr&gt;
Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
Link: https://patch.msgid.link/20241031-iio-fix-write-event-config-signature-v2-7-2bcacbb517a2@baylibre.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
