]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
iio: core : events ABI for specifying period
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thu, 7 Aug 2014 22:29:00 +0000 (23:29 +0100)
committerJonathan Cameron <jic23@kernel.org>
Fri, 11 Jul 2014 20:20:59 +0000 (21:20 +0100)
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>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-event.c
include/linux/iio/types.h

index 258a973a1fb8da2d23457fe3afc139f0f9befcff..35a5b0311daeeb7d9aaa849c05b04431226dc54f 100644 (file)
@@ -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)
index d480631eabc2a2d946060ddf6a1f76b300a696c9..4a848d6be3bf73b8521059cbd71b43a9a3deba95 100644 (file)
@@ -70,6 +70,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 {