Skip to content

Commit 11b8dda

Browse files
soda0289jic23
authored andcommitted
iio: types: Added support for rotation from north usage attributes
Added the rotation from north usage attributes to the iio modifier enum and to the iio modifier names array. Signed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent b531db8 commit 11b8dda

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎drivers/iio/industrialio-core.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ static const char * const iio_modifier_names[] = {
8787
[IIO_MOD_QUATERNION] = "quaternion",
8888
[IIO_MOD_TEMP_AMBIENT] = "ambient",
8989
[IIO_MOD_TEMP_OBJECT] = "object",
90+
[IIO_MOD_NORTH_MAGN] = "from_north_magnetic",
91+
[IIO_MOD_NORTH_TRUE] = "from_north_true",
92+
[IIO_MOD_NORTH_MAGN_TILT_COMP] = "from_north_magnetic_tilt_comp",
93+
[IIO_MOD_NORTH_TRUE_TILT_COMP] = "from_north_true_tilt_comp",
9094
};
9195

9296
/* relies on pairs of these shared then separate */

‎include/linux/iio/types.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ enum iio_modifier {
5656
IIO_MOD_QUATERNION,
5757
IIO_MOD_TEMP_AMBIENT,
5858
IIO_MOD_TEMP_OBJECT,
59+
IIO_MOD_NORTH_MAGN,
60+
IIO_MOD_NORTH_TRUE,
61+
IIO_MOD_NORTH_MAGN_TILT_COMP,
62+
IIO_MOD_NORTH_TRUE_TILT_COMP
5963
};
6064

6165
enum iio_event_type {

0 commit comments

Comments
 (0)