<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/tools/iio/generic_buffer.c, branch dev-4.7</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.7</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2016-04-19T18:58:13+00:00</updated>
<entry>
<title>iio: tools: generic_buffer: auto-enable channels</title>
<updated>2016-04-19T18:58:13+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-04-14T08:26:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=5f991a921a08279f573fa5ecf84261a3a6fac0cc'/>
<id>urn:sha1:5f991a921a08279f573fa5ecf84261a3a6fac0cc</id>
<content type='text'>
If no channels are enabled when we run generic_buffer on a
device, add a command-line option to just enable all of them,
run the sampling and disable them all again afterwards.

This is extremely useful when I'm low-level testing my
sensors with interrupts and triggers, sample session:

root@Ux500:/ lsiio
Device 000: lsm303dlh_accel
Device 001: lis331dl_accel
Device 002: l3g4200d
Device 003: lsm303dlh_magn
Device 004: lps001wp
Trigger 000: lsm303dlh_accel-trigger
Trigger 001: lis331dl_accel-trigger
Trigger 002: l3g4200d-trigger

root@Ux500:/ generic_buffer -a -c 10 -n l3g4200d
iio device number being used is 2
iio trigger number being used is 2
No channels are enabled, enabling all channels
Enabling: in_anglvel_x_en
Enabling: in_anglvel_y_en
Enabling: in_anglvel_z_en
Enabling: in_timestamp_en
/sys/bus/iio/devices/iio:device2 l3g4200d-trigger
-3.593664 -0.713133 4.870143 946684863662292480
3.225546 0.867357 -4.945878 946684863671875000
-0.676413 0.127296 0.106641 946684863681488037
-0.661113 0.110160 0.128826 946684863690673828
-0.664173 0.113067 0.123471 946684863700683593
-0.664938 0.109395 0.124848 946684863710144042
-0.664173 0.110619 0.130203 946684863719512939
-0.666162 0.111231 0.132651 946684863729125976
-0.668610 0.111690 0.130662 946684863738739013
-0.660501 0.110466 0.131733 946684863748565673
Disabling: in_anglvel_x_en
Disabling: in_anglvel_y_en
Disabling: in_anglvel_z_en
Disabling: in_timestamp_en

Pure awesomeness. If some channels have been enabled through
scripts or manual interaction, nothing happens.

