<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/tools/iio, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/tools/iio?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/tools/iio?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-03-31T18:59:03Z</updated>
<entry>
<title>Merge tag 'kbuild-v5.18-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild</title>
<updated>2022-03-31T18:59:03Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-03-31T18:59:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b8321ed4a40c02054f930ca59d3570caa27bc86c'/>
<id>urn:sha1:b8321ed4a40c02054f930ca59d3570caa27bc86c</id>
<content type='text'>
Pull Kbuild updates from Masahiro Yamada:

 - Add new environment variables, USERCFLAGS and USERLDFLAGS to allow
   additional flags to be passed to user-space programs.

 - Fix missing fflush() bugs in Kconfig and fixdep

 - Fix a minor bug in the comment format of the .config file

 - Make kallsyms ignore llvm's local labels, .L*

 - Fix UAPI compile-test for cross-compiling with Clang

 - Extend the LLVM= syntax to support LLVM=&lt;suffix&gt; form for using a
   particular version of LLVm, and LLVM=&lt;prefix&gt; form for using custom
   LLVM in a particular directory path.

 - Clean up Makefiles

* tag 'kbuild-v5.18-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kbuild: Make $(LLVM) more flexible
  kbuild: add --target to correctly cross-compile UAPI headers with Clang
  fixdep: use fflush() and ferror() to ensure successful write to files
  arch: syscalls: simplify uapi/kapi directory creation
  usr/include: replace extra-y with always-y
  certs: simplify empty certs creation in certs/Makefile
  certs: include certs/signing_key.x509 unconditionally
  kallsyms: ignore all local labels prefixed by '.L'
  kconfig: fix missing '# end of' for empty menu
  kconfig: add fflush() before ferror() check
  kbuild: replace $(if A,A,B) with $(or A,B)
  kbuild: Add environment variables for userprogs flags
  kbuild: unify cmd_copy and cmd_shipped
</content>
</entry>
<entry>
<title>iio: introduce mag_referenced</title>
<updated>2022-02-21T19:33:05Z</updated>
<author>
<name>Cosmin Tanislav</name>
<email>demonsingur@gmail.com</email>
</author>
<published>2022-02-14T07:38:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a1a5cfe70cd29a59a9a85290dfe95ed1c8df1193'/>
<id>urn:sha1:a1a5cfe70cd29a59a9a85290dfe95ed1c8df1193</id>
<content type='text'>
Some accelerometers that support activity and inactivity
events also support a referenced mode, in which the
gravitational acceleration is taken as a point of
reference before comparing the acceleration to the
specified activity and inactivity magnitude.

For example, in the case of the ADXL367, for activity
detection, the formula is:

abs(acceleration - reference) &gt; magnitude

Add a new event type that makes this behavior clear.

Signed-off-by: Cosmin Tanislav &lt;cosmin.tanislav@analog.com&gt;
Link: https://lore.kernel.org/r/20220214073810.781016-2-cosmin.tanislav@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>kbuild: replace $(if A,A,B) with $(or A,B)</title>
<updated>2022-02-15T03:25:56Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2022-02-11T05:14:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5c8166419acf468b5bc3e48f928a040485d3e0c2'/>
<id>urn:sha1:5c8166419acf468b5bc3e48f928a040485d3e0c2</id>
<content type='text'>
$(or ...) is available since GNU Make 3.81, and useful to shorten the
code in some places.

Covert as follows:

  $(if A,A,B)  --&gt;  $(or A,B)

This patch also converts:

  $(if A, A, B) --&gt; $(or A, B)

Strictly speaking, the latter is not an equivalent conversion because
GNU Make keeps spaces after commas; if A is not empty, $(if A, A, B)
expands to " A", while $(or A, B) expands to "A".

Anyway, preceding spaces are not significant in the code hunks I touched.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;
</content>
</entry>
<entry>
<title>iio: event_monitor: Flush output on event</title>
<updated>2021-12-16T12:20:35Z</updated>
<author>
<name>Zach DeCook</name>
<email>zachdecook@librem.one</email>
</author>
<published>2021-12-08T21:48:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c054fe9936065759b21b493ac1e7d9a2be014083'/>
<id>urn:sha1:c054fe9936065759b21b493ac1e7d9a2be014083</id>
<content type='text'>
By flushing the output, iio_event_monitor can be more useful to programs
chained along with it.

  iio_event_monitor stk3310 | awk '/rising/{system("my_unlockscreen.sh")} /falling/{system("my_lockscreen.sh")}'

Without this flush, the above example would buffer a number of events,
then after a while run the lock/unlock scripts several times.

