Commit graph

41120 commits

Author SHA1 Message Date
Andre Guedes
04cdf8b6e8 ieee802154: Fix returning codes
DEV_* error codes are deprecated and should not be used anymore. This
patch replaces DEV_* occurrences by the corresponding errno.h code,
according to the error code conventions.

Change-Id: I7b098a6107c390b46ed15aaeb9141627e9502727
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-04-26 22:49:48 +00:00
Murtaza Alexandru
f169a66205 sensor: migrate all drivers to new SYS_LOG
Refactor all sensor drivers so that they use SYS_LOG instead of
decentralized systems/functions.

Change-Id: Ibd9443e06004341bc5e9afaf5b49bbec547e073d
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:11:05 +00:00
Murtaza Alexandru
52ccdada9c sensor: split lsm9ds0_gyro driver
Split driver for LSM9DS0 gyroscope in core functionalities and trigger.

Change-Id: I19736b65f45a6c4fc79a1f16423097b89accff24
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:10:56 +00:00
Murtaza Alexandru
28cf0c210a sensor: split bmc150_magn driver
Split BMC150 magnetometer driver in core functionalities and trigger.

Change-Id: I955ac39c2e995a81fa830776da9c0bcc38d9490a
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:10:41 +00:00
Murtaza Alexandru
075d081811 sensor: add driver for LSM9DS0 accel and magn
Add device driver for the multi function device (MFD) part of LSM9DS0:
accelerometer, magnetometer and temperature.

Datasheet:
  https://www.adafruit.com/datasheets/LSM9DS0.pdf

Change-Id: I00b9db2c69c6e5229269afacb02bf5f921edabe9
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:10:41 +00:00
Murtaza Alexandru
676b89cd1a sensor: make runtime configurable attrs continuous
Runtime configurable attributes are now matched with the smallest
available value that is greater or equal to the parameter instead of
returning -EINVAL.

Change-Id: I9ca8e2eba443fcd247c329c6ce71dc2167fb7f03
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:10:40 +00:00
Murtaza Alexandru
f1b95df34e sensor: rename SENSOR_TYPE_* to SENSOR_VALUE_TYPE_*
Rename sensor_value_type enums from SENSOR_TYPE_* to more concludent
name SENSOR_VALUE_TYPE_*. This change is required if we want to
introduce SENSOR_TYPE_* (SENSOR_TYPE_ACCEL - if the sensor/driver
supports accelerometer, SENSOR_TYPE_MAGN - etc.) in the future.
Also it is more clear with this notation what these enums are referring
to.

Change-Id: Ic58e29288669e10c0695e0f86f59b0e57f7ac38c
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:09:41 +00:00
Murtaza Alexandru
1be6d1f6c8 sensor: add the posibility to fetch one data type
Now you can specify the sensor type you want to fetch using
sensor_sample_fetch_chan. This will inform the driver that you want only
one type of data updated, leaving the others unchanged and enabling
different sampling rates for multi function devices (MFDs).

Change-Id: I403e422dffadc697c19a5372ed55ed8f486a2607
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:09:41 +00:00
Murtaza Alexandru
82cca9c56e sensor: fix bmc150_magn compile error
Fix bmc150_magn compile error introduced in I2C register access API
migration patch.

Change-Id: I48f4d6405b4b7ae25beb0fbd46169eac3689ec8e
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:08:38 +00:00
Murtaza Alexandru
db06b853d3 sensor: fix init driver_api
Assign driver_api only if *_init is successful.

Change-Id: Ib95cd358af358aec4fc58ff10dcede05fad00d0a
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:08:38 +00:00
Murtaza Alexandru
6542e03a33 sensor: refactor bmc150 and lsm9ds0
* Fix coding style so line length does not exceed 80 chars.
* Remove unnecessary casts
* Remove unnecessary variable prefixes (from *_fiber_stack to
fiber_stack)
* Rewrite lsm9ds0_gyro_channel_get into more readable form

Change-Id: I086562644f707d9d6538cb34d000012464b02fe3
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:08:38 +00:00
Johan Hedberg
9ce5e08b56 doc: Remove references to Bluetooth from Networking
Now that Bluetooth is its own subsystem Networking shouldn't reference
it as a sub-section anymore.

Change-Id: Id134f9b9e63cfc6533e35e91c7bc6aedd6e8fdf8
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-26 15:31:59 +00:00
Anas Nashif
9d006e3119 arduino 101: use QMSI spi driver
Change-Id: Iffff51a2b92f6afd04c96a57678e3cf2262a44ed
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-26 15:26:15 +00:00
Anas Nashif
72f22da617 quark_se_devboard: use QMSI drivers
Change-Id: Id8f380e099f512aa36462f52c6db660a732656f0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-26 15:26:04 +00:00
Johan Hedberg
20e03a4ffa doc: Move Bluetooth into a separate subsystem
This helps avoid having the tree grow too deep.

