OSDN Git Service

android-x86/hardware-intel-libsensors.git
4 years agoMerge branch 'lineage-16.0' of https://github.com/me176c-dev/android_hardware_iio... oreo-x86 pie-x86 q-x86 r-x86 android-x86-8.1-r3 android-x86-8.1-r4 android-x86-8.1-r5 android-x86-8.1-r6 android-x86-9.0-r1 android-x86-9.0-r2
Chih-Wei Huang [Wed, 26 Jun 2019 03:30:18 +0000 (11:30 +0800)]
Merge branch 'lineage-16.0' of https://github.com/me176c-dev/android_hardware_iio-sensors-hal into oreo-x86

5 years agoAdd support for sensor specific available sampling frequencies
lambdadroid [Mon, 14 Jan 2019 18:48:16 +0000 (19:48 +0100)]
Add support for sensor specific available sampling frequencies

Change-Id: Iad0e5aed487a35d32ee7333599316f72915bd858

5 years agoAvoid building "sens" and "activity" executables unless selected
lambdadroid [Sat, 13 Oct 2018 12:39:22 +0000 (14:39 +0200)]
Avoid building "sens" and "activity" executables unless selected

6 years agoReverse the default orientation of accelerometer nougat-x86 android-x86-7.1-r2 android-x86-7.1-r3 android-x86-7.1-r4 android-x86-7.1-r5 android-x86-8.1-r1 android-x86-8.1-r2
Chih-Wei Huang [Wed, 14 Feb 2018 13:34:38 +0000 (21:34 +0800)]
Reverse the default orientation of accelerometer

More people reported the orientation of accelerometer is reversed.
Though we can adjust that by properties, it's easier to just change
the default orientation.

6 years agoFix bool typedef warning, take 2
Rob Herring [Wed, 31 Jan 2018 13:43:11 +0000 (07:43 -0600)]
Fix bool typedef warning, take 2

'bool' is already defined, so just remove the typedef and defines
altogether.

Signed-off-by: Rob Herring <robh@kernel.org>
6 years agoactivity: fix build error by including <errno.h> android-x86-7.1-r1
Mauro Rossi [Fri, 19 Jan 2018 22:10:39 +0000 (23:10 +0100)]
activity: fix build error by including <errno.h>

Fixes the following building errors:

hardware/intel/libsensors/activity.c:314:48: error: use of undeclared identifier 'errno'
                ALOGE("Error %s creating socket\n", strerror(errno));
                                                             ^
hardware/intel/libsensors/activity.c:320:47: error: use of undeclared identifier 'errno'
                ALOGE("Error %s binding socket\n", strerror(errno));
                                                            ^
hardware/intel/libsensors/activity.c:326:66: error: use of undeclared identifier 'errno'
                ALOGW("Error %s setting socket to listening state\n", strerror(errno));
                                                                               ^
hardware/intel/libsensors/activity.c:349:54: error: use of undeclared identifier 'errno'
                        ALOGE("Error %s accepting connection\n", strerror(errno));
                                                                          ^
hardware/intel/libsensors/activity.c:355:65: error: use of undeclared identifier 'errno'
                        ALOGE("Error %s in receiving message, conn = %d\n", strerror(errno), conn);
                                                                                     ^
hardware/intel/libsensors/activity.c:508:62: error: use of undeclared identifier 'errno'
                fprintf(stderr, "Error \"%s\" creating socket\n", strerror(errno));
                                                                           ^
hardware/intel/libsensors/activity.c:509:10: error: use of undeclared identifier 'errno'
                return errno;
                       ^
hardware/intel/libsensors/activity.c:514:67: error: use of undeclared identifier 'errno'
                fprintf(stderr, "Error \"%s\" connecting to server\n", strerror(errno));
                                                                                ^
hardware/intel/libsensors/activity.c:515:10: error: use of undeclared identifier 'errno'
                return errno;
                       ^
hardware/intel/libsensors/activity.c:520:72: error: use of undeclared identifier 'errno'
                fprintf(stderr, "Error \"%s\" sending message to server\n", strerror(errno));
                                                                                     ^
hardware/intel/libsensors/activity.c:521:10: error: use of undeclared identifier 'errno'
                return errno;
                       ^
hardware/intel/libsensors/activity.c:526:73: error: use of undeclared identifier 'errno'
                fprintf(stderr, "Error \"%s\" getting answer from server\n", strerror(errno));
                                                                                      ^
hardware/intel/libsensors/activity.c:527:10: error: use of undeclared identifier 'errno'
                return errno;
                       ^
13 errors generated.

6 years agoFix bool typedef warning
Rob Herring [Wed, 17 Jan 2018 14:44:07 +0000 (08:44 -0600)]
Fix bool typedef warning

Builds on AOSP master now fail with the error:

activity_event_utils.h:27:9: error: 'bool' cannot be signed or unsigned typedef unsigned bool;

Use the C99 type _Bool for bool instead.

Signed-off-by: Rob Herring <robh@kernel.org>
6 years agoFix build warnings
Rob Herring [Wed, 29 Nov 2017 17:41:05 +0000 (11:41 -0600)]
Fix build warnings

AOSP now builds with -Werror, so the build needs to be warning free.

Signed-off-by: Rob Herring <robh@kernel.org>
7 years agoRemove unused android_alarm.h include
Rob Herring [Wed, 27 Jul 2016 13:10:10 +0000 (08:10 -0500)]
Remove unused android_alarm.h include

This is now removed in AOSP master and isn't actually needed, so just
remove the include.

Signed-off-by: Rob Herring <robh@kernel.org>
7 years agoFix printf size related warnings
Rob Herring [Thu, 5 May 2016 15:46:03 +0000 (10:46 -0500)]
Fix printf size related warnings

Signed-off-by: Rob Herring <robh@kernel.org>
7 years agoAdd missing include of stdlib.h
Rob Herring [Thu, 5 May 2016 15:15:52 +0000 (10:15 -0500)]
Add missing include of stdlib.h

stdlib.h is needed for malloc.

Signed-off-by: Rob Herring <robh@kernel.org>
7 years agoAdd missing include of linux/iio/types.h
Rob Herring [Thu, 5 May 2016 15:15:22 +0000 (10:15 -0500)]
Add missing include of linux/iio/types.h

Signed-off-by: Rob Herring <robh@kernel.org>
7 years agoAndroid.mk: make the module names generic instead of based on TARGET_BOARD_PLATFORM
Rob Herring [Thu, 5 May 2016 13:59:14 +0000 (08:59 -0500)]
Android.mk: make the module names generic instead of based on TARGET_BOARD_PLATFORM

Use "iio" for the module name. Platforms using this HAL should set the
properties "ro.hardware.sensors" and "ro.hardware.activity_recognition" to
"iio".

Signed-off-by: Rob Herring <robh@kernel.org>
7 years agoAndroid.mk: Remove unnecessary include paths
Rob Herring [Thu, 5 May 2016 13:54:29 +0000 (08:54 -0500)]
Android.mk: Remove unnecessary include paths

We don't need to include the project path and
vendor/intel/hardware/iio-sensors isn't actually needed to build.

Signed-off-by: Rob Herring <robh@kernel.org>
7 years agoAndroid.mk: Remove USE_IIO_SENSOR_HAL and USE_IIO_ACTIVITY_RECOGNITION_HAL
Rob Herring [Thu, 5 May 2016 13:52:36 +0000 (08:52 -0500)]
Android.mk: Remove USE_IIO_SENSOR_HAL and USE_IIO_ACTIVITY_RECOGNITION_HAL

The modules will only be built if included in the product, so there is no
point in having an additional setting to control building of these modules.

Signed-off-by: Rob Herring <robh@kernel.org>
8 years agosensors: iio: remove events dependency if __NO_EVENTS__ is set
Constantin Musca [Mon, 23 Nov 2015 15:30:55 +0000 (17:30 +0200)]
sensors: iio: remove events dependency if __NO_EVENTS__ is set

Add option/cflag for disabling the IIO events support.

Change-Id: I64502530275f4797ddb652f04237518a047bc0f6
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
8 years agoAdd a README file
Mihai Serban [Wed, 28 Oct 2015 12:54:18 +0000 (14:54 +0200)]
Add a README file

Tracked-On: https://jira01.devtools.intel.com/browse/OAM-6795
Change-Id: Ibf7a90f1dc713c06daaca4e950b2843389dd0f06
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
8 years agoMerge remote-tracking branch 'origin/android/l/mr1/master' into r1
Viorel Suman [Thu, 24 Sep 2015 11:33:40 +0000 (14:33 +0300)]
Merge remote-tracking branch 'origin/android/l/mr1/master' into r1

