Prechádzať zdrojové kódy

tools: iio: Add missing names to iio_event_monitor

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald 10 rokov pred
rodič
commit
30e8326728
1 zmenil súbory, kde vykonal 8 pridanie a 0 odobranie
  1. 8 0
      tools/iio/iio_event_monitor.c

+ 8 - 0
tools/iio/iio_event_monitor.c

@@ -50,6 +50,9 @@ static const char * const iio_chan_type_name_spec[] = {
 	[IIO_HUMIDITYRELATIVE] = "humidityrelative",
 	[IIO_HUMIDITYRELATIVE] = "humidityrelative",
 	[IIO_ACTIVITY] = "activity",
 	[IIO_ACTIVITY] = "activity",
 	[IIO_STEPS] = "steps",
 	[IIO_STEPS] = "steps",
+	[IIO_ENERGY] = "energy",
+	[IIO_DISTANCE] = "distance",
+	[IIO_VELOCITY] = "velocity",
 };
 };
 
 
 static const char * const iio_ev_type_text[] = {
 static const char * const iio_ev_type_text[] = {
@@ -98,6 +101,7 @@ static const char * const iio_modifier_names[] = {
 	[IIO_MOD_JOGGING] = "jogging",
 	[IIO_MOD_JOGGING] = "jogging",
 	[IIO_MOD_WALKING] = "walking",
 	[IIO_MOD_WALKING] = "walking",
 	[IIO_MOD_STILL] = "still",
 	[IIO_MOD_STILL] = "still",
+	[IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z] = "sqrt(x^2+y^2+z^2)",
 };
 };
 
 
 static bool event_is_known(struct iio_event_data *event)
 static bool event_is_known(struct iio_event_data *event)
@@ -129,6 +133,9 @@ static bool event_is_known(struct iio_event_data *event)
 	case IIO_HUMIDITYRELATIVE:
 	case IIO_HUMIDITYRELATIVE:
 	case IIO_ACTIVITY:
 	case IIO_ACTIVITY:
 	case IIO_STEPS:
 	case IIO_STEPS:
+	case IIO_ENERGY:
+	case IIO_DISTANCE:
+	case IIO_VELOCITY:
 		break;
 		break;
 	default:
 	default:
 		return false;
 		return false;
@@ -166,6 +173,7 @@ static bool event_is_known(struct iio_event_data *event)
 	case IIO_MOD_JOGGING:
 	case IIO_MOD_JOGGING:
 	case IIO_MOD_WALKING:
 	case IIO_MOD_WALKING:
 	case IIO_MOD_STILL:
 	case IIO_MOD_STILL:
+	case IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z:
 		break;
 		break;
 	default:
 	default:
 		return false;
 		return false;