diff options
| author | Daniel Baluta <daniel.baluta@intel.com> | 2014-11-10 07:45:30 -0500 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2014-11-22 06:05:47 -0500 |
| commit | 55aebeb926b6f93a540328e7ac770ef536b09b77 (patch) | |
| tree | 2f672ff0a471b842d07af0e546547e16e2219ea0 /include/linux/iio | |
| parent | 356ae946f9945997213b19279bc2e84bb61cc26a (diff) | |
iio: core: Introduce IIO_ACTIVITY channel
This channel will be used for exposing information about
activity composite sensors. Activities supported so far:
* running
* jogging
* walking
* still
THRESHOLD event is used to signal a change in the activity
state.
We associate a confidence interval for each activity expressed
as a percentage from 0 to 100.
* 0, means the sensor IS NOT reporting that activity.
* 100, means the sensor IS reporting that activity.
Users of this interface have two possible means to gather
information about the ongoing activities.
1. Event based, via event file descriptor
* sensor may report an event when ENTERING an activity or LEAVING
an activity based on a threshold value.
* drivers will wake up applications waiting data on the event fd
2. Polling, by reading the sysfs associated attribute files:
* /sys/bus/iio/devices/iio:device0/in_activity_running_input
expressed as percentage confidence value from 0 to 100.
This will offer an interface for Android significant motion
composite sensor defined here:
http://source.android.com/devices/sensors/composite_sensors.html
Activities listed above are supported by Freescale's MMA9553 sensor:
http://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 'include/linux/iio')
| -rw-r--r-- | include/linux/iio/types.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h index 4a2af8adf874..b3a241d53b54 100644 --- a/include/linux/iio/types.h +++ b/include/linux/iio/types.h | |||
| @@ -30,6 +30,7 @@ enum iio_chan_type { | |||
| 30 | IIO_CCT, | 30 | IIO_CCT, |
| 31 | IIO_PRESSURE, | 31 | IIO_PRESSURE, |
| 32 | IIO_HUMIDITYRELATIVE, | 32 | IIO_HUMIDITYRELATIVE, |
| 33 | IIO_ACTIVITY, | ||
| 33 | }; | 34 | }; |
| 34 | 35 | ||
| 35 | enum iio_modifier { | 36 | enum iio_modifier { |
| @@ -59,7 +60,11 @@ enum iio_modifier { | |||
| 59 | IIO_MOD_NORTH_MAGN, | 60 | IIO_MOD_NORTH_MAGN, |
| 60 | IIO_MOD_NORTH_TRUE, | 61 | IIO_MOD_NORTH_TRUE, |
| 61 | IIO_MOD_NORTH_MAGN_TILT_COMP, | 62 | IIO_MOD_NORTH_MAGN_TILT_COMP, |
| 62 | IIO_MOD_NORTH_TRUE_TILT_COMP | 63 | IIO_MOD_NORTH_TRUE_TILT_COMP, |
| 64 | IIO_MOD_RUNNING, | ||
| 65 | IIO_MOD_JOGGING, | ||
| 66 | IIO_MOD_WALKING, | ||
| 67 | IIO_MOD_STILL, | ||
| 63 | }; | 68 | }; |
| 64 | 69 | ||
| 65 | enum iio_event_type { | 70 | enum iio_event_type { |