git log --pretty=format:"%h %ad | %s%d [%an]" origin/android/master..origin/android/l/mr1/master:
  392a6b4 Thu Sep 24 11:23:13 2015 +0300 | Merge remote-tracking branch 'origin/android/master' (origin/android/l/mr1/master, origin/android/candidates/mergerequest/llp_mr1-r2, origin/android/candidates/mergerequest/llp_mr1-r1) [Viorel Suman]
  cda77fa Tue May 5 01:05:40 2015 -0700 | Add errno includes (origin/android/l/mr1/release/r1/L1R101820) [Axel Fagerstedt]
  92f7407 Thu Sep 17 13:59:43 2015 +0300 | Distribute under Apache License v2.0 (origin/android/l/mr1/release/r1/L1R101810, origin/android/l/mr1/release/r1/L1R101800, origin/abt/topic/gmin/l-dev/mr1/graphics-gen/rebase/r2/2015/ww39.2, origin/abt/topic/gmin/l-dev/mr1/camera/master, origin/abt/topic/gmin/l-dev/mr1/autodetect/master) [Mihai Serban]
  1ee37bf Wed Sep 2 13:25:15 2015 +0300 | calibration.h: set accel BUCKET_TOLERANCE to 2.5 (origin/android/l/mr1/release/r2/L1l000182, origin/android/l/mr1/release/r2/L1l000178, origin/android/l/mr1/release/r2/L1l000169, origin/android/l/mr1/release/r2/L1l000164, origin/android/l/mr1/release/r2/L1l000156, origin/android/l/mr1/release/r2/L1l000148, origin/android/l/mr1/release/r2/L1l000145, origin/android/l/mr1/release/r2/L1l000142, origin/android/l/mr1/release/r2/L1l000139, origin/android/l/mr1/release/r1/L1R101790, origin/android/l/mr1/release/r1/L1R101780, origin/android/l/mr1/release/r1/L1R101770, origin/android/l/mr1/release/r1/L1R101760, origin/android/l/mr1/release/r1/L1R101750, origin/android/l/mr1/release/r1/L1R101740, origin/android/l/mr1/release/r1/L1R101730, origin/android/l/mr1/release/r1/L1R101721, origin/android/l/mr1/release/r1/L1R101720, origin/android/l/mr1/release/r1/L1R101710, origin/android/l/mr1/release/r1/L1R101700, origin/android/l/mr1/release/r1/L1R101690, origin/android/l/mr1/release/r1/L1R101680, origin/android/l/mr1/release/r1/L1R101670, origin/abt/topic/gmin/l-dev/mr1/graphics-gen/rebase/r2/2015/ww37.5_cj, origin/abt/topic/gmin/l-dev/mr1/graphics-gen/rebase/r2/2015/ww37.4, origin/abt/topic/gmin/l-dev/mr1/graphics-gen/rebase/r2/2015/ww37.3_cj, origin/abt/topic/gmin/l-dev/mr1/graphics-gen/rebase/r2/2015/ww36.5, origin/abt/topic/gmin/l-dev/mr1/graphics-gen/rebase/r1/2015/ww37.3_cj, origin/abt/topic/gmin/l-dev/mr1/graphics-gen/r2, origin/abt/topic/gmin/l-dev/mr1/graphics-gen/archives/r2/2015/ww39.2) [Constantin Musca]

git diff --stat origin/android/master..HEAD:
  Android.mk                   |  12 ++-
  LICENSE                      | 201 +++++++++++++++++++++++++++++++++++++++++++
  MODULE_LICENSE_APACHE2       |   0
  Makefile                     |  14 +++
  NOTICE                       | 191 ++++++++++++++++++++++++++++++++++++++++
  accel-calibration.c          |  16 +++-
  activity.c                   |  17 +++-
  activity_event_entry.c       |  18 +++-
  activity_event_utils.h       |  16 +++-
  calibration.h                |  18 +++-
  common.h                     |  16 +++-
  compass-calibration.c        |  16 +++-
  control.c                    |  16 +++-
  control.h                    |  16 +++-
  description.c                |  18 +++-
  description.h                |  16 +++-
  discovery.c                  |  17 +++-
  entry.c                      |  16 +++-
  enumeration.c                |  16 +++-
  enumeration.h                |  16 +++-
  filtering.c                  |  16 +++-
  filtering.h                  |  16 +++-
  gyro-calibration.c           |  16 +++-
  iio-sensors.txt              |  14 +++
  linux/cutils/native_handle.h |  16 ++++
  linux/cutils/properties.h    |  16 +++-
  linux/linux/android_alarm.h  |  16 ++++
  linux/log.c                  |  16 +++-
  linux/system/graphics.h      |  16 ++++
  linux/utils/Atomic.h         |  16 +++-
  linux/utils/Log.h            |  16 +++-
  matrix-ops.c                 |  16 +++-
  matrix-ops.h                 |  16 +++-
  sens.c                       |  16 +++-
  transform.c                  |  16 +++-
  transform.h                  |  16 +++-
  utils.c                      |  16 +++-
  utils.h                      |  16 +++-
  38 files changed, 891 insertions(+), 61 deletions(-)

Tracked-On: https://jira01.devtools.intel.com/browse/OAM-3844
Change-Id: Ie52aa811b4c42bbae74c6e8cbd0ee23f3d490eb2
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoMerge remote-tracking branch 'origin/android/master'
Viorel Suman [Thu, 24 Sep 2015 08:23:13 +0000 (11:23 +0300)]
Merge remote-tracking branch 'origin/android/master'

git log --pretty=format:"%h %ad | %s%d [%an]" origin/android/l/mr1/master..origin/android/master:
  a614978 Mon Sep 7 17:27:17 2015 +0300 | Increase limit of trigger names to 64 characters (origin/feature/m_mr0/trusty, origin/feature/m_mr0/gfx_gen/rebase/r2/2015/ww38.2, origin/feature/m_mr0/gfx_gen/rebase/r1/2015/ww38.3_cj, origin/feature/m_mr0/gfx_gen/rebase/r1/2015/ww38.2_cj, origin/feature/m_mr0/gfx_gen/r2, origin/feature/m_mr0/camera/master, origin/feature/m_mr0/art/release/2015-WW38, origin/feature/m_mr0/art/master, origin/android/master, origin/android/m/mm/release/r1/MMR100230, origin/android/m/mm/release/r1/MMR100220, origin/android/m/mm/release/r1/MMR100210, origin/android/m/mm/release/r1/MMR100200, origin/android/m/mm/release/r1/MMR100190, origin/android/m/mm/release/r1/MMR100180, origin/android/m/mm/release/r1/MMR100170, origin/android/m/mm/release/r1/MMR100160, origin/android/candidates/mergerequest/master-r2, origin/android/candidates/mergerequest/master-r1) [Mihai Serban]
  6dd7dd1 Tue Aug 11 15:18:12 2015 +0000 | Merge branch e35fc5677585eb789efb5c02e2de084fbedcd67d into android/master (origin/feature/m_mr0/gfx_gen/rebase/r2/2015/ww37.2, origin/feature/m_mr0/gfx_gen/rebase/r1/2015/ww37.2, origin/feature/m_mr0/gfx_gen/rebase/r1/2015/ww35.4, origin/feature/m_mr0/gfx_gen/rebase/r1/2015/ww34.1, origin/feature/m_mr0/gfx_gen/r1, origin/feature/m_mr0/gfx_gen/archives/r2/2015/ww37.2, origin/feature/m_mr0/gfx_gen/archives/r1/2015/ww38.2, origin/feature/m_mr0/gfx_gen/archives/r1/2015/ww37.2_cj, origin/feature/m_mr0/gfx_gen/archives/r1/2015/ww37.2, origin/feature/m_mr0/gfx_gen/archives/r1/2015/ww36.1, origin/feature/m_mr0/gfx_gen/archives/r1/2015/WW35.3, origin/feature/m_mr0/art/release/2015-WW37, origin/feature/m_mr0/art/release/2015-WW36, origin/cas/integ/cas_tech, origin/android/masterM0R1TEST00019, origin/android/m/mr0/release/r1/M0R1TEST00019, origin/android/m/mr0/release/r1/M0R100009, origin/android/m/mm/release/r1/MMR100150, origin/android/m/mm/release/r1/MMR100140, origin/android/m/mm/release/r1/MMR100130, origin/android/m/mm/release/r1/MMR100120, origin/android/m/mm/release/r1/MMR100110, origin/android/m/mm/release/r1/MMR100100, origin/android/m/mm/release/r1/MMR100090, origin/android/m/mm/release/r1/MMR100080, origin/android/m/mm/release/r1/MMR100070, origin/android/m/mm/release/r1/MMR100060, origin/android/m/mm/release/r1/MMR100050, origin/android/m/mm/release/r1/MMR100040, origin/android/m/mm/release/r1/MMR100030, origin/android/m/mm/release/r1/MMR100020, origin/android/m/mm/release/r1/MMR100010, origin/android/m/mm/release/r1/MMR100009, origin/abt/private/topic/gmin/art-optim/staging/oam, origin/abt/private/topic/gmin/art-optim/release/staging/oam/2015-WW36, origin/abt/private/topic/gmin/art-optim/release/staging/oam/2015-WW35, origin/abt/private/topic/gmin/art-optim/release/staging/oam/2015-WW34a, origin/abt/private/topic/gmin/art-optim/release/staging/oam/2015-WW34) [buildslave]
  b220959 Mon Aug 3 10:28:11 2015 +0200 | add missing includes (origin/feature/m_mr0/gfx_gen/rebase/r1/2015/ww32.5, origin/feature/m_mr0/gfx_gen/archives/r1/2015/ww34.1, origin/feature/m_mr0/gfx_gen/archives/r1/2015/ww32.5, origin/abt/topic/gmin/l-dev/graphics-gen/rebase/2015/ww32.1, origin/abt/topic/gmin/l-dev/graphics-gen/r1, origin/abt/private/topic/gmin/art-optim/release/staging/oam/2015-WW33, origin/abt/private/topic/gmin/art-optim/release/staging/oam/2015-WW32) [christophe.continente]
  b27955f Fri Jul 24 18:51:09 2015 -0700 | Fix 64bit builds on master (origin/abt/private/topic/gmin/art-optim/release/staging/oam/2015-WW31a, origin/abt/private/topic/gmin/art-optim/release/staging/oam/2015-WW31) [Ganesh Mahalingam]
  07118de Wed Jul 22 13:00:13 2015 +0000 | Merge branch ab9bfb48e9c9aa0d4d0e182a8b7f78f8cae27e42 into android/master [buildslave]
  d9b3154 Tue May 5 01:05:40 2015 -0700 | Add errno includes (origin/android/m/topic/aosp/pdk, origin/android/m/topic/aosp/master, origin/android/m/mr0/release/r1/M0R1TEST00009, origin/android/m/mr0/master, origin/abt/topic/gmin/l-dev/graphics-gen/archives/2015/ww32.1, origin/abt/topic/gmin/l-dev/graphics-gen/archives/2015/ww29.4, origin/abt/private/topic/gmin/art-optim/staging/oam-rebase, origin/abt/private/topic/gmin/art-optim/staging/oam-dev, origin/abt/private/topic/gmin/art-optim/release/staging/oam/2015-WW29, origin/abt/private/topic/gmin/art-optim/release/staging/oam/2015-WW28, origin/abt/private/topic/gmin/art-optim/release/staging/oam/2015-WW27, origin/abt/private/topic/gmin/art-optim/release/staging/oam-dev/WW28) [Axel Fagerstedt]

