Skip to content

Commit

Permalink
iio staging: add recently added modifiers to iio_event_monitor
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Meerwald authored and Jonathan Cameron committed Jul 8, 2012
1 parent 034bd7b commit da4db94
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/staging/iio/Documentation/iio_event_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_Z] = "z",
[IIO_MOD_LIGHT_BOTH] = "both",
[IIO_MOD_LIGHT_IR] = "ir",
[IIO_MOD_ROOT_SUM_SQUARED_X_Y] = "sqrt(x^2+y^2)",
[IIO_MOD_SUM_SQUARED_X_Y_Z] = "x^2+y^2+z^2",
[IIO_MOD_LIGHT_CLEAR] = "clear",
[IIO_MOD_LIGHT_RED] = "red",
[IIO_MOD_LIGHT_GREEN] = "green",
[IIO_MOD_LIGHT_BLUE] = "blue",
};

static bool event_is_known(struct iio_event_data *event)
Expand Down Expand Up @@ -106,6 +112,12 @@ static bool event_is_known(struct iio_event_data *event)
case IIO_MOD_Z:
case IIO_MOD_LIGHT_BOTH:
case IIO_MOD_LIGHT_IR:
case IIO_MOD_ROOT_SUM_SQUARED_X_Y:
case IIO_MOD_SUM_SQUARED_X_Y_Z:
case IIO_MOD_LIGHT_CLEAR:
case IIO_MOD_LIGHT_RED:
case IIO_MOD_LIGHT_GREEN:
case IIO_MOD_LIGHT_BLUE:
break;
default:
return false;
Expand Down

0 comments on commit da4db94

Please sign in to comment.