Re: [PATCH,] IIO: Add additional modifier names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/1/2012 12:51 AM, srinivas pandruvada wrote:
Added additional modifier names in the list for the supported
types. Otherwise it substitutes (null) in the filename.

Signed-off-by: srinivas pandruvada<srinivas.pandruvada@xxxxxxxxx>

When we originally introducted the concept of these, the intent was
to have rather more explicit naming. Hence
[IIO_MOD_X_AND_Y_AND_Z] = "x&y&z",
[IIO_MOD_X_OR_Y_OR_Z] = "x|y|z",

It costs a small amount of effort in escape characters, but
gives a much more meaningful naming to the resulting attributes.

They aren't there in the core code because nothing using chan_spec
based registration was using these (they were needed for modifiers of
rather obscure events).  What have you actually needed them for?


Jonathan
---
  drivers/staging/iio/industrialio-core.c |    8 ++++++++
  1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
index d303bfb..65d40ce 100644
--- a/drivers/staging/iio/industrialio-core.c
+++ b/drivers/staging/iio/industrialio-core.c
@@ -76,6 +76,14 @@ static const char * const iio_modifier_names[] = {
  	[IIO_MOD_Z] = "z",
  	[IIO_MOD_LIGHT_BOTH] = "both",
  	[IIO_MOD_LIGHT_IR] = "ir",
+	[IIO_MOD_X_AND_Y] = "xy",
+	[IIO_MOD_X_AND_Z] = "xz",
+	[IIO_MOD_Y_AND_Z] = "yz",
+	[IIO_MOD_X_AND_Y_AND_Z] = "xyz",
+	[IIO_MOD_X_OR_Y] = "x_y",
+	[IIO_MOD_X_OR_Z] = "x_z",
+	[IIO_MOD_Y_OR_Z] = "y_z",
+	[IIO_MOD_X_OR_Y_OR_Z] = "x_y_z",
  };

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

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux