From: Jonathan Cameron <jic23@cam.ac.uk>
To: srinivas pandruvada <srinivas.pandruvada@intel.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH,] IIO: Add additional modifier names
Date: Wed, 06 Jun 2012 10:17:05 +0100 [thread overview]
Message-ID: <4FCF2011.4030206@cam.ac.uk> (raw)
In-Reply-To: <1338508298-21748-1-git-send-email-srinivas.pandruvada@intel.com>
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@intel.com>
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 */
next prev parent reply other threads:[~2012-06-06 9:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 23:51 [PATCH,] IIO: Add additional modifier names srinivas pandruvada
2012-06-06 9:17 ` Jonathan Cameron [this message]
2012-06-06 15:04 ` Pandruvada, Srinivas
2012-06-06 15:35 ` Jonathan Cameron
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=4FCF2011.4030206@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
--cc=srinivas.pandruvada@intel.com \
/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).