linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: jic23@kernel.org
Cc: linux-iio@vger.kernel.org,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: [PATCH v2 8/9] iio: Add channel modifiers for Quaternion Rotations
Date: Wed, 23 Oct 2013 12:11:15 -0700	[thread overview]
Message-ID: <1382555476-15826-8-git-send-email-srinivas.pandruvada@linux.intel.com> (raw)
In-Reply-To: <1382555476-15826-1-git-send-email-srinivas.pandruvada@linux.intel.com>

A quaternion is composed of four components: a vector with x, y, z
coordinates and a w rotation. Added channel modifiers for exporting
these four components via user space.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 drivers/iio/industrialio-core.c | 4 ++++
 include/linux/iio/types.h       | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index f95c697..4ffaead 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -80,6 +80,10 @@ static const char * const iio_modifier_names[] = {
 	[IIO_MOD_LIGHT_RED] = "red",
 	[IIO_MOD_LIGHT_GREEN] = "green",
 	[IIO_MOD_LIGHT_BLUE] = "blue",
+	[IIO_MOD_QUATERNION_X] = "quat_x",
+	[IIO_MOD_QUATERNION_Y] = "quat_y",
+	[IIO_MOD_QUATERNION_Z] = "quat_z",
+	[IIO_MOD_QUATERNION_W] = "quat_w",
 };
 
 /* relies on pairs of these shared then separate */
diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h
index 88bf0f0..ac2345c 100644
--- a/include/linux/iio/types.h
+++ b/include/linux/iio/types.h
@@ -52,6 +52,10 @@ enum iio_modifier {
 	IIO_MOD_LIGHT_RED,
 	IIO_MOD_LIGHT_GREEN,
 	IIO_MOD_LIGHT_BLUE,
+	IIO_MOD_QUATERNION_X,
+	IIO_MOD_QUATERNION_Y,
+	IIO_MOD_QUATERNION_Z,
+	IIO_MOD_QUATERNION_W,
 };
 
 #define IIO_VAL_INT 1
-- 
1.8.3.2


  parent reply	other threads:[~2013-10-23 19:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23 19:11 [PATCH v2 1/9] iio: hid_Sensors: fix crash during trigger unregister Srinivas Pandruvada
2013-10-23 19:11 ` [PATCH v2 2/9] iio: hid-sensors: Add connection type Srinivas Pandruvada
2013-10-23 19:11 ` [PATCH v2 3/9] iio: hid-sensors: accelerometer: Add sensitivity Srinivas Pandruvada
2013-10-23 19:11 ` [PATCH v2 4/9] iio: hid-sensors: gyro : " Srinivas Pandruvada
2013-10-23 19:11 ` [PATCH v2 5/9] iio: hid-sensors: light/als " Srinivas Pandruvada
2013-10-23 19:11 ` [PATCH v2 6/9] iio: hid-sensors: magnetometer " Srinivas Pandruvada
2013-10-23 19:11 ` [PATCH v2 7/9] iio: hid-sensors: Added Inclinometer 3D Srinivas Pandruvada
2013-10-24 11:06   ` Jonathan Cameron
2013-10-24 11:11     ` Jonathan Cameron
2013-10-23 19:11 ` Srinivas Pandruvada [this message]
2013-10-24 11:18   ` [PATCH v2 8/9] iio: Add channel modifiers for Quaternion Rotations Jonathan Cameron
2013-10-24 15:17     ` Srinivas Pandruvada
2013-10-24 16:20       ` Jonathan Cameron
2013-10-28 23:44         ` Srinivas Pandruvada
2013-10-29  6:54           ` Jonathan Cameron
2013-10-23 19:11 ` [PATCH v2 9/9] iio: hid-sensors: Added device rotation support Srinivas Pandruvada
2013-10-24 10:42 ` [PATCH v2 1/9] iio: hid_Sensors: fix crash during trigger unregister Jonathan Cameron
2013-10-24 15:21   ` Lars-Peter Clausen
2013-10-24 15:40     ` Srinivas Pandruvada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1382555476-15826-8-git-send-email-srinivas.pandruvada@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).