git diff --stat origin/android/l/mr1/master..HEAD:
  common.h | 4 +++-
  sens.c   | 1 +
  2 files changed, 4 insertions(+), 1 deletion(-)

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-18956
Change-Id: I3e022365c3e5c22e72a494b2f848dcb53313ed9f
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoAdd errno includes
Axel Fagerstedt [Tue, 5 May 2015 08:05:40 +0000 (01:05 -0700)]
Add errno includes

The patch add errno includes.

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-18956
Change-Id: I5df3283ecedf52e36edd30c19a95d4b1fd0fb366
Reviewed-on: https://android.intel.com:443/415236

8 years agoDistribute under Apache License v2.0
Mihai Serban [Thu, 17 Sep 2015 10:59:43 +0000 (13:59 +0300)]
Distribute under Apache License v2.0

Add license files and update all project files for Apache License v2.0.

Change-Id: Iceefd025d7bc2a189ec1b11f56a6b2e8bf7227c0
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-18678
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
Reviewed-on: https://android.intel.com:443/412439

8 years agoIncrease limit of trigger names to 64 characters
Mihai Serban [Mon, 7 Sep 2015 14:27:17 +0000 (17:27 +0300)]
Increase limit of trigger names to 64 characters

The current limit of 32 characters makes impossible usage of triggers with long
names like hrtimer-lsm303dlhc_accel-hr-dev3.

Change-Id: Ic54c5d7cd2f7fb0be936812680d3fb547a9a052b
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-326
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
Reviewed-on: https://android.intel.com:443/409856

8 years agocalibration.h: set accel BUCKET_TOLERANCE to 2.5
Constantin Musca [Wed, 2 Sep 2015 10:25:15 +0000 (13:25 +0300)]
calibration.h: set accel BUCKET_TOLERANCE to 2.5

The Emdoor I8170 STK8312 accel sensor's Z axis has a
(2.3, 2.5) bias.
Set the accel BUCKET_TOLERANCE to 2.5 to allow compensation
for this sensor.

Change-Id: I39c434d5ba8c9b81558003751dd409b20ef93c85
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-17695
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-17696
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-17698
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
Reviewed-on: https://android.intel.com:443/407030

8 years agoMerge branch e35fc5677585eb789efb5c02e2de084fbedcd67d into android/master
buildslave [Tue, 11 Aug 2015 15:18:12 +0000 (15:18 +0000)]
Merge branch e35fc5677585eb789efb5c02e2de084fbedcd67d into android/master

Change-Id: I6d82ee93caa92676ff671d9b706ce7ee100aaed9
Tracked-On: https://jira01.devtools.intel.com/browse/CACTUS-3894

8 years agoIgnore avail freqs when the hrtimer trigger is selected
Constantin Musca [Fri, 7 Aug 2015 16:55:35 +0000 (19:55 +0300)]
Ignore avail freqs when the hrtimer trigger is selected

Setting the hrtimer quirk doesn't mean that the hrtimer
trigger will be selected.
Remove the hrtimer quirk checks and reset the freqs
without considering avail freqs in the create_hrtimer_trigger
function.

Change-Id: I0c45b024664768fe2a7f4d7d6ca57859f44c028d
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-15776
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
Reviewed-on: https://android.intel.com:443/398640

8 years agoflush: use a pipe to unlock the sensor_poll func
Constantin Musca [Wed, 5 Aug 2015 15:42:42 +0000 (18:42 +0300)]
flush: use a pipe to unlock the sensor_poll func

If the framework calls the flush method while *sensor_poll*
is waiting for events then the flush_complete event is delayed until
the sensor reports the first event.
The CTSVerifier Sensor test (testBatchAndFlush) is failing for SX9500
due to this delay. (No event is reported because SX9500's reporting mode
is On-change).
Use a pipe to generate an event when the flush method is executed so that
the flush_complete event can be reported to the framework.

Change-Id: Ie24a32f546f71330bdd0205e7b6f398855c2146c
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-15425
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
Reviewed-on: https://android.intel.com:443/397566

8 years agoadd missing includes
christophe.continente [Mon, 3 Aug 2015 08:28:11 +0000 (10:28 +0200)]
add missing includes

Change-Id: If04b561d58bcd3351529745f0ae5ea071985d5f3
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-243
Signed-off-by: christophe.continente <christophe.continente.@intel.com>
Reviewed-on: https://android.intel.com:443/396264

8 years agoMove module path to vendor
Benjamin Pujol [Fri, 26 Jun 2015 10:16:45 +0000 (12:16 +0200)]
Move module path to vendor

Required to build vendor image separated from system

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-15112
Change-Id: I56b0586d5679accbbdbe089fa8d5090d775c3c2f
Signed-off-by: Benjamin Pujol <benjamin.pujol@intel.com>
Reviewed-on: https://android.intel.com:443/384718

8 years agoFix 64bit builds on master
Ganesh Mahalingam [Sat, 25 Jul 2015 01:51:09 +0000 (18:51 -0700)]
Fix 64bit builds on master

Change-Id: I0b3abb23c64938756911243fb7ca71c5f9b67a2e
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-144
Signed-off-by: Ganesh Mahalingam <ganesh.mahalingam@intel.com>
Reviewed-on: https://android.intel.com:443/393812

8 years agoDetermine maxRange and resolution from IIO attributes
Adriana Reus [Tue, 21 Jul 2015 10:19:20 +0000 (13:19 +0300)]
Determine maxRange and resolution from IIO attributes

This patch determines the Android maxRange and resolution sensor
attributes based on the IIO attributes:

resolution = scale (or 1 if no scale is defined)

maxRange = 2^realbits * resolution + offset

If scale or offset are not defined at the sensor level we pick them
from the first channel.

This should avoid the need to define Android properties in most
cases. However, one can still use Android properties to override the
automatically computed values.

Change-Id: I04536be1fe741d887103ab07fda7daf4b4408ddc
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-14246
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Reviewed-on: https://android.intel.com:443/392075

8 years agoMerge branch ab9bfb48e9c9aa0d4d0e182a8b7f78f8cae27e42 into android/master
buildslave [Wed, 22 Jul 2015 13:00:13 +0000 (13:00 +0000)]
Merge branch ab9bfb48e9c9aa0d4d0e182a8b7f78f8cae27e42 into android/master

Change-Id: I7055293535066136428f3479c6160b8341ef24c3
Tracked-On: https://jira01.devtools.intel.com/browse/CACTUS-3235

8 years agoUse THREAD_CPUTIME to measure sensor activation time
Viorel Suman [Tue, 21 Jul 2015 06:26:29 +0000 (09:26 +0300)]
Use THREAD_CPUTIME to measure sensor activation time