Cc: Peter Meerwald-Stadler &lt;pmeerw@pmeerw.net&gt;
Acked-by: Daniel Baluta &lt;daniel.baluta@intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: tools: make generic_buffer look for "-trigger"</title>
<updated>2016-04-03T09:27:49+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-03-24T08:39:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=793d6b5ea80c9bba8de40b720991b436fa5e174d'/>
<id>urn:sha1:793d6b5ea80c9bba8de40b720991b436fa5e174d</id>
<content type='text'>
All the ST Sensors use the old "&lt;foo&gt;-trigger" rather than the
standard "&lt;foo&gt;-devN" new standard suffix for triggers. Now much
to do about it since it is ABI, but make the testing tools
recognize it too.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: generic_buffer: be helpful about enabling channels</title>
<updated>2015-08-16T09:51:26+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2015-08-10T08:55:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=53dabafe1b17411de82b6c4560145cf396cbb564'/>
<id>urn:sha1:53dabafe1b17411de82b6c4560145cf396cbb564</id>
<content type='text'>
Currently if generic_buffer is invoked without first enabling any
channels in scan_elements/*_en, it will fail unable to enable the
buffer because bytes_per_datum inside the kernel will be zero if
no channels are available.

It is implied that the user of the program should enable channels
manually or with a script before executing generic_buffer.

Be more helpful by stopping execution if no enabled channels can
be found, and print a helptext that will tell you what is wrong
and what needs to be done.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools: iio: print error message when buffer enable fails</title>
<updated>2015-08-02T17:39:27+00:00</updated>
<author>
<name>Irina Tirdea</name>
<email>irina.tirdea@intel.com</email>
</author>
<published>2015-07-24T13:28:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=e7231491ce6ae2053569166f60835a5594b3c0af'/>
<id>urn:sha1:e7231491ce6ae2053569166f60835a5594b3c0af</id>
<content type='text'>
Running generic_buffer without enabling any channel of the
sensor will fail without printing any error message.

Add an error message that indicates buffer enable failed.

Signed-off-by: Irina Tirdea &lt;irina.tirdea@intel.com&gt;
Acked-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools: iio: Send error messages to stderr</title>
<updated>2015-07-20T17:41:24+00:00</updated>
<author>
<name>Cristina Opriceana</name>
<email>cristina.opriceana@gmail.com</email>
</author>
<published>2015-07-17T15:43:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=d9abc615ea1659b6967a00e95b1b3a7fd4079b80'/>
<id>urn:sha1:d9abc615ea1659b6967a00e95b1b3a7fd4079b80</id>
<content type='text'>
This patch indends to make some cleanup and send printf
error messages to stderr. The changes were performed with coccinelle
for failure messages and manual for other cases, such as wrong usage
messages.

Signed-off-by: Cristina Opriceana &lt;cristina.opriceana@gmail.com&gt;
Reviewed-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools: iio: Remove explicit NULL comparison</title>
<updated>2015-07-20T17:41:22+00:00</updated>
<author>
<name>Cristina Opriceana</name>
<email>cristina.opriceana@gmail.com</email>
</author>
<published>2015-07-13T13:15:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=ff1ac639b395d58bbd99ff4a36b10eebb81544a3'/>
<id>urn:sha1:ff1ac639b395d58bbd99ff4a36b10eebb81544a3</id>
<content type='text'>
Remove explicit NULL comparison and write it in its simpler form as
recommended by checkpatch.pl.

Signed-off-by: Cristina Opriceana &lt;cristina.opriceana@gmail.com&gt;
Reviewed-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools: iio: Add single-byte case for generic_buffer</title>
<updated>2015-07-05T11:27:33+00:00</updated>
<author>
<name>Tiberiu Breana</name>
<email>tiberiu.a.breana@intel.com</email>
</author>
<published>2015-07-03T09:57:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=e8d0927a19f11cebc4381f5f0cac8fa37154b08a'/>
<id>urn:sha1:e8d0927a19f11cebc4381f5f0cac8fa37154b08a</id>
<content type='text'>
Some sensors export data in an 8-bit format.
Add a single-byte case for the generic_buffer tool so that
these sensors' buffer data can be visualized.

Signed-off-by: Tiberiu Breana &lt;tiberiu.a.breana@intel.com&gt;
Reviewed-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools:iio: adjust coding style</title>
<updated>2015-06-13T17:49:43+00:00</updated>
<author>
<name>Hartmut Knaack</name>
<email>knaack.h@gmx.de</email>
</author>
<published>2015-06-10T19:51:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=7663a4aac625268674060d78ee00f97a36a03af7'/>
<id>urn:sha1:7663a4aac625268674060d78ee00f97a36a03af7</id>
<content type='text'>
Fix various coding style issues, including:
  * have spaces around operators
  * indentation
  * consolidate parameters in same line
  * required braces
  * adjust/drop comments
  * multiline comment style
  * delete unnecessary empty lines
  * add empty lines to visualize logial code blocks
  * typos

Signed-off-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools:iio: rework program parameters</title>
<updated>2015-06-01T07:38:40+00:00</updated>
<author>
<name>Hartmut Knaack</name>
<email>knaack.h@gmx.de</email>
</author>
<published>2015-05-31T12:40:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=e06e3d7112f2ec5494d2d934a8641a53885003ee'/>
<id>urn:sha1:e06e3d7112f2ec5494d2d934a8641a53885003ee</id>
<content type='text'>
In generic_buffer.c: sort program parameters alphabetically and provide
		     usage information
In lsiio.c: drop unused parameters

Signed-off-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools:iio: return values directly</title>
<updated>2015-06-01T07:33:47+00:00</updated>
<author>
<name>Hartmut Knaack</name>
<email>knaack.h@gmx.de</email>
</author>
<published>2015-05-31T12:40:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=0e799878175aa7d08f5882b6a391de4724c52e9e'/>
<id>urn:sha1:0e799878175aa7d08f5882b6a391de4724c52e9e</id>
<content type='text'>
Return directly, if no common cleanup is required.

Signed-off-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
</feed>
