Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: add modifers for pitch, yaw, roll

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>

authored by

Andrea Merello and committed by
Jonathan Cameron
dcedf145 4db63c85

+6
+3
drivers/iio/industrialio-core.c
··· 137 137 [IIO_MOD_LINEAR_X] = "linear_x", 138 138 [IIO_MOD_LINEAR_Y] = "linear_y", 139 139 [IIO_MOD_LINEAR_Z] = "linear_z", 140 + [IIO_MOD_PITCH] = "pitch", 141 + [IIO_MOD_YAW] = "yaw", 142 + [IIO_MOD_ROLL] = "roll", 140 143 }; 141 144 142 145 /* relies on pairs of these shared then separate */
+3
include/uapi/linux/iio/types.h
··· 98 98 IIO_MOD_LINEAR_X, 99 99 IIO_MOD_LINEAR_Y, 100 100 IIO_MOD_LINEAR_Z, 101 + IIO_MOD_PITCH, 102 + IIO_MOD_YAW, 103 + IIO_MOD_ROLL, 101 104 }; 102 105 103 106 enum iio_event_type {