iio: add modifers for pitch, yaw, roll
authorAndrea Merello <andrea.merello@iit.it>
Wed, 7 Sep 2022 13:21:55 +0000 (15:21 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 Sep 2022 17:42:55 +0000 (18:42 +0100)
Add modifiers for reporting rotations as euler angles (i.e. yaw, pitch and
roll).

Signed-off-by: Andrea Merello <andrea.merello@iit.it>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220907132205.28021-5-andrea.merello@iit.it
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-core.c
include/uapi/linux/iio/types.h

index 6f7b6fd0c6efc6273d4cf8a8d03ce4aa46c4a6a7..8f12993f87bea2042776f97537ec19655d3f12e2 100644 (file)
@@ -137,6 +137,9 @@ static const char * const iio_modifier_names[] = {
        [IIO_MOD_LINEAR_X] = "linear_x",
        [IIO_MOD_LINEAR_Y] = "linear_y",
        [IIO_MOD_LINEAR_Z] = "linear_z",
+       [IIO_MOD_PITCH] = "pitch",
+       [IIO_MOD_YAW] = "yaw",
+       [IIO_MOD_ROLL] = "roll",
 };
 
 /* relies on pairs of these shared then separate */
index b7ba9861a24daff97241809df747d40483858ae4..c79f2f046a0be1c6d71a0bcb9e6378b8bce04b3c 100644 (file)
@@ -98,6 +98,9 @@ enum iio_modifier {
        IIO_MOD_LINEAR_X,
        IIO_MOD_LINEAR_Y,
        IIO_MOD_LINEAR_Z,
+       IIO_MOD_PITCH,
+       IIO_MOD_YAW,
+       IIO_MOD_ROLL,
 };
 
 enum iio_event_type {