CLOCK_BOOTTIME measures the overall time spend by
CPU on all processes while invoking the sensor activation.
In a multi-process multi-threaded environment this
creates the misperception that sensor activation
takes too long when resuming from suspended state.
Use CLOCK_THREAD_CPUTIME_ID instead of CLOCK_BOOTTIME
in order to measure the time spent by CPU on sensor
activation thread exclusively.

Change-Id: I362d76c8976cb566962c03b294462a6d6a0f69e7
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-12362
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
Reviewed-on: https://android.intel.com:443/391994

8 years agoUse cached sensor's availabled frequencies
Viorel Suman [Mon, 20 Jul 2015 13:57:39 +0000 (16:57 +0300)]
Use cached sensor's availabled frequencies

Several functions reviewed so that just introduced
cached sensor's available frequencies are used
instead of file parsing.

Change-Id: I4ca281ec809ea75be73e011a50778f406478328b
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-12362
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
Reviewed-on: https://android.intel.com:443/391765

8 years agoCache sensor's available frequencies
Viorel Suman [Fri, 17 Jul 2015 16:01:01 +0000 (19:01 +0300)]
Cache sensor's available frequencies

We would like to cache the sensor available frequencies
given that this is a static, sensor specific, information.

Change-Id: Iff484dec1cca9e5d5c8a17773c2ce60875e88c8d
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-12362
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
Reviewed-on: https://android.intel.com:443/391427

8 years agoAdd change buffer length option
Irina Patru [Fri, 17 Jul 2015 13:04:48 +0000 (16:04 +0300)]
Add change buffer length option

Some samples were lost in userspace because the FIFO
size was 2 and sometimes they were overwritten before
they were read.
The buffer length is now configurable from HALD using
system prop and the default value is increased to 16.

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-13814
Change-Id: I7aed65942005fb14691a4239cd3e389b53037208
Signed-off-by: Irina Patru <irina.patru@intel.com>
Reviewed-on: https://android.intel.com:443/391412

8 years agohrtimers: don't consider available freqs when choosing sampling rate
Constantin Musca [Fri, 17 Jul 2015 12:45:21 +0000 (15:45 +0300)]
hrtimers: don't consider available freqs when choosing sampling rate

The hrtimer sampling rate is set to the lowest available sensor freq
higher than the requested sampling rate.
Don't let the hrtimer sampling rate to be influenced by available freqs,
but write to the sensor's sampling rate interface the closest value.

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-13721
Change-Id: I85095261d0259f40ec19ff45c45ba0a230a904b9
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
Reviewed-on: https://android.intel.com:443/391322

