<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/iio/test, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>iio: test: add kunit tests for channel prefix naming generation</title>
<updated>2026-09-23T01:53:57+00:00</updated>
<author>
<name>Rodrigo Alencar</name>
<email>rodrigo.alencar@analog.com</email>
</author>
<published>2026-07-29T08:25:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b9f9044be76f8494ff48bbf438ecc5b15e7bd3d4'/>
<id>b9f9044be76f8494ff48bbf438ecc5b15e7bd3d4</id>
<content type='text'>
Add a KUnit test suite covering __iio_chan_prefix_emit(), the helper
that builds IIO sysfs attribute name prefixes from an iio_chan_spec.
The suite groups cases by the enum iio_shared_by mode it exercises:

  - IIO_SHARED_BY_ALL: produces an empty prefix.
  - IIO_SHARED_BY_DIR: emits direction only ("in" / "out").
  - IIO_SHARED_BY_TYPE: emits "&lt;dir&gt;_&lt;type&gt;" and the differential
    "&lt;dir&gt;_&lt;type&gt;-&lt;type&gt;" variant.
  - IIO_SEPARATE: covers the full matrix of indexed, differential,
    modified, output and extend_name combinations, plus the two
    documented error paths (differential without indexed, differential
    with modifier).

A final case exercises the seq_buf overflow path by passing an
undersized buffer and expects -EOVERFLOW.

Also, an entry is created under MAINTAINERS dedicated to tests for IIO
core helpers.

Signed-off-by: Rodrigo Alencar &lt;rodrigo.alencar@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a KUnit test suite covering __iio_chan_prefix_emit(), the helper
that builds IIO sysfs attribute name prefixes from an iio_chan_spec.
The suite groups cases by the enum iio_shared_by mode it exercises:

  - IIO_SHARED_BY_ALL: produces an empty prefix.
  - IIO_SHARED_BY_DIR: emits direction only ("in" / "out").
  - IIO_SHARED_BY_TYPE: emits "&lt;dir&gt;_&lt;type&gt;" and the differential
    "&lt;dir&gt;_&lt;type&gt;-&lt;type&gt;" variant.
  - IIO_SEPARATE: covers the full matrix of indexed, differential,
    modified, output and extend_name combinations, plus the two
    documented error paths (differential without indexed, differential
    with modifier).

A final case exercises the seq_buf overflow path by passing an
undersized buffer and expects -EOVERFLOW.

Also, an entry is created under MAINTAINERS dedicated to tests for IIO
core helpers.

Signed-off-by: Rodrigo Alencar &lt;rodrigo.alencar@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;jonathan.cameron@oss.qualcomm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: fix typos in comments</title>
<updated>2026-09-05T01:49:45+00:00</updated>
<author>
<name>Hemanth Selam</name>
<email>hemanth.selam@gmail.com</email>
</author>
<published>2026-09-04T12:16:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=396581769fb7ed934590a38de11ee74d000ae188'/>
<id>396581769fb7ed934590a38de11ee74d000ae188</id>
<content type='text'>
Fix typos in comments, reported by scripts/checkpatch.pl using the
misspelling list in scripts/spelling.txt.  Only touches comments, no code
changes.

Assisted-by: LLM
Signed-off-by: Hemanth Selam &lt;hemanth.selam@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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix typos in comments, reported by scripts/checkpatch.pl using the
misspelling list in scripts/spelling.txt.  Only touches comments, no code
changes.

Assisted-by: LLM
Signed-off-by: Hemanth Selam &lt;hemanth.selam@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;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: test: iio-test-format: add test case for decimal format</title>
<updated>2026-06-29T23:15:52+00:00</updated>
<author>
<name>Rodrigo Alencar</name>
<email>rodrigo.alencar@analog.com</email>
</author>
<published>2026-06-04T09:59:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c2282e36b332acf04b3a3c4523e460c01c2887cf'/>
<id>c2282e36b332acf04b3a3c4523e460c01c2887cf</id>
<content type='text'>
Add iio_test_iio_format_value_decimal_64() kunit test case for decimal
value formatting, exploring different scales types. Also, the same
iio_val_s64_decompose() helper used to populate local array is used in
iio_test_iio_format_value_integer_64().

Signed-off-by: Rodrigo Alencar &lt;rodrigo.alencar@analog.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add iio_test_iio_format_value_decimal_64() kunit test case for decimal
value formatting, exploring different scales types. Also, the same
iio_val_s64_decompose() helper used to populate local array is used in
iio_test_iio_format_value_integer_64().

Signed-off-by: Rodrigo Alencar &lt;rodrigo.alencar@analog.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: test: Use strscpy() to copy the test description</title>
<updated>2026-06-29T18:05:38+00:00</updated>
<author>
<name>David Laight</name>
<email>david.laight.linux@gmail.com</email>
</author>
<published>2026-06-06T20:26:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1a6808ca4ad50e709a4f9a2b6d9d840d497a272b'/>
<id>1a6808ca4ad50e709a4f9a2b6d9d840d497a272b</id>
<content type='text'>
The buffer length is known to be KUNIT_PARAM_DESC_SIZE

Signed-off-by: David Laight &lt;david.laight.linux@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The buffer length is known to be KUNIT_PARAM_DESC_SIZE

