iio: event_monitor: Add support for new channel types
authorDaniel Baluta <daniel.baluta@intel.com>
Mon, 10 Nov 2014 12:45:35 +0000 (14:45 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sat, 22 Nov 2014 11:17:05 +0000 (11:17 +0000)
commit282a5663930ba79af9ec38884580c140fedf8aaa
tree4f8418e58093501166a4d5b84148112d726bde64
parent3e34e650db19708b1c27421e8d3d749a09adbb0c
iio: event_monitor: Add support for new channel types

We have the following testing scenario:

$ insmod iio_dummy_evgen.ko
$ insmod iio_dummy.ko

./iio_event_monitor /dev/iio:device0
Event: time: 1412786467971335337, type: activity(running), channel: 0,
evtype: thresh, direction: rising
Event: time: 1412786530792974091, type: activity(walking), channel: 0,
evtype: thresh, direction: falling
Event: time: 1412764319184761765, type: steps, channel: 0, evtype: instance

$ echo 1 > /sys/bus/iio/devices/iio_evgen/poke_ev0
$ echo 2 > /sys/bus/iio/devices/iio_evgen/poke_ev0
$ echo 3 > /sys/bus/iio/devices/iio_evgen/poke_ev0

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/Documentation/iio_event_monitor.c