aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ABI/testing/sysfs-bus-iio
diff options
context:
space:
mode:
authorIrina Tirdea <irina.tirdea@intel.com>2014-11-10 07:45:32 -0500
committerJonathan Cameron <jic23@kernel.org>2014-11-22 06:05:51 -0500
commita88bfe78583026eb9f21d4014ba481b22b66cee3 (patch)
tree5aab15a95c90caa83a08595a3353e779046a2905 /Documentation/ABI/testing/sysfs-bus-iio
parent1843c2f3def16740eb6d129a9790c32dd21aa5ea (diff)
iio: core: Introduce STEPS channel, ENABLE mask and INSTANCE event
These changes are needed to support the functionality of a pedometer. A pedometer has two basic functionalities: step counter and step detector. The step counter needs to be enabled and then it will count the steps in its hardware register. Whenever the application needs to check the step count, it will read the step counter register. To support the step counter a new channel type STEPS is added. Since the pedometer needs to be enabled first so that the hardware can count and store the steps, we need a specific ENABLE channel info mask. The step detector will generate an interrupt each time a step is detected. To support this functionality we add a new event type INSTANCE. For more information on the Android requirements for step counter and step detector see: http://source.android.com/devices/sensors/composite_sensors.html#counter and http://source.android.com/devices/sensors/composite_sensors.html#detector. A device that has the pedometer functionality this interface needs to support is Freescale's MMA9553L: http://www.freescale.com/files/sensors/doc/ref_manual/MMA9553LSWRM.pdf Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'Documentation/ABI/testing/sysfs-bus-iio')
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio22
1 files changed, 22 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
859What: /sys/.../events/in_steps_instance_en
860KernelVersion: 3.19
861Contact: linux-iio@vger.kernel.org
862Description:
863 Enables or disables step detection. Each time the user takes a step an
864 event of this type will be generated.
865
859What: /sys/bus/iio/devices/iio:deviceX/trigger/current_trigger 866What: /sys/bus/iio/devices/iio:deviceX/trigger/current_trigger
860KernelVersion: 2.6.35 867KernelVersion: 2.6.35
861Contact: linux-iio@vger.kernel.org 868Contact: 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
1106What: /sys/.../iio:deviceX/in_steps_en
1107KernelVersion: 3.19
1108Contact: linux-iio@vger.kernel.org
1109Description:
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
1114What: /sys/.../iio:deviceX/in_steps_input
1115KernelVersion: 3.19
1116Contact: linux-iio@vger.kernel.org
1117Description:
1118 This attribute is used to read the number of steps taken by the user
1119 since the last reboot while activated.