lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211028101840.24632-6-andrea.merello@gmail.com>
Date:   Thu, 28 Oct 2021 12:18:35 +0200
From:   Andrea Merello <andrea.merello@...il.com>
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@...il.com>,
        Andrea Merello <andrea.merello@....it>
Subject: [v2 05/10] iio: add modifers for pitch, yaw, roll

This patch adds modifiers for reporting rotations as euler angles (i.e.
yaw, pitch and roll).

Signed-off-by: Andrea Merello <andrea.merello@....it>
---
 drivers/iio/industrialio-core.c | 5 ++++-
 include/uapi/linux/iio/types.h  | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index a79cb32207e4..d2ebbfa8b9fc 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -136,7 +136,10 @@ static const char * const iio_modifier_names[] = {
 	[IIO_MOD_O2] = "o2",
 	[IIO_MOD_ACCEL_LINEAR_X] = "linear_x",
 	[IIO_MOD_ACCEL_LINEAR_Y] = "linear_y",
-	[IIO_MOD_ACCEL_LINEAR_Z] = "linear_z"
+	[IIO_MOD_ACCEL_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 db00f7c45f48..fc9909ca4f95 100644
--- a/include/uapi/linux/iio/types.h
+++ b/include/uapi/linux/iio/types.h
@@ -98,6 +98,9 @@ enum iio_modifier {
 	IIO_MOD_ACCEL_LINEAR_X,
 	IIO_MOD_ACCEL_LINEAR_Y,
 	IIO_MOD_ACCEL_LINEAR_Z,
+	IIO_MOD_PITCH,
+	IIO_MOD_YAW,
+	IIO_MOD_ROLL
 };
 
 enum iio_event_type {
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