Change-Id: Ic4055f30b6d6f2ab575b361062d7f44b84237ba5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-26 17:18:23 +03:00
Johan Hedberg
6a075ace24 Bluetooth: drivers/nble: Initial implementation of bt_storage_clear()
Now that there's a helper for clearing nRF51-side bonds we can use
that in bt_storage_clear().

Change-Id: I9eea4b100834b150e7c55a5141f1624853335c0a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-26 15:21:36 +03:00
Johan Hedberg
0b68af523e Bluetooth: drivers/nble: Clear bonds upon init
To ensure reliable behavior when pairing we need to clear the nRF51
persistent memory upon init.

Change-Id: I204bb27e7c6e33dc5dd006ad9937645e907e770f
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-26 15:08:34 +03:00
Daeseok Youn
fa442b0287 microkernel: Match alignment with open parenthesis
fix alignment coding style issue

Change-Id: I29fefd994ffe772a6a52995b83ad5b0bf9a0dd2c
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
2016-04-26 11:10:37 +00:00
Bogdan Davidoaia
c4878335c8 gpio: pcal9535a: use I2C register access API
Use I2C register access API for writing/reading registers.

Change-Id: Ic35b3e7159f9827f2d202d8cd1ae8f26ee6300f1
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-04-26 11:06:50 +00:00
Bogdan Davidoaia
fb1ea43be2 sensors: use I2C register access API
Use I2C register access API in drivers of sensors that have
8-bit registers.

Change-Id: I33e016feff09be396eae70fb312de055c49caca7
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-04-26 11:06:50 +00:00
Bogdan Davidoaia
9496ec6a4d i2c: change i2c_reg_update_byte parameter order
Swap order of mask and value parameters from i2c_reg_update_byte
function. This is needed make refactoring of sensor drivers that
would use this function easier, since all the register update
functions written for each driver have the mask before the value
in the parameter list.

Change-Id: I7bef7be73e904fca353a492ab9edd2a210df199e
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-04-26 11:06:50 +00:00
Laurentiu Palcu
e7a8c7609a sensor: bmi160: fix regression
The regression was introduced by the following commit:

sensor: bmi160: Use the new GPIO callback API

The problem was that ipm context was not set when registering the
callback.

Change-Id: Icbe8fb9670b9e7e7d489e70adf93ff62fed98935
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-26 10:57:56 +00:00
Laurentiu Palcu
47de28535a sensor: bmi160: switch x86 app to QMSI GPIO driver
Change-Id: I1265507aec8214fbdad4ea3d88cd4358081dfced
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-26 10:57:56 +00:00
Arkadiusz Lichwa
8e34b5869b Bluetooth: L2CAP: Add API to register PSM server
Enables API to register PSM server on BREDR transport.
Adds l2cap_br.c file responsible for BREDR specific functionality to
build path based on Kconfig selection.

Change-Id: I92823b0207ab0da96bfb813353de9f95fa5dd0f4
Origin: Original
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-04-26 10:58:14 +02:00
Arkadiusz Lichwa
9853a040b9 Bluetooth: L2CAP: L2CAP_DYNAMIC_CHANNEL enabled by default when BREDR
Makes Kconfig L2CAP_DYNAMIC_CHANNEL option autoselected when turns on
BREDR support.

Change-Id: Ib56b0e4d578c322837b79c67a7737322b04414f0
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-04-26 08:26:05 +00:00
Flavio Santes
05bd623aa1 net: apps: Break long strings in loopback test
Use string literal concatenation to break the sample text.

Change-Id: I0729b113e80d3efec909603fbb143d1bc515f165
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-04-26 08:09:01 +00:00
Johan Hedberg
ee3f478687 Bluetooth: Fix monitor init priority
The monitor protocol handling needs to be initialized very early on,
e.g. before HCI driver registration. Use the same priority as used for
other console handlers, except we don't expose this as a Kconfig
option for now.

Change-Id: I61157d62327080eeac7a59bb64e5a18877cc26f6
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-26 10:21:19 +03:00
Anas Nashif
bf1356c969 Zephyr 1.3.0-rc1
Change-Id: I794f435cd882abc87f2f37a5c07b6ba0a08ba5f3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-26 00:07:27 +00:00
Juro Bystricky
7989015e6c arduino_101_load.sh: Fixed misspelled envar
Change-Id: Ib7a5e70081585827a1ba9058bbc012933094ff4e
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2016-04-26 00:07:13 +00:00
Juro Bystricky
ae74c18bea arduino_101_backup.sh: Fixed misspelled envar
Change-Id: I585a60b427de1c4e829da59f596d4f58c7af1d17
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2016-04-26 00:06:45 +00:00
Johan Hedberg
4832da8db7 Bluetooth: drivers/nble: Fix using too large buffer
The nble firmware supports a max ATT MTU of 23 (i.e. the default).

Change-Id: I70f55b00b50b2ad6540850d594a6d2fb89b11d1a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-25 19:21:28 +00:00
Johan Hedberg
39e63117c4 Bluetooth: drivers/nble: Fix passing NULL to attr->read()
We should be looking up the appropriate connection object and passing
that to the callback.

