IIO: Add a modifier for x^2+y^2+z^2
authorJonathan Cameron <jic23@kernel.org>
Sat, 5 May 2012 09:56:41 +0000 (10:56 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 30 Jun 2012 09:15:28 +0000 (10:15 +0100)
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@kernel.org>
drivers/iio/industrialio-core.c
include/linux/iio/types.h

index e42749ec5c3cb79fb85409fdcf49f6b952906d69..bb3c692e49b88ff1e38ec0c784c49007c9b01090 100644 (file)
@@ -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",
 };
index 210559ddf8a3d13a8c786f40debc445e8654014e..e25040173346c16bfa8b21c488c96881f1ea999a 100644 (file)
@@ -45,6 +45,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
This page took 0.026614 seconds and 5 git commands to generate.