All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: core : events ABI for specifying period
@ 2014-07-08 22:29 Srinivas Pandruvada
  2014-07-11 20:21 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Srinivas Pandruvada @ 2014-07-08 22:29 UTC (permalink / raw)
  To: jic23; +Cc: linux-iio, Srinivas Pandruvada

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>
---
 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 {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: core : events ABI for specifying period
  2014-07-08 22:29 [PATCH] iio: core : events ABI for specifying period Srinivas Pandruvada
@ 2014-07-11 20:21 ` Jonathan Cameron
  2014-07-11 20:31   ` Srinivas Pandruvada
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2014-07-11 20:21 UTC (permalink / raw)
  To: Srinivas Pandruvada; +Cc: linux-iio

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 {
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: core : events ABI for specifying period
  2014-07-11 20:21 ` Jonathan Cameron
@ 2014-07-11 20:31   ` Srinivas Pandruvada
  0 siblings, 0 replies; 3+ messages in thread
From: Srinivas Pandruvada @ 2014-07-11 20:31 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio

On 07/11/2014 01:21 PM, Jonathan Cameron wrote:
> 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.
Sure, I will submit a driver using this soon.

Thanks,
Srinivas
>
> 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 {
>>
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-11 20:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08 22:29 [PATCH] iio: core : events ABI for specifying period Srinivas Pandruvada
2014-07-11 20:21 ` Jonathan Cameron
2014-07-11 20:31   ` Srinivas Pandruvada

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.