iio: core : events ABI for specifying period
PATCH 1/1 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.
--- drivers/iio/industrialio-event.c | 1 + include/linux/iio/types.h | 1 + 2 files changed, 2 insertions(+)
drivers/iio/industrialio-event.c +1 -0
@@ -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)
include/linux/iio/types.h +1 -0
@@ -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 {
Signature · 1 line
1.9.1
Jonathan Cameron
maintainerQuoted 11 lines · 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_periodBut there is no way to add period with the current event info enum.
Added
IIO_EV_INFO_PERIODand corresponding string.Signed-off-by Srinivas Pandruvada <[email protected]>
One of several even related element that haven't gotten added yet but we'll do them as and when anyone cares.
Thanks,
Jonathan
Quoted 30 lines
--- drivers/iio/industrialio-event.c | 1 + include/linux/iio/types.h | 1 + 2 files changed, 2 insertions(+)drivers/iio/industrialio-event.c +1
-0@@ -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)include/linux/iio/types.h +1
-0@@ -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 {
Quoted 7 lines · Jonathan Cameron
Quoted 6 lines · 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
Quoted 7 lines
Quoted 5 lines
But there is no way to add period with the current event info enum.
Added
IIO_EV_INFO_PERIODand corresponding string.Signed-off-by Srinivas Pandruvada <[email protected]>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
Quoted 38 lines
Thanks,
Jonathan
Quoted 32 lines
--- drivers/iio/industrialio-event.c | 1 + include/linux/iio/types.h | 1 + 2 files changed, 2 insertions(+)drivers/iio/industrialio-event.c +1
-0@@ -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)
include/linux/iio/types.h +1
-0@@ -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 {