Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1446035

Re: [PATCH 03/10] iio: core: Add double tap as possible gesture

From Jonathan Cameron <jic23@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 03/10] iio: core: Add double tap as possible gesture
Date 2016-07-19 07:40 +0200
Message-ID <rWvV8-8mi-13@gated-at.bofh.it> (permalink)
References <rWaQF-352-5@gated-at.bofh.it> <rWaQG-352-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 18/07/16 08:02, Enric Balletbo i Serra wrote:
> From: Gwendal Grignou <gwendal@chromium.org>
> 
> This is an interface change: however, the sysfs entry is based on string,
> so if other gestures are added on the trunk in the meantime, we will
> still be able to merge this change.
> 
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> Signed-off-by: Guenter Roeck <groeck@chromium.org>
> [enric: Rebased and resolved conflicts]
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
So you are creating an entire channel type for double tap?

Not keen on this I'm afraid.

The activity types in there are the moment are not events, but rather
attempts to estimate the 'likelihood' that a given activity is currently
being undertaken.

Hmm. Double tap is more of an event type.  It's one I've been wondering
how to describe for a while... At the end of the day it's just a
reasonably sophisticated filter - kind of a 'magic' version of Rate
of Change.  Unfortunately there isn't a clean mathematical definition
as it can be implemented in lots of ways.  

I guess the best may be to just have it as an event type on it's own...

What do others think?

Jonathan
> ---
>  drivers/iio/industrialio-core.c | 1 +
>  include/uapi/linux/iio/types.h  | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index e6319a9..f700e67 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -119,6 +119,7 @@ static const char * const iio_modifier_names[] = {
>  	[IIO_MOD_Q] = "q",
>  	[IIO_MOD_CO2] = "co2",
>  	[IIO_MOD_VOC] = "voc",
> +	[IIO_MOD_DOUBLE_TAP] = "double_tap",
>  };
>  
>  /* relies on pairs of these shared then separate */
> diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
> index b0916fc..c290167 100644
> --- a/include/uapi/linux/iio/types.h
> +++ b/include/uapi/linux/iio/types.h
> @@ -79,6 +79,7 @@ enum iio_modifier {
>  	IIO_MOD_CO2,
>  	IIO_MOD_VOC,
>  	IIO_MOD_LIGHT_UV,
> +	IIO_MOD_DOUBLE_TAP,
>  };
>  
>  enum iio_event_type {
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/10] Add support for cros-ec-sensors Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2016-07-18 09:10 +0200
  [PATCH 03/10] iio: core: Add double tap as possible gesture Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2016-07-18 09:10 +0200
    Re: [PATCH 03/10] iio: core: Add double tap as possible gesture Jonathan Cameron <jic23@kernel.org> - 2016-07-19 07:40 +0200
  [PATCH 01/10] mfd: cros_ec: add ChromeOS EC sensor platform information. Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2016-07-18 09:10 +0200
    Re: [PATCH 01/10] mfd: cros_ec: add ChromeOS EC sensor platform  information. Jonathan Cameron <jic23@kernel.org> - 2016-07-19 07:40 +0200
  [PATCH 10/10] platform/chrome: cros_ec_dev - Register cros-ec sensors Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2016-07-18 09:10 +0200

csiph-web