diff options
-rw-r--r-- | Documentation/ABI/testing/sysfs-bus-iio | 22 | ||||
-rw-r--r-- | drivers/iio/industrialio-core.c | 2 | ||||
-rw-r--r-- | drivers/iio/industrialio-event.c | 1 | ||||
-rw-r--r-- | include/linux/iio/iio.h | 1 | ||||
-rw-r--r-- | include/linux/iio/types.h | 2 |
5 files changed, 28 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 7bf49ad8fd82..c60b0a1af839 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio | |||
@@ -856,6 +856,13 @@ Description: | |||
856 | number or direction is not specified, applies to all channels of | 856 | number or direction is not specified, applies to all channels of |
857 | this type. | 857 | this type. |
858 | 858 | ||
859 | What: /sys/.../events/in_steps_instance_en | ||
860 | KernelVersion: 3.19 | ||
861 | Contact: linux-iio@vger.kernel.org | ||
862 | Description: | ||
863 | Enables or disables step detection. Each time the user takes a step an | ||
864 | event of this type will be generated. | ||
865 | |||
859 | What: /sys/bus/iio/devices/iio:deviceX/trigger/current_trigger | 866 | What: /sys/bus/iio/devices/iio:deviceX/trigger/current_trigger |
860 | KernelVersion: 2.6.35 | 867 | KernelVersion: 2.6.35 |
861 | Contact: linux-iio@vger.kernel.org | 868 | Contact: linux-iio@vger.kernel.org |
@@ -1095,3 +1102,18 @@ Description: | |||
1095 | after application of scale and offset. If no offset or scale is | 1102 | after application of scale and offset. If no offset or scale is |
1096 | present, output should be considered as processed with the | 1103 | present, output should be considered as processed with the |
1097 | unit in milliamps. | 1104 | unit in milliamps. |
1105 | |||
1106 | What: /sys/.../iio:deviceX/in_steps_en | ||
1107 | KernelVersion: 3.19 | ||
1108 | Contact: linux-iio@vger.kernel.org | ||
1109 | Description: | ||
1110 | Activates the step counter. After activation, the number of steps | ||
1111 | taken by the user will be counted in hardware and exported through | ||
1112 | in_steps_input. | ||
1113 | |||
1114 | What: /sys/.../iio:deviceX/in_steps_input | ||
1115 | KernelVersion: 3.19 | ||
1116 | Contact: linux-iio@vger.kernel.org | ||
1117 | Description: | ||
1118 | This attribute is used to read the number of steps taken by the user | ||
1119 | since the last reboot while activated. | ||
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index e453ef9e0c36..1e060f390b08 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c | |||
@@ -71,6 +71,7 @@ static const char * const iio_chan_type_name_spec[] = { | |||
71 | [IIO_PRESSURE] = "pressure", | 71 | [IIO_PRESSURE] = "pressure", |
72 | [IIO_HUMIDITYRELATIVE] = "humidityrelative", | 72 | [IIO_HUMIDITYRELATIVE] = "humidityrelative", |
73 | [IIO_ACTIVITY] = "activity", | 73 | [IIO_ACTIVITY] = "activity", |
74 | [IIO_STEPS] = "steps", | ||
74 | }; | 75 | }; |
75 | 76 | ||
76 | static const char * const iio_modifier_names[] = { | 77 | static const char * const iio_modifier_names[] = { |
@@ -118,6 +119,7 @@ static const char * const iio_chan_info_postfix[] = { | |||
118 | [IIO_CHAN_INFO_HARDWAREGAIN] = "hardwaregain", | 119 | [IIO_CHAN_INFO_HARDWAREGAIN] = "hardwaregain", |
119 | [IIO_CHAN_INFO_HYSTERESIS] = "hysteresis", | 120 | [IIO_CHAN_INFO_HYSTERESIS] = "hysteresis", |
120 | [IIO_CHAN_INFO_INT_TIME] = "integration_time", | 121 | [IIO_CHAN_INFO_INT_TIME] = "integration_time", |
122 | [IIO_CHAN_INFO_ENABLE] = "en", | ||
121 | }; | 123 | }; |
122 | 124 | ||
123 | /** | 125 | /** |
diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c index 1290290adcb5..3f5cee0295c5 100644 --- a/drivers/iio/industrialio-event.c +++ b/drivers/iio/industrialio-event.c | |||
@@ -197,6 +197,7 @@ static const char * const iio_ev_type_text[] = { | |||
197 | [IIO_EV_TYPE_ROC] = "roc", | 197 | [IIO_EV_TYPE_ROC] = "roc", |
198 | [IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive", | 198 | [IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive", |
199 | [IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive", | 199 | [IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive", |
200 | [IIO_EV_TYPE_INSTANCE] = "instance", | ||
200 | }; | 201 | }; |
201 | 202 | ||
202 | static const char * const iio_ev_dir_text[] = { | 203 | static const char * const iio_ev_dir_text[] = { |
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index 3642ce7ef512..f45a400a5e3e 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h | |||
@@ -38,6 +38,7 @@ enum iio_chan_info_enum { | |||
38 | IIO_CHAN_INFO_HARDWAREGAIN, | 38 | IIO_CHAN_INFO_HARDWAREGAIN, |
39 | IIO_CHAN_INFO_HYSTERESIS, | 39 | IIO_CHAN_INFO_HYSTERESIS, |
40 | IIO_CHAN_INFO_INT_TIME, | 40 | IIO_CHAN_INFO_INT_TIME, |
41 | IIO_CHAN_INFO_ENABLE, | ||
41 | }; | 42 | }; |
42 | 43 | ||
43 | enum iio_shared_by { | 44 | enum iio_shared_by { |
diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h index 52cb5329407b..904dcbbf0e6f 100644 --- a/include/linux/iio/types.h +++ b/include/linux/iio/types.h | |||
@@ -31,6 +31,7 @@ enum iio_chan_type { | |||
31 | IIO_PRESSURE, | 31 | IIO_PRESSURE, |
32 | IIO_HUMIDITYRELATIVE, | 32 | IIO_HUMIDITYRELATIVE, |
33 | IIO_ACTIVITY, | 33 | IIO_ACTIVITY, |
34 | IIO_STEPS, | ||
34 | }; | 35 | }; |
35 | 36 | ||
36 | enum iio_modifier { | 37 | enum iio_modifier { |
@@ -73,6 +74,7 @@ enum iio_event_type { | |||
73 | IIO_EV_TYPE_ROC, | 74 | IIO_EV_TYPE_ROC, |
74 | IIO_EV_TYPE_THRESH_ADAPTIVE, | 75 | IIO_EV_TYPE_THRESH_ADAPTIVE, |
75 | IIO_EV_TYPE_MAG_ADAPTIVE, | 76 | IIO_EV_TYPE_MAG_ADAPTIVE, |
77 | IIO_EV_TYPE_INSTANCE, | ||
76 | }; | 78 | }; |
77 | 79 | ||
78 | enum iio_event_info { | 80 | enum iio_event_info { |