Change-Id: I04620b301541c8bda45f20e2b1dcca8f71562821
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-25 19:21:10 +00:00
Johan Hedberg
847703d91b Bluetooth: drivers/nble: Fix on_nble_gatts_read_evt() behavior
We need to reset len to 0 in case of failure to prevent the nRF
firmware from reading past the end of buffer. At the same time clean
up the code a bit.

Change-Id: I2ac9a86e0f7704ae55c9b2758e02dfadf650f549
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-25 19:20:58 +00:00
Anas Nashif
81125feb06 samples: synchronization: reduce stack size used
This will allow this sample to run on systems with less than 8K SRAM.

Change-Id: Id3a1c826cfade09f91bc3b0dba3c98e386f5ab06
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 19:17:06 +00:00
Anas Nashif
7eb9c884bc samples: philosophers: reduce stack size used
Change-Id: I89a21d16fc14f52226fad0bd92cab030b69c54f0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 19:17:05 +00:00
Anas Nashif
4b854b00c3 sx9500: remove explicit definitions for GPIO/I2C
Change-Id: I6c0e13707a91db993737297c59ed77603c561377
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 19:17:05 +00:00
Anas Nashif
04e6243aa5 gpio: rename device name for AON GPIO
Change-Id: Iccd3790d3e7adbe790fe78755d297aad0ae97834
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 19:17:05 +00:00
Anas Nashif
5c30367a06 qmsi: gpio: add initialisation priority for driver
Change-Id: I4204d514f95c8e6e264a3cb71a2fa8eec8bab45a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 19:17:04 +00:00
Anas Nashif
3ca134b3ac doc: fix typo IMACU -> IAMCU
Change-Id: Ib89080b7f6f0fb1d7b92ad69a18cef26a26b9a4c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 19:17:04 +00:00
Anas Nashif
57605a558c build: generate error if board is not found
Change-Id: Icf0c713d5fe3bb56dea4d74c87176c04f80df329
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 19:17:04 +00:00
Anas Nashif
1a1f7fd916 arc: make SRAM/DCCM values configurable
Remove hardcoding and make the values configurable. Also make the
Kconfig variables consistent with other architectures.

Change-Id: I69334002303d4d8abaf7363d9134fd5f46ce4eeb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 19:17:03 +00:00
Anas Nashif
d18b584427 grove: use default i2c device set in Kconfig
Change-Id: I2925bb0f5f8f0537f5c21e8650b03c281081035e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 17:01:48 +00:00
Anas Nashif
9d8c332b21 i2c: use I2C_X nameing instead of I2CX
Other IOs use this format, so lets be consistent and use

I2C_0 instead of I2C0 and I2C_1 an instead of I2C1.

Change-Id: I591ab08e14bd533ef0fac38e596559da783863b8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 17:01:48 +00:00
Anas Nashif
052664d282 aio: build only when driver is configured in
Change-Id: Ida1a108fe8af585ba0c518bcb216b6c0f3253ab4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 17:01:48 +00:00
Anas Nashif
ce836e2c69 toolchain: move iamcu output format/arch to SoC
Instead of defining the output format in the toolchain environment
setup, define this per SoC that supports the ABI.

This will allow us to directly referencing an installed toolchain
without the need for declaring ZEPHYR_GCC_VARIANT

Change-Id: Icd1a7a21acbf075a51854fb2ebb3ef06788ce9b5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 17:01:48 +00:00
Dan Kalowsky
69c7f1e621 boards: nucleo: Adding flash support
Adding an openocd.cfg to control flashing of the Nucleo-F103RB board

Change-Id: Ia730244bdc2d31d074fe72c41d3e58e7830c8df0
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 17:01:47 +00:00
Bogdan Davidoaia
6f6e65bfb1 i2c: fix i2c_reg_update_byte
The device address must be given before the register address in the
parameter list of the i2c_reg_read_byte function.

Change-Id: I92afbbf83f76eeb58ec41a2a8c83dd909b78a23a
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-04-25 16:58:32 +00:00
Tomasz Bursztyka
cc53ac7918 samples: sensor: Use new GPIO callback API for bmi160 sample
gpio_set_callback is meant to be deprecated and thus modifying the
sample to use the new GPIO callback API.

Change-Id: I822cd1c81575834d40926c56cd61b87884230594
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-25 14:58:16 +00:00
Tomasz Bursztyka
559b768340 sensor: bmi160: Use the new GPIO callback API
gpio_set_callback() is meant to be deprecated and thus modifying the
driver to use the new GPIO callback API.

Taking the opportunity to use ipm API properly in order to remove the
struct bmi160_data singleton.

Change-Id: Iafcf3fed10bd286962829a4157effd054dd78c1e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-25 14:58:16 +00:00
Tomasz Bursztyka
655c268d21 gpio: Deprecate API 1.0 callback function
If one use the old gpio_set_callback() function,
the build will generate deprecation warnings.

Change-Id: I3f008ab3fc46e1b38cb433340d2f97671d04906e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-25 14:58:15 +00:00