Signed-off-by: Zach DeCook &lt;zachdecook@librem.one&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: event_monitor: Enable events before monitoring</title>
<updated>2021-03-25T19:13:52Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2021-03-19T13:53:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e1d392dc8875556d8a742d4be38ab452516428eb'/>
<id>urn:sha1:e1d392dc8875556d8a742d4be38ab452516428eb</id>
<content type='text'>
After some painful sessions with a driver that register an
enable/disable sysfs knob (gp2ap002) and manually going
in and enabling the event before monitoring it:

  cd /sys/bus/iio/devices/iio\:device2/events
  # ls
  in_proximity_thresh_either_en
  # echo 1 &gt; in_proximity_thresh_either_en

I realized that it's better if the iio_event_monitor is
smart enough to enable all events by itself and disable them
after use, if passed the -a flag familiar from the
iio_generic_buffer tool.

Auto-enabling events depend on the hardware being able
to handle all events at the same time which isn't
necessarily the case, so a command line option is required
for this.

Cc: Bastien Nocera &lt;hadess@hadess.net&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20210319135301.542911-1-linus.walleij@linaro.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>tools: iio: convert iio_generic_buffer to use new IIO buffer API</title>
<updated>2021-03-11T20:47:07Z</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2021-02-15T10:40:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8827faab2c8b52e848071a039a945db6f3ae8365'/>
<id>urn:sha1:8827faab2c8b52e848071a039a945db6f3ae8365</id>
<content type='text'>
This change makes use of the new IIO buffer API to read data from an IIO
buffer.
It doesn't read the /sys/bus/iio/devices/iio:deviceX/scan_elements dir
anymore, it reads /sys/bus/iio/devices/iio:deviceX/bufferY, where all the
scan_elements have been merged together with the old/classical buffer
attributes.

And it makes use of the new IIO_BUFFER_GET_FD_IOCTL ioctl to get an FD for
the IIO buffer for which to read data from.
It also does a quick sanity check to see that -EBUSY is returned if reading
the chardev after the ioctl() has succeeded.

This was tested with the following cases:
 1. Tested buffer0 works with ioctl()
 2. Tested that buffer0 can't be opened via /dev/iio:deviceX after ioctl()
    This check should be omitted under normal operation; it's being done
    here to check that the driver change is sane
 3. Moved valid buffer0 to be buffer1, and tested that data comes from it

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Link: https://lore.kernel.org/r/20210215104043.91251-25-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>tools: iio: privatize globals and functions in iio_generic_buffer.c file</title>
<updated>2021-03-11T20:47:06Z</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2021-02-15T10:40:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ebe5112535b5cf389ca7d337cf6a0c1d885f9880'/>
<id>urn:sha1:ebe5112535b5cf389ca7d337cf6a0c1d885f9880</id>
<content type='text'>
Mostly a tidy-up.
But also helps to understand the limits of scope of these functions and
globals.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Link: https://lore.kernel.org/r/20210215104043.91251-24-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>tools: iio: make iioutils_get_type() private in iio_utils</title>
<updated>2021-03-11T20:47:06Z</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2021-02-15T10:40:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a605c8f4e71c35fddb9b13785f4ea5c24e273aa2'/>
<id>urn:sha1:a605c8f4e71c35fddb9b13785f4ea5c24e273aa2</id>
<content type='text'>
This is a bit of a tidy-up, but also helps with extending the
iioutils_get_type() function a bit, as we don't need to use it outside of
the iio_utils.c file. So, we'll need to update it only in one place.

With this change, the 'unsigned' types are updated to 'unsigned int' in the
iioutils_get_type() function definition.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Link: https://lore.kernel.org/r/20210215104043.91251-23-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: add IIO_MOD_O2 modifier</title>
<updated>2020-08-22T09:53:12Z</updated>
<author>
<name>Matt Ranostay</name>
<email>matt.ranostay@konsulko.com</email>
</author>
<published>2020-07-23T06:29:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4ffa22fd22a7cbde1a1394b2707ea73593dc0fda'/>
<id>urn:sha1:4ffa22fd22a7cbde1a1394b2707ea73593dc0fda</id>
<content type='text'>
Add modifier IIO_MOD_O2 for O2 concentration reporting

Signed-off-by: Matt Ranostay &lt;matt.ranostay@konsulko.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>.gitignore: add SPDX License Identifier</title>
<updated>2020-03-25T10:50:48Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2020-03-03T13:35:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d198b34f3855eee2571dda03eea75a09c7c31480'/>
<id>urn:sha1:d198b34f3855eee2571dda03eea75a09c7c31480</id>
<content type='text'>
Add SPDX License Identifier to all .gitignore files.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
