Skip to content

Commit bcdf28f

Browse files
itirdeajic23
authored andcommitted
iio: core: Introduce IIO_CHAN_INFO_CALIBHEIGHT
Some devices need the height of the user to compute various parameters. One of this devices is Freescale's MMA9553L (http://www.freescale.com/files/sensors/doc/ref_manual/MMA9553LSWRM.pdf) that needs the height of the user to compute the stride length which is used further to determine distance, speed and activity type. Signed-off-by: Irina Tirdea <[email protected]> Signed-off-by: Daniel Baluta <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent a88bfe7 commit bcdf28f

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

Documentation/ABI/testing/sysfs-bus-iio

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,14 @@ Description:
323323
production inaccuracies). If shared across all channels,
324324
<type>_calibscale is used.
325325

326+
What: /sys/bus/iio/devices/iio:deviceX/in_steps_calibheight
327+
KernelVersion: 3.19
328+
329+
Description:
330+
Height of the user (in centimeters) used by some pedometers
331+
to compute the stride length, distance, speed and activity
332+
type.
333+
326334
What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale_available
327335
What: /sys/.../iio:deviceX/in_voltageX_scale_available
328336
What: /sys/.../iio:deviceX/in_voltage-voltage_scale_available

drivers/iio/industrialio-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ static const char * const iio_chan_info_postfix[] = {
120120
[IIO_CHAN_INFO_HYSTERESIS] = "hysteresis",
121121
[IIO_CHAN_INFO_INT_TIME] = "integration_time",
122122
[IIO_CHAN_INFO_ENABLE] = "en",
123+
[IIO_CHAN_INFO_CALIBHEIGHT] = "calibheight",
123124
};
124125

125126
/**

include/linux/iio/iio.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ enum iio_chan_info_enum {
3939
IIO_CHAN_INFO_HYSTERESIS,
4040
IIO_CHAN_INFO_INT_TIME,
4141
IIO_CHAN_INFO_ENABLE,
42+
IIO_CHAN_INFO_CALIBHEIGHT,
4243
};
4344

4445
enum iio_shared_by {

0 commit comments

Comments
 (0)