Commit Graph

8 Commits

Author SHA1 Message Date
Daniel Baluta 282a566393 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>
2014-11-22 11:17:05 +00:00
Roberta Dobrescu 0a6e2170df staging: iio: iio_event_monitor: Add support for missing IIO modifiers
This patch adds the missing IIO modifiers in event_is_known function
and iio_modifier_names vector.

Additionally, it removes duplicate name entries of IIO_MOD_LIGHT_BOTH
and IIO_MOD_LIGHT_IR in iio_modifier_names.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23 11:09:11 +08:00
Daniel Baluta 49f681fab6 staging: iio: remove duplicate case labels
Otherwise, compiling iio_event_monitor program fails:

io_event_monitor.c: In function ‘event_is_known’:
iio_event_monitor.c:125:2: error: duplicate case value
  case IIO_MOD_LIGHT_BOTH:
  ^
iio_event_monitor.c:121:2: error: previously used here
  case IIO_MOD_LIGHT_BOTH:

Fixes: da4db94 (iio staging: add recently added modifiers to iio_event_monitor)
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-07-07 17:15:13 +01:00
Peter Meerwald 0378250b52 staging:iio: Update iio_event_monitor program
add types recently added

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-14 16:07:11 +01:00
Peter Meerwald da4db94080 iio staging: add recently added modifiers to iio_event_monitor
maybe iio_modifier_names and iio_chan_type_name_spec should be
exported from industrialio-core instead?

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-07-08 10:39:57 +01:00
Peter Meerwald a21601463d staging: iio: add IIO_ALTVOLTAGE to iio_event_monitor example
IIO_ALTVOLTAGE is used by frequency/adf4350 and frequency/ad9523

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-15 14:39:18 -07:00
Jonathan Cameron 06458e277e IIO: Move core headers to include/linux/iio
Step 1 in moving the IIO core out of staging.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 11:01:43 -07:00
Lars-Peter Clausen 7042122fe5 staging:iio: Add event monitor example application
Add a small evtest like application to monitor events generated by an IIO
device. The application can be used as an example on how to listen for IIO
events and also is usful for testing and debugging device drivers which
generate IIO events.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:10:32 -08:00