* [PATCH 1/3] iio: Add missing modifier names to core
@ 2015-06-20 21:52 Peter Meerwald
2015-06-20 21:52 ` [PATCH 2/3] tools: iio: Add missing names to iio_event_monitor Peter Meerwald
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Peter Meerwald @ 2015-06-20 21:52 UTC (permalink / raw)
To: linux-iio; +Cc: jic23, Peter Meerwald
some are documented, others are in iio_event_monitor.c which
was recently moved from staging
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
drivers/iio/industrialio-core.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 4df97f6..f3bf00c 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -81,6 +81,14 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_X] = "x",
[IIO_MOD_Y] = "y",
[IIO_MOD_Z] = "z",
+ [IIO_MOD_X_AND_Y] = "x&y",
+ [IIO_MOD_X_AND_Z] = "x&z",
+ [IIO_MOD_Y_AND_Z] = "y&z",
+ [IIO_MOD_X_AND_Y_AND_Z] = "x&y&z",
+ [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",
[IIO_MOD_ROOT_SUM_SQUARED_X_Y] = "sqrt(x^2+y^2)",
[IIO_MOD_SUM_SQUARED_X_Y_Z] = "x^2+y^2+z^2",
[IIO_MOD_LIGHT_BOTH] = "both",
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] tools: iio: Add missing names to iio_event_monitor
2015-06-20 21:52 [PATCH 1/3] iio: Add missing modifier names to core Peter Meerwald
@ 2015-06-20 21:52 ` Peter Meerwald
2015-06-21 9:47 ` Jonathan Cameron
2015-06-20 21:52 ` [PATCH 3/3] tools: iio: Set CC using $(CROSS_COMPILE) Peter Meerwald
2015-06-21 13:24 ` [PATCH 1/3] iio: Add missing modifier names to core Jonathan Cameron
2 siblings, 1 reply; 6+ messages in thread
From: Peter Meerwald @ 2015-06-20 21:52 UTC (permalink / raw)
To: linux-iio; +Cc: jic23, Peter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
tools/iio/iio_event_monitor.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
index 427c271..2a89616 100644
--- a/tools/iio/iio_event_monitor.c
+++ b/tools/iio/iio_event_monitor.c
@@ -51,6 +51,9 @@ static const char * const iio_chan_type_name_spec[] = {
[IIO_HUMIDITYRELATIVE] = "humidityrelative",
[IIO_ACTIVITY] = "activity",
[IIO_STEPS] = "steps",
+ [IIO_ENERGY] = "energy",
+ [IIO_DISTANCE] = "distance",
+ [IIO_VELOCITY] = "velocity",
};
static const char * const iio_ev_type_text[] = {
@@ -99,6 +102,7 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_JOGGING] = "jogging",
[IIO_MOD_WALKING] = "walking",
[IIO_MOD_STILL] = "still",
+ [IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z] = "sqrt(x^2+y^2+z^2)",
};
static bool event_is_known(struct iio_event_data *event)
@@ -130,6 +134,9 @@ static bool event_is_known(struct iio_event_data *event)
case IIO_HUMIDITYRELATIVE:
case IIO_ACTIVITY:
case IIO_STEPS:
+ case IIO_ENERGY:
+ case IIO_DISTANCE:
+ case IIO_VELOCITY:
break;
default:
return false;
@@ -167,6 +174,7 @@ static bool event_is_known(struct iio_event_data *event)
case IIO_MOD_JOGGING:
case IIO_MOD_WALKING:
case IIO_MOD_STILL:
+ case IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z:
break;
default:
return false;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] tools: iio: Set CC using $(CROSS_COMPILE)
2015-06-20 21:52 [PATCH 1/3] iio: Add missing modifier names to core Peter Meerwald
2015-06-20 21:52 ` [PATCH 2/3] tools: iio: Add missing names to iio_event_monitor Peter Meerwald
@ 2015-06-20 21:52 ` Peter Meerwald
2015-06-21 9:39 ` Jonathan Cameron
2015-06-21 13:24 ` [PATCH 1/3] iio: Add missing modifier names to core Jonathan Cameron
2 siblings, 1 reply; 6+ messages in thread
From: Peter Meerwald @ 2015-06-20 21:52 UTC (permalink / raw)
To: linux-iio; +Cc: jic23, Peter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
tools/iio/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/iio/Makefile b/tools/iio/Makefile
index bf7ae6d..7d0950d 100644
--- a/tools/iio/Makefile
+++ b/tools/iio/Makefile
@@ -1,4 +1,4 @@
-CC = gcc
+CC = $(CROSS_COMPILE)gcc
CFLAGS = -Wall -g -D_GNU_SOURCE
all: iio_event_monitor lsiio generic_buffer
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] tools: iio: Set CC using $(CROSS_COMPILE)
2015-06-20 21:52 ` [PATCH 3/3] tools: iio: Set CC using $(CROSS_COMPILE) Peter Meerwald
@ 2015-06-21 9:39 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2015-06-21 9:39 UTC (permalink / raw)
To: Peter Meerwald, linux-iio
On 20/06/15 22:52, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
> ---
Hi Peter,
This one has been there since
54628687fa2df2d3755912954afa67665ed122cc
iio: make tools more cross-compilation friendly
from Linus Walleij
J
> tools/iio/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/iio/Makefile b/tools/iio/Makefile
> index bf7ae6d..7d0950d 100644
> --- a/tools/iio/Makefile
> +++ b/tools/iio/Makefile
> @@ -1,4 +1,4 @@
> -CC = gcc
> +CC = $(CROSS_COMPILE)gcc
> CFLAGS = -Wall -g -D_GNU_SOURCE
>
> all: iio_event_monitor lsiio generic_buffer
>
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] tools: iio: Add missing names to iio_event_monitor
2015-06-20 21:52 ` [PATCH 2/3] tools: iio: Add missing names to iio_event_monitor Peter Meerwald
@ 2015-06-21 9:47 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2015-06-21 9:47 UTC (permalink / raw)
To: Peter Meerwald, linux-iio
On 20/06/15 22:52, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Applied to the togreg branch of iio.git - initially pushed out as
testing then languishing there or in togreg for a least a couple of weeks
given the merge window is about to open.
Thanks,
Jonathan
> ---
> tools/iio/iio_event_monitor.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
> index 427c271..2a89616 100644
> --- a/tools/iio/iio_event_monitor.c
> +++ b/tools/iio/iio_event_monitor.c
> @@ -51,6 +51,9 @@ static const char * const iio_chan_type_name_spec[] = {
> [IIO_HUMIDITYRELATIVE] = "humidityrelative",
> [IIO_ACTIVITY] = "activity",
> [IIO_STEPS] = "steps",
> + [IIO_ENERGY] = "energy",
> + [IIO_DISTANCE] = "distance",
> + [IIO_VELOCITY] = "velocity",
> };
>
> static const char * const iio_ev_type_text[] = {
> @@ -99,6 +102,7 @@ static const char * const iio_modifier_names[] = {
> [IIO_MOD_JOGGING] = "jogging",
> [IIO_MOD_WALKING] = "walking",
> [IIO_MOD_STILL] = "still",
> + [IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z] = "sqrt(x^2+y^2+z^2)",
> };
>
> static bool event_is_known(struct iio_event_data *event)
> @@ -130,6 +134,9 @@ static bool event_is_known(struct iio_event_data *event)
> case IIO_HUMIDITYRELATIVE:
> case IIO_ACTIVITY:
> case IIO_STEPS:
> + case IIO_ENERGY:
> + case IIO_DISTANCE:
> + case IIO_VELOCITY:
> break;
> default:
> return false;
> @@ -167,6 +174,7 @@ static bool event_is_known(struct iio_event_data *event)
> case IIO_MOD_JOGGING:
> case IIO_MOD_WALKING:
> case IIO_MOD_STILL:
> + case IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z:
> break;
> default:
> return false;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] iio: Add missing modifier names to core
2015-06-20 21:52 [PATCH 1/3] iio: Add missing modifier names to core Peter Meerwald
2015-06-20 21:52 ` [PATCH 2/3] tools: iio: Add missing names to iio_event_monitor Peter Meerwald
2015-06-20 21:52 ` [PATCH 3/3] tools: iio: Set CC using $(CROSS_COMPILE) Peter Meerwald
@ 2015-06-21 13:24 ` Jonathan Cameron
2 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2015-06-21 13:24 UTC (permalink / raw)
To: Peter Meerwald, linux-iio
On 20/06/15 22:52, Peter Meerwald wrote:
> some are documented, others are in iio_event_monitor.c which
> was recently moved from staging
>
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This is legacy of the older event description stuff that typically
only used these codes for exporting to userspace (they weren't used
to build attribute names). Given how we do it now, they can
be used (particularly for enable attributes) so we do indeed need the whole
set.
Applied to the togreg branch of iio.git
Thanks,
Jonathan
> ---
> drivers/iio/industrialio-core.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 4df97f6..f3bf00c 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -81,6 +81,14 @@ static const char * const iio_modifier_names[] = {
> [IIO_MOD_X] = "x",
> [IIO_MOD_Y] = "y",
> [IIO_MOD_Z] = "z",
> + [IIO_MOD_X_AND_Y] = "x&y",
> + [IIO_MOD_X_AND_Z] = "x&z",
> + [IIO_MOD_Y_AND_Z] = "y&z",
> + [IIO_MOD_X_AND_Y_AND_Z] = "x&y&z",
> + [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",
> [IIO_MOD_ROOT_SUM_SQUARED_X_Y] = "sqrt(x^2+y^2)",
> [IIO_MOD_SUM_SQUARED_X_Y_Z] = "x^2+y^2+z^2",
> [IIO_MOD_LIGHT_BOTH] = "both",
>
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-06-21 13:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-20 21:52 [PATCH 1/3] iio: Add missing modifier names to core Peter Meerwald
2015-06-20 21:52 ` [PATCH 2/3] tools: iio: Add missing names to iio_event_monitor Peter Meerwald
2015-06-21 9:47 ` Jonathan Cameron
2015-06-20 21:52 ` [PATCH 3/3] tools: iio: Set CC using $(CROSS_COMPILE) Peter Meerwald
2015-06-21 9:39 ` Jonathan Cameron
2015-06-21 13:24 ` [PATCH 1/3] iio: Add missing modifier names to core Jonathan Cameron
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.