Commit graph

69 commits

Author SHA1 Message Date
Flavio Santes 5799495a5b drivers/sensor: Add the ARG_UNUSED macro
Add the ARG_UNUSED macro to avoid compiler warnings.

Change-Id: I2e0d8ccdcd2d525e109cee6c3bd1035640618eb0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-12-21 12:54:51 +00:00
Flavio Santes 3d7d373a2f drivers/sensor/bmi160: Remove compiler warnings
Remove the unused argument and comparing int to unsigned int
compiler warnings.

Change-Id: Iad79ec2ef8206b2494875a93551a0f47e234ff8d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-12-21 12:54:51 +00:00
Anas Nashif a9e879e273 logging: move sys_log to subsys/logging
Move logging out of misc/ to its own subsystem. Anything related to
logging and any new logging features or backends could be added here
instead of the generic location in misc/ which is overcrowded with
options that are not related to eachother.

Jira: ZEP-1467
Change-Id: If6a3ea625c3a3562a7a61a0ba5fd7e6ca75518ba
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-19 19:58:39 +00:00
Baohong Liu f2c1b4bb02 drivers: bmi160: use direct GPIO trigger instead of IPM
Directly use AON GPIO trigger instead of IPM.

In the past, SW did not allow arc to receive AON GPIO interrupt.
So, interrupt from BMI160 was routed to x86 cpu. Then, x86 cpu
passed the event to arc through IPM. But, SW was updated and arc
is able to directly receive interrupt from AON GPIO now. So, IPM
is not needed any more. Let's remove IPM related code and use
GPIO as the default trigger source.

This change is on top of the bmi160 sample app change to not use
IPM.

Change-Id: I49d8040764d03b24e09d89e66643c020ef63a3c9
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-12-16 15:56:33 +00:00
Bogdan Davidoaia 4946e3e6e6 sensor: remove SENSOR_VALUE_TYPE_INT
Remove SENSOR_VALUE_TYPE_INT as it is the same as
SENSOR_VALUE_TYPE_INT_PLUS_MICRO with val2 set to 0.

Change-Id: If5a9c579b7267701c27f40fd887acae47d64edc5
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-12-13 21:51:10 +00:00
Baohong Liu b3195581e7 drivers: sensor: add missing license header
Change-Id: I0d666ba8a83ea523dd15cdc94f0565fee9f7288e
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-12-09 17:39:05 -08:00
Flavio Santes b04cdcd6e6 drivers: Remove legacy nanokernel.h include
This commit replaces the nanokernel.h include by kernel.h.

Change-Id: Ib42fbf2d9f77a73c0831f569b3dbbfb342ea2e1d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-12-04 14:59:37 -06:00
Anas Nashif 91b47b9d3c sensors: change init level from NANOKERNEL to POST_KERNEL
Change-Id: Iba788e2b0b60d89e6b9bf6f5de73ff2f5cdbebbc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-02 15:52:34 +00:00
Baohong Liu 313700e26f drivers: sensor: use unified kernel API
Change-Id: I5d51e65105f9dee3d5eb49c60b9e5636ebd14df6
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-30 23:54:58 +00:00
Qiu Peiyang 3763487575 sensor: fix typo in Kconfig
Change-Id: I0fc7e0f66ba994f42a04684e4862fc3218ddd075
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
2016-11-29 12:59:35 +00:00
Baohong Liu d6ba1c0c3e drivers: bmi160: fix variable type mismatching issue
The variable type mismatching was caught by LLVM.

Jira: ZEP-1179

Change-Id: I1193a946ea5814510e6c07668c5d05a5d91445a8
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-16 02:08:21 +00:00
Vincenzo Frascino 5912d7abe7 sensor: Fix less-than-zero comparison in bmi160 driver
This patch fixes a less-than-zero comparison of an unsigned value
condition present in bmi160 driver.

This issue was reported by Coverity (CID 152002, 152003).

Change-Id: I703066519652ac1ecdd9ddf7e97ec7dcbe2a9e27
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2016-11-16 00:42:21 +00:00
Anas Nashif 3fe2575f0d drivers: sensors: use unified kernel threads
convert all sensor drivers to use threads and the unified kernel API and
remove all legacy APIs.

Change-Id: Ica43ea74ecbbf85273f718f182c413a9dcd8abc6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-11 21:00:19 +00:00
Anas Nashif 8910c228a2 sensors: use unified kernel APIs for kernel objects
move both semaphores and nano_work objects to unified kernel APIs.

Change-Id: Icca8a091063544c451e47201cd8e956b95010513
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-11 21:00:19 +00:00
Benjamin Walsh 8cf56bcac7 unified: dissociate system workqueue from common workqueue module
Making a reference to the common work queue code should not necessarily
drag in the system workqueue, since it is possible to use a workqueue
that is not the system workqueue. This is done by moving the system
workqueue into its own code module.

Moving the system workqueue to its own code module allows removing the
NANO_WORKQUEUE and SYSTEM_WORKQUEUE kconfig options, and compiling the
common workqueue code and system workqueue all the time. They are only
linked in the final image if a reference to them exist, same as the
other kernel modules.

Change-Id: I6f48d2542bda24f4702e7c2e317818dd082b3c11
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-11-04 22:39:54 +00:00
Marcus Shawcroft 0496b95391 sensor/bmi160: Make driver_api structure const.
Change-Id: I195f9ab2d3668d61c8fbdec5a3f3fa390b81948e
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-25 18:45:33 +00:00
Marcus Shawcroft 3b678f53fe sensor/bmi160: Make driver config_info structure const.
Change-Id: Ia4f5333f9440712224f07a517229f7d3b2dd92f7
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-20 16:48:58 +00:00
Anas Nashif 71d6ad2619 sensors: bmi160: remove unused init priority config
Change-Id: I367d7b084fb93609000066b610e01a802fdd152e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-20 09:39:51 +00:00
Anas Nashif 49a6d13849 sensors: bmi160: move bmi160 to own directory under drivers/sensor/
Change-Id: I14bfabf77b7aa64acbf25a922a94f92c559b13f7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-17 18:37:53 +00:00