8 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into...
Viorel Suman [Mon, 6 Jul 2015 14:48:08 +0000 (17:48 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into l-mr1-master

git log --pretty=format:"%h %ad | %s%d [%an]" origin/android/l/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  8e32e87 Thu Jun 25 16:42:34 2015 +0200 | GMINL-12124: Fix timestamps on SX9500 capacitive proximity sensor (origin/abt/topic/gmin/l-dev/mr1/sensors/master, sensors) [Patrick Porlan]

git diff --stat origin/android/l/mr1/master..HEAD:
  control.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

Change-Id: Id387ab7f3e31755256b1b66476500e40625cccf4
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-12124
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoGMINL-12124: Fix timestamps on SX9500 capacitive proximity sensor
Patrick Porlan [Thu, 25 Jun 2015 14:42:34 +0000 (16:42 +0200)]
GMINL-12124: Fix timestamps on SX9500 capacitive proximity sensor

Those were being left as real-time instead of being offset to
reflect time since boot, as required by Android.

Change-Id: I549f0270b508ecf94c1e69a42c8325088cfc24bb
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
8 years agoAdd errno includes
Axel Fagerstedt [Tue, 5 May 2015 08:05:40 +0000 (01:05 -0700)]
Add errno includes

Change-Id: I5df3283ecedf52e36edd30c19a95d4b1fd0fb366

8 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into...
Viorel Suman [Wed, 24 Jun 2015 12:33:53 +0000 (15:33 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into l-mr1-master

git log --pretty=format:"%h %ad | %s%d [%an]" origin/android/l/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  d3a01e8 Thu Jun 18 18:05:18 2015 +0200 | GMINL-10383: Allow for prioritization of sensors (origin/abt/topic/gmin/l-dev/mr1/sensors/master, sensors) [Patrick Porlan]

git diff --stat origin/android/l/mr1/master..HEAD:
  description.c | 28 ++++++++++++++++++++++------
  description.h | 27 ++++++++++++++-------------
  enumeration.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3 files changed, 93 insertions(+), 19 deletions(-)

Change-Id: I100d0c5a916c785826d757c283e8b8b809c81d45
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoGMINL-10383: Allow for prioritization of sensors
Patrick Porlan [Thu, 18 Jun 2015 16:05:18 +0000 (18:05 +0200)]
GMINL-10383: Allow for prioritization of sensors

This adds support for a 'secondary' quirk that ensures that
such sensors are listed after normal ones. One possible usage
is to list SAR proximity sensors after ALS ones.

i.e. setprop ro.iio.prox.sx9500.quirks "secondary"

The quirk is also implied by the presence of a negative
value in the last slot of the orientation matrix in the
Device Tree, for proximity sensors

Change-Id: I4d0b83b3220abfe7155b193e15356bb4e9ce8b1f
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
8 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into...
Viorel Suman [Tue, 16 Jun 2015 14:43:09 +0000 (17:43 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into l-mr1-master

git log --pretty=format:"%h %ad | %s%d [%an]" origin/android/l/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  2afc30f Tue Jun 16 17:36:30 2015 +0300 | hrtimer sampling frequency must be integral number (origin/abt/topic/gmin/l-dev/mr1/sensors/master, refs/published/sensors, sensors) [Viorel Suman]

git diff --stat origin/android/l/mr1/master..HEAD:
  control.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Change-Id: If0bb79be6b9415e1aa2b49b799f7747c89514d40
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agohrtimer sampling frequency must be integral number
Viorel Suman [Tue, 16 Jun 2015 14:36:30 +0000 (17:36 +0300)]
hrtimer sampling frequency must be integral number

hrtimer sampling frequency must be an integral number,
so round to smallest integral value not less than the
passed frequency.

Change-Id: I0e7ca644dee3f679b1e26f422e3d87eedf7c7482
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into...
Viorel Suman [Thu, 11 Jun 2015 13:15:43 +0000 (16:15 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into l-mr1-master

git log --pretty=format:"%h %ad | %s%d [%an]" origin/android/l/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  a1f7794 Fri May 29 15:05:40 2015 +0300 | sens: add check_sample_rate function to verify if events frequency exceeds some rate per second (origin/abt/topic/gmin/l-dev/mr1/sensors/master, sensors) [Maria Constantin]
  eb8eec1 Mon May 11 15:16:33 2015 +0300 | sens : add poll with params feature for time or event orientated polling [Razvan Stamate]
  0aa1bbb Thu Apr 23 16:27:12 2015 +0300 | sens : add poll_stop function to stop the polling output stream [Razvan Stamate]

git diff --stat origin/android/l/mr1/master..HEAD:
  sens.c | 122 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
  1 file changed, 116 insertions(+), 6 deletions(-)

Change-Id: I6e3ee7f8e4d4c2e4873a44279db85aae864e8fae
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agosens: add check_sample_rate function to verify if events frequency exceeds some rate...
Maria Constantin [Fri, 29 May 2015 12:05:40 +0000 (15:05 +0300)]
sens: add check_sample_rate function to verify if events frequency exceeds some rate per second

Allows passing the rate as parameter to the check_sample_rate method.
Starts polling for one second or until a number of events, equal with the
rate, is reached. Finally, verifies if the rate of events per second is
reached (if it is true, will print "test passed", otherwise will print
"test failed")
ex: sens check_sample_rate 100
Will print "test passed" if the number of events in 1 second exceeds 100,
otherwise will print "test failed".

Change-Id: Ic84e9fe13a577435bf55304b0aecafdd83b00f47
Signed-off-by: Maria Constantin <maria.p.constantin@intel.com>
8 years agosens : add poll with params feature for time or event orientated polling
Razvan Stamate [Mon, 11 May 2015 12:16:33 +0000 (15:16 +0300)]
sens : add poll with params feature for time or event orientated polling

Allows passing time and event number as parameters to the poll
method so that the polling will gracefully stop after an event exceeds
the targeted value or the timestamp exceeds the time allocated.

ex: sens poll 1000000000 22
Will print the number of events in 1 second or 22 events

Prints time remaining for the time orientated poll functions.

Change-Id: I77df6d9a0b6d35c5250747c1d149577894961a8e
Signed-off-by: Razvan Stamate <razvan.c.stamate@intel.com>
Signed-off-by: Maria Constantin <maria.p.constantin@intel.com>
8 years agosens : add poll_stop function to stop the polling output stream
Razvan Stamate [Thu, 23 Apr 2015 13:27:12 +0000 (16:27 +0300)]
sens : add poll_stop function to stop the polling output stream

Change-Id: Id332d8db8dda0098f422835e6e7c246933a44cf3
Signed-off-by: Razvan Stamate <razvan.c.stamate@intel.com>
8 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into...
Viorel Suman [Thu, 28 May 2015 12:26:30 +0000 (15:26 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into v-master

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  c02faee Tue May 26 16:26:34 2015 +0300 | Enforce frequency setup for distinct hr trigger and sensor rates (origin/abt/topic/gmin/l-dev/mr1/sensors/master, m/abt/topic/gmin/l-dev/mr1/master, v1) [Viorel Suman]
  6365d95 Fri May 29 10:57:17 2015 +0300 | Remove superfluous assignment [Adriana Reus]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  control.c | 15 ++++++++++-----
  1 file changed, 10 insertions(+), 5 deletions(-)

Change-Id: If1abe320166c7d4cc77b8547dbe5cdf4a5a84642
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoEnforce frequency setup for distinct hr trigger and sensor rates
Viorel Suman [Tue, 26 May 2015 13:26:34 +0000 (16:26 +0300)]
Enforce frequency setup for distinct hr trigger and sensor rates

We need to enforce frequency update when current
software trigger rate and current sensor sampling rate
are different.

Change-Id: I951b7b68ffda888d51203f9f719e66ddf4d94eb4
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoRemove superfluous assignment
Adriana Reus [Fri, 29 May 2015 07:57:17 +0000 (10:57 +0300)]
Remove superfluous assignment

Change-Id: I47d9a71321485c4a141883e7f05e398614bd5c47
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
8 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into...
Viorel Suman [Wed, 27 May 2015 13:38:06 +0000 (16:38 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into v-master

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  6bfb9a8 Tue May 26 15:29:10 2015 +0300 | Increase the tolerance interval for Sofia StMicro gyro (origin/abt/topic/gmin/l-dev/mr1/sensors/master, m/abt/topic/gmin/l-dev/mr1/master, v-rebase) [Viorel Suman]
  cea652e Tue May 26 15:21:33 2015 +0300 | Fix "hr" trigger index [Viorel Suman]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  control.c     | 2 +-
  enumeration.c | 8 +++++---
  2 files changed, 6 insertions(+), 4 deletions(-)

Change-Id: I256f8a46d6f275c959e4d22d4ce504df9c047cd9
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoIncrease the tolerance interval for Sofia StMicro gyro
Viorel Suman [Tue, 26 May 2015 12:29:10 +0000 (15:29 +0300)]
Increase the tolerance interval for Sofia StMicro gyro

For Sofia StMicro gyro "95Hz" frequency option round error
goes to "0.0025", so increase the tolerance interval to +-0.01Hz;

Change-Id: I9413f9b833027657b07efa34e4f3909a268520d6
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoFix "hr" trigger index
Viorel Suman [Tue, 26 May 2015 12:21:33 +0000 (15:21 +0300)]
Fix "hr" trigger index

The current code uses the same "hr" trigger index thus
sampling frequency is changed for wrong "hr" trigger when
several sensors having own "hr" triggers are enabled.
Increase the "hr" trigger index in order to point to the
proper trigger when hr trigger sampling_frequency is changed.

Change-Id: I65558d765f7468bbcfd7d20c69c34cfbb9a6d4b9
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into...
Viorel Suman [Wed, 20 May 2015 09:41:49 +0000 (12:41 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into v-master

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  805aeba Wed May 20 15:58:02 2015 +0300 | Magnetometer: Convert Gauss to uT in the case of sensors exposing input path also. (origin/abt/topic/gmin/l-dev/mr1/sensors/master, m/abt/topic/gmin/l-dev/mr1/master, v0) [Adriana Reus]
  980e611 Fri May 15 10:51:17 2015 +0200 | GMINL-8061: Disregard the 100 Hz floor rate for polling BMG160 [Patrick Porlan]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  description.c | 53 ++++++++++++++++++++++++++++++++---------------------
  transform.c   |  5 ++++-
  2 files changed, 36 insertions(+), 22 deletions(-)

Change-Id: I04614fe52a515e7b897d4ea90c96676b03fb8ee0
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoMagnetometer: Convert Gauss to uT in the case of sensors exposing input path also.
Adriana Reus [Wed, 20 May 2015 12:58:02 +0000 (15:58 +0300)]
Magnetometer: Convert Gauss to uT in the case of sensors exposing input path also.

It seems the Gauss to uT conversion wasn't done in the case where we have input
paths for magnetometers.

Change-Id: I9c89004d18dff47ee0c2d75df744290c901dc226
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
8 years agoGMINL-8061: Disregard the 100 Hz floor rate for polling BMG160
Patrick Porlan [Fri, 15 May 2015 08:51:17 +0000 (10:51 +0200)]
GMINL-8061: Disregard the 100 Hz floor rate for polling BMG160

We don't need to respect the list of supported sampling rates when
we are not relying on the trigger to send us samples.

Also, there is no relation between the minimum rate that we can
activate on a sensor and the minimum rate that we should support
according to the CDD. That specific one tells that the chip ought
to support at least N Hz if requested to do so, not that we should
drive it at this frequency always.

Change-Id: I3007e8c1a16765e04ccc2865c5187ec7cfbed26d
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
8 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into...
Viorel Suman [Fri, 15 May 2015 11:14:01 +0000 (14:14 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into v-master

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  7898225 Thu May 14 13:30:28 2015 +0300 | hrtimer: Use the new IIO hrtimer interface (origin/abt/topic/gmin/l-dev/mr1/sensors/master, v0) [Adriana Reus]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  common.h      |  4 +++-
  control.c     |  4 +++-
  enumeration.c | 11 +++++++----
  3 files changed, 13 insertions(+), 6 deletions(-)

Change-Id: I11a366f27af724920a23423b1de640539840e080
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agohrtimer: Use the new IIO hrtimer interface
Adriana Reus [Thu, 14 May 2015 10:30:28 +0000 (13:30 +0300)]
hrtimer: Use the new IIO hrtimer interface

After commit bca4c7102b5 ("iio: hrtimer: Move sampling_frequency to trigger dir")
the IIO trigger interface moved the sampling_frequency attribute from:

 /config/triggers/hrtimer-instanceX/sampling_frequency/

to

 /sys/bus/iio/devices/triggerX/sampling_frequency

Change-Id: I0979568102f1f6e3190b84caa507aac67b04fabc
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
8 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into...
Viorel Suman [Tue, 12 May 2015 09:08:24 +0000 (12:08 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into v-master

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  3531d19 Tue Feb 3 14:48:11 2015 +0200 | Enable Gauss-2-uT conversion for interrupt mode magneto (origin/abt/topic/gmin/l-dev/mr1/sensors/master, m/abt/topic/gmin/l-dev/mr1/master, refs/published/v0, v0) [Viorel Suman]
  7b6c078 Fri May 1 12:16:34 2015 +0300 | Add support for using a hrtimer trigger. [Adriana Reus]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  common.h      |  3 +++
  control.c     | 12 +++++++++++-
  description.c |  3 +++
  description.h |  1 +
  enumeration.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
  transform.c   | 11 +++++++----
  6 files changed, 67 insertions(+), 7 deletions(-)

Change-Id: I9515c83c7c38f327986125a1a39e73ed40957305
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoEnable Gauss-2-uT conversion for interrupt mode magneto
Viorel Suman [Tue, 3 Feb 2015 12:48:11 +0000 (14:48 +0200)]
Enable Gauss-2-uT conversion for interrupt mode magneto

Fix enables the Gauss-2-uT conversion for
magnetometers working in interrupt mode.

Change-Id: Icbcd19b38601991209a858136297318e94c01176
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
8 years agoAdd support for using a hrtimer trigger.
Adriana Reus [Fri, 1 May 2015 09:16:34 +0000 (12:16 +0300)]
Add support for using a hrtimer trigger.

Add support for creating and using a hrtimer trigger
when we do not find any other suitable trigger exposed.
This may happen if for example we lack the appropriate interrupt
line for a platform.

We specify a "hrtimer" quirk to signal we allow creating one
for opne particular sensor. WE may not want this by default because
there are sensor drivers that do not specifically expose a trigger but
work if the traditional "-dev%d" one is setup.

Change-Id: I0c8a1f6c55b5258330370dc1ac77f8f6dae598cb
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
8 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into mr1
Adriana Reus [Fri, 24 Apr 2015 12:17:54 +0000 (15:17 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into mr1

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  cd36e6b Sun Apr 19 16:20:16 2015 -0700 | Add support for IIO mounting_matrix (origin/abt/topic/gmin/l-dev/mr1/sensors/master, m/abt/topic/gmin/l-dev/mr1/master, rebase, new, clean) [Octavian Purdila]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  common.h      |  7 +++++++
  description.c | 35 +++++++++++++++++++++++++++++++++++
  description.h |  2 ++
  enumeration.c |  7 +++++--
  transform.c   | 13 +++++++++++++
  5 files changed, 62 insertions(+), 2 deletions(-)

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-8497
Change-Id: I75abd86bb62a9901a85eccf192c015041aee55ac
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoAdd support for IIO mounting_matrix
Octavian Purdila [Sun, 19 Apr 2015 23:20:16 +0000 (16:20 -0700)]
Add support for IIO mounting_matrix

The IIO mounting_matrix attribute offers information about the way the
sensor was mounted on the PCB. This patch reads this information and
uses it to correct the sample data.

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-8150
Change-Id: I3f60bfc13db1c1e305aa4456eb409db446c43bda
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
9 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into mr1
Adriana Reus [Fri, 17 Apr 2015 12:58:39 +0000 (15:58 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into mr1

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  f233632 Thu Apr 16 12:44:36 2015 +0300 | Add "shorthand" field to sensor_catalog (origin/abt/topic/gmin/l-dev/mr1/sensors/master) [Adriana Reus]
  69ead50 Thu Apr 16 15:25:14 2015 +0300 | Clamp high proximity values to 1m [Adriana Reus]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  common.h      |  1 +
  description.c | 11 +++++++++++
  enumeration.c | 14 ++++++++++++++
  transform.c   | 17 ++++++++++++++---
  4 files changed, 40 insertions(+), 3 deletions(-)

Change-Id: I4d533f572ade8cc366ef8be6fe8f5911c629df66
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoAdd "shorthand" field to sensor_catalog
Adriana Reus [Thu, 16 Apr 2015 09:44:36 +0000 (12:44 +0300)]
Add "shorthand" field to sensor_catalog

In case the property gets too long for a specific sensor,
example ro.iio.proximity.somesensorname.resolution, we may want
to use a shorthand instead or the entire prefix. For example:
"prox" instead of "proximity".

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-8217
Change-Id: I65460e3a57f936107236f807ae596a62abd15676
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoClamp high proximity values to 1m
Adriana Reus [Thu, 16 Apr 2015 12:25:14 +0000 (15:25 +0300)]
Clamp high proximity values to 1m

See iio spec for in_proximity* - depending on the device
this value is either in meters either unit-less and cannot
be translated to SI units. Where the translation is not possible
lower values indicate something is close and higher ones indicate distance.

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-8221
Change-Id: Ic88ff54692c3b0983aa46afe35498c83f7955e3a
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into mr1
Adriana Reus [Wed, 15 Apr 2015 15:20:21 +0000 (18:20 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into mr1

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  580f18a Tue Apr 14 14:21:58 2015 +0200 | GMINL-7944: Ignore ALS intensity if illuminance is available (origin/abt/topic/gmin/l-dev/mr1/sensors/master) [Patrick Porlan]
  3068a36 Fri Apr 10 19:06:05 2015 +0200 | GMINL-7944: Introduce internal sensor types for ALS [Patrick Porlan]
  823fab6 Mon Apr 13 17:05:17 2015 +0200 | GMINL-7944: Add quirks for disabling data acquisition methods [Patrick Porlan]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  control.c       |  9 ++++--
  description.c   | 17 ++++++++---
  description.h   |  5 +++-
  enumeration.c   | 91 ++++++++++++++++++++++++++++++++++++++++++++++-----------
  enumeration.h   |  7 +++++
  iio-sensors.txt |  3 ++
  transform.c     |  7 +++--
  7 files changed, 112 insertions(+), 27 deletions(-)

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-8153
Change-Id: Ib7e6716884376698a91b3782e4fba94a9a1c9ded
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoGMINL-7944: Ignore ALS intensity if illuminance is available
Patrick Porlan [Tue, 14 Apr 2015 12:21:58 +0000 (14:21 +0200)]
GMINL-7944: Ignore ALS intensity if illuminance is available

ALS drivers are increasing in sophistication and are now exposing
a variety of values, that we don't want to expose as different
sensors. Add arbitration code that will prioritize illuminance over
intensity.

Change-Id: I52fc3fb3e11be08ec62488a86bab7c04d06946f6
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
9 years agoGMINL-7944: Introduce internal sensor types for ALS
Patrick Porlan [Fri, 10 Apr 2015 17:06:05 +0000 (19:06 +0200)]
GMINL-7944: Introduce internal sensor types for ALS

Decouple the sensor type retrieved from the catalog from the one
that is exposed to Android. This allows us to tailor processing
to specific iio sensor types. Start with the ALS, which comes in
several variants that we will want to arbitrate (i.e. if a sensor
exposes both illuminance and intensity, we'll keep illuminance).

This could enable finer processing per iio type, such as intensity
to lux conversions.

The type field in the sensor array becomes the internal type. The
type field on the sensor_desc array is the one exposed to Android.

Change-Id: Ie3a001d389af50f88732f71a3b06afc752255f4c
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
9 years agoGMINL-7944: Add quirks for disabling data acquisition methods
Patrick Porlan [Mon, 13 Apr 2015 15:05:17 +0000 (17:05 +0200)]
GMINL-7944: Add quirks for disabling data acquisition methods

The current LTR-301 ALS driver is not exposing any events, but
expose channels, so we try to use it in trigger mode, only to
fail because it's not exposing any trigger name and doesn't
accept the default one (at least on ECS 10 edu, since no data
ready line is allocated). So let's force it to polling for now.

Change-Id: I910e0e52ebba536b81b0071dc9a201d11b846b35
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
9 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master'
Adriana Reus [Sat, 11 Apr 2015 15:03:15 +0000 (18:03 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master'

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/mr1/sensors/master:
  3c0ce56 Tue Apr 7 13:22:06 2015 +0300 | clean-up: minor formatting tweak (origin/abt/topic/gmin/l-dev/sensors/master, origin/abt/topic/gmin/l-dev/mr1/sensors/master, m/abt/topic/gmin/l-dev/mr1/master, sens, rebase, mytopic) [Adriana Reus]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  enumeration.c | 21 +++++++++++----------
  1 file changed, 11 insertions(+), 10 deletions(-)

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-8023
Change-Id: Ifbb937dda4f35888f1a2cf22ab78a6d9f26be7af
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoclean-up: minor formatting tweak
Adriana Reus [Tue, 7 Apr 2015 10:22:06 +0000 (13:22 +0300)]
clean-up: minor formatting tweak

Change-Id: I01a56ae70f05fe6f5e6da3f0faf58dfbb1c2bbbb
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into l...
Adriana Reus [Tue, 7 Apr 2015 11:08:34 +0000 (14:08 +0300)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into l-dev/mr1/master

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/sensors/master:
  ef3a026 Fri Apr 3 18:30:17 2015 +0300 | include events.h instead of copying the defines (origin/abt/topic/gmin/l-dev/sensors/master, m/abt/topic/gmin/l-dev/master, newbranch) [Adriana Reus]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  activity_event_entry.c |  1 +
  common.h               | 99 --------------------------------------------------
  control.c              |  2 +-
  3 files changed, 2 insertions(+), 100 deletions(-)

Change-Id: I578ab4914c2e356c83f305fada95832ed29a7373
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoinclude events.h instead of copying the defines
Adriana Reus [Fri, 3 Apr 2015 15:30:17 +0000 (18:30 +0300)]
include events.h instead of copying the defines

Protex Ip is unhappy about GPL code in this component.

Depends-Change-Id: I1a875bd0571eda6886bba8f45804f9dcbe271015
Change-Id: I7901239eff3cb14795f187c79520b4d7814bc752
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into mr1
Viorel Suman [Thu, 19 Mar 2015 11:44:25 +0000 (13:44 +0200)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into mr1

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/sensors/master:
  6aafc79 Tue Mar 17 09:34:57 2015 +0100 | Add support for proximity sensor supporting events. (origin/abt/topic/gmin/l-dev/sensors/master, m/abt/topic/gmin/l-dev/master, s-new) [Adriana]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  common.h      |  2 +-
  control.c     | 15 ++++++++++++++-
  enumeration.c | 36 ++++++++++++++++++++++++++++++++++++
  3 files changed, 51 insertions(+), 2 deletions(-)

Change-Id: If8d3b238ff43d81f123f499b6f6c197ba5a5f694
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
9 years agoAdd support for proximity sensor supporting events.
Adriana [Tue, 17 Mar 2015 08:34:57 +0000 (09:34 +0100)]
Add support for proximity sensor supporting events.

Added a new entry for a new event-based proximity sensor.
This is mostly targeted at the sofia sx9300 which exposes 4 channels
of different sensitivity levels.

Added handling of rising/falling events.

Change-Id: Ifd77a897a1a31092af09a8a29bb6df738d69b11b
Signed-off-by: Adriana <adriana.reus@intel.com>
9 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into mr1
Viorel Suman [Tue, 17 Mar 2015 13:05:58 +0000 (15:05 +0200)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into mr1

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/sensors/master:
  a65a6ef Mon Mar 16 16:02:22 2015 +0100 | Use snprintf instead of sprintf (origin/abt/topic/gmin/l-dev/sensors/master, m/abt/topic/gmin/l-dev/master, v0) [Adriana]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  description.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Change-Id: I468c88c975eb52371fd18c29107e95f1e19ad633
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
9 years agoUse snprintf instead of sprintf
Adriana [Mon, 16 Mar 2015 15:02:22 +0000 (16:02 +0100)]
Use snprintf instead of sprintf

Android has PROP_MAX_NAME defined to 32.
We'll truncate if we get past that.

Change-Id: I4d7e4637429cd71242a345e8af07a72e2ee87475
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into gmin...
Adriana Reus [Wed, 11 Mar 2015 11:29:04 +0000 (13:29 +0200)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into gmin/l-dev/mr1/master

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/mr1/master..origin/abt/topic/gmin/l-dev/sensors/master:
  81202ad Thu Mar 5 16:56:27 2015 +0100 | Create some documentation for the iio sensors HAL component (origin/abt/topic/gmin/l-dev/sensors/master, m/abt/topic/gmin/l-dev/master, rebase) [Patrick Porlan]
  d08bfa3 Fri Mar 6 14:22:49 2015 +0200 | Activity recognition lib name fix [Viorel Suman]
  6e03c92 Wed Mar 4 09:57:38 2015 +0100 | Fix potentially improper fd usage [Patrick Porlan]
  87a01bc Wed Mar 4 09:54:20 2015 +0100 | Looks like I inverted the parameters of a memset call [Patrick Porlan]
  4430ef6 Tue Mar 3 15:30:28 2015 +0100 | Replace the USE_INTEL_SENSOR_HAL tag by USE_IIO_SENSOR_HAL for iio [Patrick Porlan]
  5eddd1a Mon Mar 2 12:22:13 2015 +0100 | Add an informative trace about sensor activation time [Patrick Porlan]
  5c2f795 Mon Mar 2 18:13:44 2015 +0200 | spring cleanup: Unify calibration parameters. [Adriana Reus]
  53b3fe2 Mon Mar 2 17:45:05 2015 +0200 | Add quirk for passing timestamps [Adriana Reus]
  6efc469 Tue Feb 24 17:49:18 2015 +0200 | Add version number to calibration data [Adriana Reus]

git diff --stat origin/abt/topic/gmin/l-dev/mr1/master..HEAD:
  Android.mk            |   6 +-
  Makefile              |  10 +-
  accel-calibration.c   |   9 +-
  calibration.h         |  12 +--
  compass-calibration.c |  37 ++++---
  control.c             |  16 +--
  description.c         |   3 +
  description.h         |   1 +
  entry.c               |  20 +++-
  gyro-calibration.c    |  31 +++---
  iio-sensors.txt       | 274 ++++++++++++++++++++++++++++++++++++++++++++++++++
  transform.c           |   4 +-
  12 files changed, 367 insertions(+), 56 deletions(-)

Change-Id: I32297be5553cfc3f43c51f8627d36df264113d32
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Tracked-by: https://jira01.devtools.intel.com/browse/GMINL-6920
9 years agoCreate some documentation for the iio sensors HAL component
Patrick Porlan [Thu, 5 Mar 2015 15:56:27 +0000 (16:56 +0100)]
Create some documentation for the iio sensors HAL component

That's a first draft.

Change-Id: I07a69d7b11c9909349722d78bd04b58d1bcfb12b
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
9 years agoActivity recognition lib name fix
Viorel Suman [Fri, 6 Mar 2015 12:22:49 +0000 (14:22 +0200)]
Activity recognition lib name fix

The patch fixes the activity recognition library name.

Change-Id: I3522de55dd444bbe3051966bdc499bd41b9896f3
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
9 years agoFix potentially improper fd usage
Patrick Porlan [Wed, 4 Mar 2015 08:57:38 +0000 (09:57 +0100)]
Fix potentially improper fd usage

Check for -1 after open

Change-Id: Icd29828a05f32155bc1a58432492976d5a6ad70b
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
9 years agoLooks like I inverted the parameters of a memset call
Patrick Porlan [Wed, 4 Mar 2015 08:54:20 +0000 (09:54 +0100)]
Looks like I inverted the parameters of a memset call

I blame the Palm OS MemSet call for confusing me.

Change-Id: Id66b8c92d2367ac8a6f3190b8a077f5ed3eb674a
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
9 years agoReplace the USE_INTEL_SENSOR_HAL tag by USE_IIO_SENSOR_HAL for iio
Patrick Porlan [Tue, 3 Mar 2015 14:30:28 +0000 (15:30 +0100)]
Replace the USE_INTEL_SENSOR_HAL tag by USE_IIO_SENSOR_HAL for iio

That avoids a namespace clash with the Intel Sensor Hub (CHT/BXT) HAL.

Change-Id: I4a6b4045ce7553029eba71c24783242f18f09901
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
9 years agoAdd an informative trace about sensor activation time
Patrick Porlan [Mon, 2 Mar 2015 11:22:13 +0000 (12:22 +0100)]
Add an informative trace about sensor activation time

We have issues related to the time it takes to enable sensors
on certain hardware, so measure and print out this delay.

Change-Id: I02fc9dabb4219b3ba31674a644a5018c2d8ada3a
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
9 years agospring cleanup: Unify calibration parameters.
Adriana Reus [Mon, 2 Mar 2015 16:13:44 +0000 (18:13 +0200)]
spring cleanup: Unify calibration parameters.

Change-Id: I96d4486407cb3575a2ca8f78b8846ad2bf9e2d71
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoAdd quirk for passing timestamps
Adriana Reus [Mon, 2 Mar 2015 15:45:05 +0000 (17:45 +0200)]
Add quirk for passing timestamps

I'd like to pass the timestamps we get from the iio channel unmodified
and without covering up potential issues. As much as possible.

Change-Id: I12303cec2d333638ef037dbf9c95318c0ec5461e
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoAdd version number to calibration data
Adriana Reus [Tue, 24 Feb 2015 15:49:18 +0000 (17:49 +0200)]
Add version number to calibration data

Match the calibration data to the hal algorithm version
in case we change calibration code and push ota updates,
we want to make sure we don't use outdated data for biases.

Change-Id: I7e0802d315ad5ef29bc10f9cd40294fa0e40c2bb
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into gmin...
Adriana Reus [Fri, 27 Feb 2015 16:53:41 +0000 (18:53 +0200)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into gmin/l-dev/master

44c2da6 Fri Feb 13 16:18:32 2015 +0100 | Experimental accelerometer calibration routine (origin/abt/topic/gmin/l-dev/sensors/master, m/abt/topic/gmin/l-dev/master, smth) [Patrick Po
89f2b9b Fri Feb 13 16:08:58 2015 +0100 | Fix type of recently introduced semi arbitrated sampling rate [Patrick Porlan]
d8886bb Tue Feb 10 18:50:43 2015 +0200 | [Activity HAL] Added activity HAL source files [Cristina Ciocan]
438c034 Thu Feb 12 15:35:39 2015 +0200 | [Activity HAL] Separation of common macros [Cristina Ciocan]
549f546 Tue Feb 10 18:32:31 2015 +0200 | [Activity HAL] Separation of common code [Cristina Ciocan]

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-6535
Change-Id: Ia81a834dba679c6da6e01de071415dc743b30d1b
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoExperimental accelerometer calibration routine
Patrick Porlan [Fri, 13 Feb 2015 15:18:32 +0000 (16:18 +0100)]
Experimental accelerometer calibration routine

Only activated if quirk=biased is specified.

Change-Id: Ie8faa11c62ba0d58e5529de4209e49a19075d4e6
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
Reviewed-on: https://android.intel.com:443/332405

9 years agoFix type of recently introduced semi arbitrated sampling rate
Patrick Porlan [Fri, 13 Feb 2015 15:08:58 +0000 (16:08 +0100)]
Fix type of recently introduced semi arbitrated sampling rate

Sammpling rates are not necessarily integers. Sure, they are in
the case of the MPU-6050, which is fortunately the only chip we
support at the moment with several interrupt driven sensors on
the same iio device, so this is not an issue for now, but still.

Change-Id: Id3fb9a9fb2c6fc2ae032f6484088f14a99e75670
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
9 years ago[Activity HAL] Added activity HAL source files
Cristina Ciocan [Tue, 10 Feb 2015 16:50:43 +0000 (18:50 +0200)]
[Activity HAL] Added activity HAL source files

The activity_event_entry file is the implementation of the activity recognition
HAL, as described in hardware/libhardware/include/hardware/activity_recognition.h .

In order to test the HAL, run the activity test program. Running activity
without parameters will list a summary of the program usage.

Change-Id: I1717c3882340ec40016f303880e55b0b9bba45f8
Signed-off-by: Cristina Ciocan <cristina.ciocan@intel.com>
Reviewed-on: https://android.intel.com:443/331750

9 years ago[Activity HAL] Separation of common macros
Cristina Ciocan [Thu, 12 Feb 2015 13:35:39 +0000 (15:35 +0200)]
[Activity HAL] Separation of common macros

Moved in common.h all the DECLARE_* macros needed to define sensor catalog
entry, since we will be needing it in activity HAL's catalog as well.

Change-Id: I435d0a968980e6eb5e8414ddcf1b60f19476b894
Signed-off-by: Cristina Ciocan <cristina.ciocan@intel.com>
Reviewed-on: https://android.intel.com:443/331749

9 years ago[Activity HAL] Separation of common code
Cristina Ciocan [Tue, 10 Feb 2015 16:32:31 +0000 (18:32 +0200)]
[Activity HAL] Separation of common code

Separated in common-enumeration source file functions that participate both in
activity HAL discovery and in the sensor HAL discovery of event mode sensors.

Change-Id: I7578e2a5708b870269166f43ab9341a6f983b5a9
Signed-off-by: Cristina Ciocan <cristina.ciocan@intel.com>
Reviewed-on: https://android.intel.com:443/331748

9 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/autodetect/master' into...
Thierry Escande [Wed, 25 Feb 2015 13:01:18 +0000 (14:01 +0100)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/autodetect/master' into autodetect-merge-20150225

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/master..origin/abt/topic/gmin/l-dev/autodetect/master:
  875a964 Tue Feb 24 18:00:30 2015 +0100 | Fix LOCAL_MODULE for auto-detected targets (origin/abt/topic/gmin/l-dev/autodetect/master, m/abt/topic/gmin/l-dev/art/master) [Thierry Escande]

git diff --stat origin/abt/topic/gmin/l-dev/master..origin/abt/topic/gmin/l-dev/autodetect/master:
  Android.mk | 4 ++++
  1 file changed, 4 insertions(+)

Change-Id: Iadd5af67100a54cb5935d019ea31b078afb19e18
Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
9 years agoFix LOCAL_MODULE for auto-detected targets
Thierry Escande [Tue, 24 Feb 2015 17:00:30 +0000 (18:00 +0100)]
Fix LOCAL_MODULE for auto-detected targets

On GMINL, the iio sensor HAL is named sensors-$(TARGET_BOARD_PLATFORM).
For coho targets with auto-detection enabled, this HAL name does not
match the existing sensor records since they are not platform
dependent.

As in IRDA, the iio sensor HAL module name will be iio-sensors-hal.so
if auto-detection is enabled.

Issue: GMINL-6376
Change-Id: I83e09e9422b3e38edf5485aec6622214850e8247
Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
9 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into gmin...
Viorel Suman [Wed, 18 Feb 2015 13:54:49 +0000 (15:54 +0200)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into gmin/l-dev/master

git log --pretty=format:"%h %ad | %s%d [%an]" origin/abt/topic/gmin/l-dev/master..origin/abt/topic/gmin/l-dev/sensors/master:
  1616deb Tue Feb 17 15:20:13 2015 +0200 | [REVERTME] Revert "Pass iio provided timestamps without further processing." (origin/abt/topic/gmin/l-dev/sensors/master) [Constantin Musca]

git diff --stat origin/abt/topic/gmin/l-dev/master..HEAD:
  control.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-6164
Change-Id: Ib5ab0a147dcf5dc89875f2be739fad54ca52b02e
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
9 years ago[REVERTME] Revert "Pass iio provided timestamps without further processing."
Constantin Musca [Tue, 17 Feb 2015 13:20:13 +0000 (15:20 +0200)]
[REVERTME] Revert "Pass iio provided timestamps without further processing."

Interrupts (events) are missed by the bmc150-accel & bmg160 drivers because it takes
too long to read from i2c. This might be caused by having three sensors on the same bus.
Process the timestamps in the HAL in order to make the CTSVerifier tests pass.
This commit reverts 58eef71e4b886632a7d51a6602fe8ef43b779d08 and it should be
reverted once the kernel problem is fixed.

Change-Id: Ieddd1e30253b9a79089740ca6a36e49b51c07d19
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-6031
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-6032
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-6033
Tracked-By: https://jira01.devtools.intel.com/browse/GMINL-4337
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
9 years agoMerge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into gmin...
Adriana Reus [Wed, 11 Feb 2015 11:59:31 +0000 (13:59 +0200)]
Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into gmin/l-dev/master

git log --pretty=format:"%h %ad | %s%d [%an]" m/abt/topic/gmin/l-dev/master..origin/abt/topic/gmin/l-dev/sensors/master:
  80da20e Wed Feb 11 10:46:13 2015 +0100 | Lower MAX_EVENTS constant to save a little bit of RAM (origin/abt/topic/gmin/l-dev/sensors/master) [Patrick Porlan]
  a80f4c9 Wed Feb 11 10:40:36 2015 +0100 | IRDA-3621: Fix a bug where accel and gyro get stuck at 200 Hz [Patrick Porlan]
  5a6ab39 Wed Feb 11 10:20:10 2015 +0100 | Fix a warning [Patrick Porlan]
  848c708 Tue Feb 10 10:33:11 2015 +0200 | Get max frequency from property if it's present. [Adriana Reus]
  115f76c Mon Feb 9 18:52:24 2015 +0200 | Checking raw and input paths on enumeration [Viorel Suman]
  9b8b896 Fri Feb 6 14:16:13 2015 +0200 | Utils review - numerical write functions [Viorel Suman]
  8c85d63 Fri Feb 6 15:47:51 2015 +0200 | Utils review - numerical read functions [Viorel Suman]
  9ef803b Fri Feb 6 11:20:47 2015 +0200 | Utils review - string read/write functions [Viorel Suman]
  7953db2 Fri Feb 6 11:14:09 2015 +0200 | Utils review - introducing base read and write functions [Viorel Suman]
  58eef71 Thu Feb 5 17:40:17 2015 +0200 | Pass iio provided timestamps without further processing. [Adriana Reus]
  eb4520a Fri Feb 6 15:14:07 2015 +0100 | Unbreak branch [Patrick Porlan]
  8c426f3 Fri Feb 6 14:43:06 2015 +0100 | Bulk-extend copyright headers to 2015 [Patrick Porlan]
  93ec5a9 Tue Feb 3 18:13:03 2015 +0200 | iio-sensors: Add suport for STEP_DETECTOR sensor [Daniel Baluta]
  7dd11cd Thu Jan 29 14:16:26 2015 +0200 | iio-sensors: Add infrastructure for IIO events [Daniel Baluta]
  66e79fc Thu Jan 29 12:20:33 2015 +0200 | iio-sensors: Add support for STEP_COUNTER sensor [Daniel Baluta]
  df5e4c7 Wed Jan 28 12:03:09 2015 +0200 | iio-sensors: Add sensor mode parameter [Daniel Baluta]
  c4b636d Thu Dec 11 15:57:32 2014 +0200 | iio-sensors: Refactor sensor_catalog definition [Daniel Baluta]
  69c468d Tue Jan 27 18:23:57 2015 +0200 | enumeration: Refactor discover sensors code [Daniel Baluta]
  13789af Thu Oct 9 17:05:50 2014 +0300 | iio-sensors: Fix build warnings [Irina Tirdea]
  5182797 Thu Oct 9 16:49:56 2014 +0300 | sens: enable build warnings [Irina Tirdea]

git diff --stat m/abt/topic/gmin/l-dev/master..HEAD:
  Android.mk                |   2 +-
  Makefile                  |   2 +-
  calibration.h             |   2 +-
  common.h                  |  48 +++++++-
  compass-calibration.c     |   2 +-
  control.c                 | 257 +++++++++++++++++++++++++++++++++--------
  control.h                 |   2 +-
  description.c             |  25 ++--
  description.h             |   2 +-
  entry.c                   |   2 +-
  enumeration.c             | 284 +++++++++++++++++++++++++++++++++++-----------
  enumeration.h             |  74 ++++--------
  filtering.c               |   5 +-
  filtering.h               |   2 +-
  gyro-calibration.c        |   5 +-
  linux/cutils/properties.h |   2 +-
  linux/log.c               |   2 +-
  linux/utils/Atomic.h      |   2 +-
  linux/utils/Log.h         |   2 +-
  matrix-ops.c              |   2 +-
  matrix-ops.h              |   2 +-
  sens.c                    |   6 +-
  transform.c               |  58 ++++++++--
  transform.h               |   5 +-
  utils.c                   | 201 +++++++++++++-------------------
  utils.h                   |   4 +-
  26 files changed, 665 insertions(+), 335 deletions(-)

Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-5919
Change-Id: I646d5c0acdabaeef46287e8487b439431985694a
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
9 years agoLower MAX_EVENTS constant to save a little bit of RAM
Patrick Porlan [Wed, 11 Feb 2015 09:46:13 +0000 (10:46 +0100)]
Lower MAX_EVENTS constant to save a little bit of RAM

As of today none of the supported sensor types requires more
than two events ; let's adjust this constant down, as it can
easily be bumped up whenever we add support for more complex
sensor types.

Change-Id: I4916717aed5cd8cc0db6ef58bc703c6251965b27
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>