Commit cf82cb81 authored by Jonathan Cameron's avatar Jonathan Cameron

IIO: Add a modifier for x^2+y^2+z^2

There will probably be a number of such modifiers eventually but
this one is used in the adis16240 accelerometer driver.
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent f699d102
...@@ -71,6 +71,7 @@ static const char * const iio_modifier_names[] = { ...@@ -71,6 +71,7 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_Y] = "y", [IIO_MOD_Y] = "y",
[IIO_MOD_Z] = "z", [IIO_MOD_Z] = "z",
[IIO_MOD_ROOT_SUM_SQUARED_X_Y] = "sqrt(x^2+y^2)", [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_BOTH] = "both",
[IIO_MOD_LIGHT_IR] = "ir", [IIO_MOD_LIGHT_IR] = "ir",
}; };
......
...@@ -45,6 +45,7 @@ enum iio_modifier { ...@@ -45,6 +45,7 @@ enum iio_modifier {
IIO_MOD_LIGHT_BOTH, IIO_MOD_LIGHT_BOTH,
IIO_MOD_LIGHT_IR, IIO_MOD_LIGHT_IR,
IIO_MOD_ROOT_SUM_SQUARED_X_Y, IIO_MOD_ROOT_SUM_SQUARED_X_Y,
IIO_MOD_SUM_SQUARED_X_Y_Z,
}; };
#define IIO_VAL_INT 1 #define IIO_VAL_INT 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment