[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220613120534.36991-5-andrea.merello@iit.it>
Date: Mon, 13 Jun 2022 14:05:24 +0200
From: <andrea.merello@....it>
To: <jic23@...nel.org>, <mchehab+huawei@...nel.org>,
<linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<devicetree@...r.kernel.org>
CC: <lars@...afoo.de>, <robh+dt@...nel.org>,
<andy.shevchenko@...il.com>, <matt.ranostay@...sulko.com>,
<ardeleanalex@...il.com>, <jacopo@...ndi.org>,
Andrea Merello <andrea.merello@....it>
Subject: [v6 04/14] iio: add modifers for pitch, yaw, roll
From: Andrea Merello <andrea.merello@....it>
Add modifiers for reporting rotations as euler angles (i.e. yaw, pitch and
roll).
Signed-off-by: Andrea Merello <andrea.merello@....it>
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
---
drivers/iio/industrialio-core.c | 3 +++
include/uapi/linux/iio/types.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 9c0ee7755884..4d95d4df5e91 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -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 */
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
index 0993f6b697fc..4853701ba70d 100644
--- a/include/uapi/linux/iio/types.h
+++ b/include/uapi/linux/iio/types.h
@@ -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 {
--
2.17.1
Powered by blists - more mailing lists