Skip to content

Commit

Permalink
IIO: Add a modifier for sqrt(x^2+y^2)
Browse files Browse the repository at this point in the history
There will probably be a number of such modifiers eventually but
this one is used in the adis16204 accelerometer driver.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Jonathan Cameron committed Jun 30, 2012
1 parent 07c7f79 commit 8f5879b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/iio/industrialio-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_X] = "x",
[IIO_MOD_Y] = "y",
[IIO_MOD_Z] = "z",
[IIO_MOD_ROOT_SUM_SQUARED_X_Y] = "sqrt(x^2+y^2)",
[IIO_MOD_LIGHT_BOTH] = "both",
[IIO_MOD_LIGHT_IR] = "ir",
};
Expand Down
1 change: 1 addition & 0 deletions include/linux/iio/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ enum iio_modifier {
IIO_MOD_X_OR_Y_OR_Z,
IIO_MOD_LIGHT_BOTH,
IIO_MOD_LIGHT_IR,
IIO_MOD_ROOT_SUM_SQUARED_X_Y,
};

#define IIO_VAL_INT 1
Expand Down

0 comments on commit 8f5879b

Please sign in to comment.