[PATCH 7/8] IIO: Add a modifier for x^2+y^2+z^2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There will probably be a number of such modifiers eventually but
this one is used in the adis16240 accelerometer driver.

Signed-off-by: Jonathan Cameron <jic23@xxxxxxxxxx>
---
 drivers/iio/industrialio-core.c |    1 +
 include/linux/iio/types.h       |    1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 071fbf1..6c433e8 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -71,6 +71,7 @@ static const char * const iio_modifier_names[] = {
 	[IIO_MOD_Y] = "y",
 	[IIO_MOD_Z] = "z",
 	[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_BOTH] = "both",
 	[IIO_MOD_LIGHT_IR] = "ir",
 };
diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h
index ab907bf..2ca6058 100644
--- a/include/linux/iio/types.h
+++ b/include/linux/iio/types.h
@@ -46,6 +46,7 @@ enum iio_modifier {
 	IIO_MOD_LIGHT_BOTH,
 	IIO_MOD_LIGHT_IR,
 	IIO_MOD_ROOT_SUM_SQUARED_X_Y,
+	IIO_MOD_SUM_SQUARED_X_Y_Z,
 };
 
 #define IIO_VAL_INT 1
-- 
1.7.10.2

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux