From: Srinivas Pandruvada Date: Thu, 7 Aug 2014 22:29:00 +0000 (+0100) Subject: iio: core : events ABI for specifying period X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=77a533c73f032050be8b447828358a228a0a5736;p=linux-beck.git iio: core : events ABI for specifying period 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 Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c index 258a973a1fb8..35a5b0311dae 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 d480631eabc2..4a848d6be3bf 100644 --- a/include/linux/iio/types.h +++ b/include/linux/iio/types.h @@ -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 {