linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: core : events ABI for specifying period
Date: Fri, 11 Jul 2014 21:21:48 +0100	[thread overview]
Message-ID: <53C0475C.3040603@kernel.org> (raw)
In-Reply-To: <1404858591-10061-1-git-send-email-srinivas.pandruvada@linux.intel.com>

On 08/07/14 23:29, Srinivas Pandruvada wrote:
> The iio sysfs ABI defines a way to specify period for roc and thresholds.
> What:		/sys/.../events/in_accel_x_thresh_rising_period
> What:		/sys/.../events/in_accel_x_thresh_falling_period
> what:		/sys/.../events/in_accel_x_roc_rising_period
> What:		/sys/.../events/in_accel_x_roc_falling_period
>
> But there is no way to add period with the current event info enum.
>
> Added IIO_EV_INFO_PERIOD and corresponding string.
>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
One of several even related element that haven't gotten added yet but
we'll do them as and when anyone cares.

Thanks,

Jonathan
> ---
>   drivers/iio/industrialio-event.c | 1 +
>   include/linux/iio/types.h        | 1 +
>   2 files changed, 2 insertions(+)
>
> diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
> index bfbf4d4..0c1e37e 100644
> --- a/drivers/iio/industrialio-event.c
> +++ b/drivers/iio/industrialio-event.c
> @@ -209,6 +209,7 @@ static const char * const iio_ev_info_text[] = {
>   	[IIO_EV_INFO_ENABLE] = "en",
>   	[IIO_EV_INFO_VALUE] = "value",
>   	[IIO_EV_INFO_HYSTERESIS] = "hysteresis",
> +	[IIO_EV_INFO_PERIOD] = "period",
>   };
>
>   static enum iio_event_direction iio_ev_attr_dir(struct iio_dev_attr *attr)
> diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h
> index d09c40d..4a2af8a 100644
> --- a/include/linux/iio/types.h
> +++ b/include/linux/iio/types.h
> @@ -74,6 +74,7 @@ enum iio_event_info {
>   	IIO_EV_INFO_ENABLE,
>   	IIO_EV_INFO_VALUE,
>   	IIO_EV_INFO_HYSTERESIS,
> +	IIO_EV_INFO_PERIOD,
>   };
>
>   enum iio_event_direction {
>


  reply	other threads:[~2014-07-11 20:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 22:29 [PATCH] iio: core : events ABI for specifying period Srinivas Pandruvada
2014-07-11 20:21 ` Jonathan Cameron [this message]
2014-07-11 20:31   ` Srinivas Pandruvada

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=53C0475C.3040603@kernel.org \
    --to=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.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).