Signed-off-by: David Laight &lt;david.laight.linux@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: test: fix typo from neeeds to needs in comment</title>
<updated>2026-03-21T19:27:32+00:00</updated>
<author>
<name>Shi Hao</name>
<email>i.shihao.999@gmail.com</email>
</author>
<published>2026-03-16T09:00:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5088fc744837eaba3f7a1c374cf9457a4ddbd87e'/>
<id>5088fc744837eaba3f7a1c374cf9457a4ddbd87e</id>
<content type='text'>
Fix incorrect spelling from neeeds to needs.

Signed-off-by: Shi Hao &lt;i.shihao.999@gmail.com&gt;
Reviewed-by: Matti Vaittinen &lt;mazziesaccount@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix incorrect spelling from neeeds to needs.

Signed-off-by: Shi Hao &lt;i.shihao.999@gmail.com&gt;
Reviewed-by: Matti Vaittinen &lt;mazziesaccount@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: test: drop dangling symbol in gain-time-scale helpers</title>
<updated>2025-12-31T17:59:26+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2025-12-28T07:10:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d63d868b312478523670b76007dcc5eaedc3ee07'/>
<id>d63d868b312478523670b76007dcc5eaedc3ee07</id>
<content type='text'>
The code for this never went upstream. It was replaced by other code,
so this should be dropped.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216748
Fixes: cf996f039679 ("iio: test: test gain-time-scale helpers")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code for this never went upstream. It was replaced by other code,
so this should be dropped.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216748
Fixes: cf996f039679 ("iio: test: test gain-time-scale helpers")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: test: Add KUnit tests for iio_multiply_value()</title>
<updated>2025-09-10T18:47:05+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hansg@kernel.org</email>
</author>
<published>2025-08-31T10:48:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c732e60ee10ed0611a59513cbf9c8d35fbe7cf65'/>
<id>c732e60ee10ed0611a59513cbf9c8d35fbe7cf65</id>
<content type='text'>
Add KUnit tests for iio_multiply_value().

Reviewed-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Link: https://patch.msgid.link/20250831104825.15097-6-hansg@kernel.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add KUnit tests for iio_multiply_value().

Reviewed-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Link: https://patch.msgid.link/20250831104825.15097-6-hansg@kernel.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: normalize array sentinel style</title>
<updated>2025-04-22T18:10:04+00:00</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2025-04-11T20:49:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=70788d26ae1c482dba843efcc0cf166c2ba36a38'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: test: Fix GTS test config</title>
<updated>2024-12-07T17:23:41+00:00</updated>
<author>
<name>Matti Vaittinen</name>
<email>mazziesaccount@gmail.com</email>
</author>
<published>2024-11-28T08:46:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fbeba4364c5619428714625a70cd8444e6b1e4fd'/>
<id>fbeba4364c5619428714625a70cd8444e6b1e4fd</id>
<content type='text'>
The test config contained a copy-paste error. The IIO GTS helper test
was errorneously titled as "Test IIO formatting functions" in the
menuconfig.

Change the title of the tests to reflect what is tested.

Fixes: cf996f039679 ("iio: test: test gain-time-scale helpers")
Signed-off-by: Matti Vaittinen &lt;mazziesaccount@gmail.com&gt;
Link: https://patch.msgid.link/Z0gt5R86WdeK73u2@mva-rohm
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The test config contained a copy-paste error. The IIO GTS helper test
was errorneously titled as "Test IIO formatting functions" in the
menuconfig.

Change the title of the tests to reflect what is tested.

Fixes: cf996f039679 ("iio: test: test gain-time-scale helpers")
Signed-off-by: Matti Vaittinen &lt;mazziesaccount@gmail.com&gt;
Link: https://patch.msgid.link/Z0gt5R86WdeK73u2@mva-rohm
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iio: test : check null return of kunit_kmalloc in iio_rescale_test_scale</title>
<updated>2024-12-07T17:13:25+00:00</updated>
<author>
<name>Pei Xiao</name>
<email>xiaopei01@kylinos.cn</email>
</author>
<published>2024-10-30T03:48:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aaa90d0751071d38f3e74c4e14bc1083abcb0c15'/>
<id>aaa90d0751071d38f3e74c4e14bc1083abcb0c15</id>
<content type='text'>
kunit_kmalloc may fail, return value might be NULL and will cause
NULL pointer dereference.Add KUNIT_ASSERT_NOT_ERR_OR_NULL fix it.

Signed-off-by: Pei Xiao &lt;xiaopei01@kylinos.cn&gt;
Fixes: 8e74a48d17d5 ("iio: test: add basic tests for the iio-rescale driver")
Link: https://patch.msgid.link/ecd56a85e54a96c2f0313c114075a21a76071ea2.1730259869.git.xiaopei01@kylinos.cn
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kunit_kmalloc may fail, return value might be NULL and will cause
NULL pointer dereference.Add KUNIT_ASSERT_NOT_ERR_OR_NULL fix it.

Signed-off-by: Pei Xiao &lt;xiaopei01@kylinos.cn&gt;
Fixes: 8e74a48d17d5 ("iio: test: add basic tests for the iio-rescale driver")
Link: https://patch.msgid.link/ecd56a85e54a96c2f0313c114075a21a76071ea2.1730259869.git.xiaopei01@kylinos.cn
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
