Commit graph

98463 commits

Author SHA1 Message Date
Erwan Gouriou 8245b0c1a2 scripts/dts: extract_dts_includes: remove unused 'names' argument
Parameter 'names' is provided as argument of several property
extract functions. Thought it is actually used only once.
Remove when not needed.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-21 07:23:49 -07:00
Johann Fischer 59a6ec44b7 drivers: apds9960: use power management
Use power management

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-09-21 09:02:00 -05:00
Johann Fischer cc56de7005 samples: apds9960: rework APDS9960 sample
Rework APDS9960 sample.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-09-21 09:02:00 -05:00
Johann Fischer b192b2b575 drivers: apds9960: add trigger mode for proximity
Add trigger mode for proximity

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-09-21 09:02:00 -05:00
Johann Fischer 963f97d035 drivers: apds9960: use interrupt output for sample
This patch changes the behavior of the sensor. The sensor
will remain in sleep mode after initialization and will only
run the measurements once when sample_fetch is called.
This optimizes the power consumption of the sensor as it
stays in sleep mode most of the time.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-09-21 09:02:00 -05:00
Johann Fischer 9c3d77380a driver: apds9960: reorganize ALS and proximity setups
Refactor and reorganize ALS and proximity setup functions.
Cleanup and reorder register, fix register fields.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-09-21 09:02:00 -05:00
Johann Fischer 163629c96a drivers: apds9960: use i2c_burst_read to fetch ALS data
Use i2c_burst_read to fetch ALS data.
Use unsigned values for ALS and proximity data.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-09-21 09:02:00 -05:00
Ajay Kishore 22d653fd20 tests: sched: Use SCHED_MULTIQ for native posix platform
To improve the code coverage on native posix, adding CONFIG_SCHED_MULTIQ
for scheduler api tests.

Extracting a separate prj_native_posix.conf file for the scheduler test,
which validates the "multi queue" scheduler on native posix.

Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
2018-09-21 08:50:13 -04:00
Niranjhana N 1e152ff20e lib: cmsis_rtos_v1: do null check before use
Moving a thread_def null check to top before
using the structure's elements.

Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
2018-09-21 08:49:27 -04:00
Vinayak Kariappa Chettimada 9da6a85c8c drivers: flash: nrf5: Use faster write interval with BT sync
Use a lower slot duration than the used erase slot duration
to speed up the interval of write operations when in sync
with active Bluetooth connections.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2018-09-21 13:15:54 +02:00
Szymon Janc 6c89c4b5f7 Bluetooth: Controller: Add support for setting public address
This allows to provide public address for controller without using
VS HCI command from host. Useful for controller only builds or
combined builds that are not using VS HCI commands.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2018-09-21 12:40:10 +02:00
Luiz Augusto von Dentz 0a23067540 Bluetooth: GATT: Remove BT_GATT_WRITE_FLAG_PREPARE check in GAP
This check is only required when BT_GATT_WRITE_FLAG_PREPARE is set.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-09-21 12:27:50 +03:00
Dominik Kilian 67ca29a0e7 dts: nrf: Expand nRF DTS to support ARM TrustZone CryptoCell 310
Commit introduces support for ARM TrustZone CryptoCell 310
for Nordic Semiconductor nRF SoCs in device tree.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2018-09-21 00:29:58 -07:00
Erwan Gouriou de24cd69de boards/arm: Fix button dts syntax for stm32 based boards
This change aims at fixing 'unit_address_vs_reg' warning in
STM32 based boards.
This warning pops up when a node name is made up with an address
(node_name@xx) but does not contain a reg property.
This case was encountered for button nodes for instance,
where a reg property has no meaning.
Fix this by changing node_name@xx to node_name_xx which removes the
guilty '@XX' syntax but preserves node_name uniqueness.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-09-20 22:51:30 -07:00
Spoorthi K 58542d8d6c samples: Include regex matching in samples
Add harness console and include regex for output
pattern matching to determine correctness of
sample execution.

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-09-21 00:40:44 -04:00
Niranjhana N 4462dfabb6 lib: posix: fix couple of race conditions
Added locks around thread state accesses in
pthread_create() to avoid race conditions.

Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
2018-09-21 00:24:22 -04:00
Adithya Baglody 31c8817d60 include: arm: CMSIS header redefining MPU_PRESENT.
The header should check if the macro _MPU_PRESENT is defined
and create it only if not defined.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-20 20:35:25 -04:00
Adithya Baglody da73606218 tests: benchmarks: sys_kernel: Reduce the number of loops.
The total number of loops being executed were taking far too long
to finish executing the test case. This was causing the timer handler
to execute in the middle of the test case. Thereby causing a test case
failure.
Now the number of loops have been reduced and this will make sure the
test case completes.

This change has no effect on the time being calculated by the
benchmark.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-20 20:35:25 -04:00
Adithya Baglody 0e11792f4e tests: userspace: Incorrect location to the privileged stack.
The test case was supposed to access the privileged stack area
but instead it was accessing the stack guard region.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-20 20:35:25 -04:00
Adithya Baglody b19f3ec2ba tests: mem_protect: mem_protect: Update the stack size.
This patch updates the alignment for the memory domain partitions.
Also update the stack size for qemu_cortex_m3.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-20 20:35:25 -04:00
Adithya Baglody 44057a197f tests: kernel: pipe : Update the stack size.
Now the stack size is a function of CONFIG_TEST_EXTRA_STACKSIZE.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-20 20:35:25 -04:00
Adithya Baglody d547c9b26c boards: mps2_an385: Enable userspace for MPS2_AN385.
This patch will enable the userspace.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-20 20:35:25 -04:00
Adithya Baglody 0e60644ff8 soc: mps2_an385: Enable Memory Protection unit.
This patch will enable the MPU in MPS2_AN385 soc.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-20 20:35:25 -04:00
Adithya Baglody 36365e38ba drivers: timers: systick: Enforce a barrier in _timer_cycle_get_32.
The code assumes that when the systick counter hits zero,
the timer interrupt will be taken before the loop can
read the LOAD/VAL registers, but this is not architecturally
guaranteed, and so the code can see a post-reload SysTick->VAL
and a pre-reload clock_accumulated_count, which causes it to
return an incorrectly small cycle count. By adding a ISB we
overcome this issue.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-20 20:35:25 -04:00
Adithya Baglody 023bc923b0 soc: mps2_an385: Added support for MPU
Added required files/support for the MPU in MPS2-AN358 (Cortex-M3).

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-20 20:35:25 -04:00
Adithya Baglody a8f2675604 tests: userspace: Update the required stack size for mps2_an385
Increasing the stack size to 1024.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-20 20:35:25 -04:00
Johann Fischer b64b9e7846 boards: arm: dts: remove unnecessary interrupt flag
Remove unnecessary GPIO_INT_ACTIVE_LOW flag from led node.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-09-20 16:15:24 -07:00
Maureen Helm a013ce3bf0 drivers: sensor: Fix incorrect Kconfig dependency in lsm6dsl
The lsm6dsl sensor driver incorrectly conditioned the interrupt pin
Kconfigs upon !HAS_DTS_SPI_PINS, when it should actually be
!HAS_DTS_GPIO_DEVICE.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-20 12:43:59 -04:00
Maureen Helm 71feeceb1b tests: build_all: Add missing sensor drivers and rebalance testcases
Adds many missing sensor drivers and rebalances the testcases to
instantiate similar numbers of sensor drivers. Splits the sensor trigger
testcase into two due to having too many thread objects.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-20 12:43:59 -04:00
Maureen Helm 806bc1a4da tests: build_all: Add missing dts fixups for sensor drivers
Adds missing dts fixups for multiple sensor drivers.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-20 12:43:59 -04:00
Maureen Helm 06f73456ba drivers: sensor: Fix casting warnings
Fixes casting warnings in multiple sensor drivers when creating their
own thread. These warnings were found when updating the build_all tests
to include missing sensor drivers.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-20 12:43:59 -04:00
Maureen Helm 553a31efb9 drivers: sensor: Add missing cmake files for bmm150
The bmm150 sensor driver was missed in the conversion from kbuild to
cmake. This problem was found when updating the build_all tests to
include missing sensor drivers.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-20 12:43:59 -04:00
Maureen Helm 7ac70c4764 drivers: sensor: Fix compiler format warning in bmi160
Fixes a compiler format warning in the bmi160 sensor driver. This
warning was found when updating the build_all tests to include missing
sensor drivers.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-20 12:43:59 -04:00
Maureen Helm 2875c052dc drivers: sensor: Fix unused variable warnings
Fixes unused variable warnings for the adxl362 and lis2dh sensor
drivers. These warnings were found when updating the build_all tests to
include missing sensor drivers.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-20 12:43:59 -04:00
Adithya Baglody c764e021d8 CMakeLists.txt: Updated the rule for shared memory alignment.
Due to the new changes for the subsys/app_memory we need to
have the script for smem run before any elf is created.
This is needed because the compiled code will have references to
certain linker variables that will be created by
gen_app_partitions.py.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-20 11:25:53 -04:00
Adithya Baglody ae92f2badf subsys: app_memory: Fixed the size calculation for power of 2 MPUs
The size calculation for power of 2 MPUs were incorrect.
The calculation was not taking into account the amount of padding
the linker does when doing the required alignment. Hence the size
being calculated was completely incorrect.

With this patch the code now is optimized and the size of
partitions is now provided by the linker.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-20 11:25:53 -04:00
Ramakrishna Pallala 7e273b28c8 samples: subsys: power_mgr: Add changes as per PM policy Kconfig
Enable the CPU Residency based PM policy Kconfig option for
the sample application.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-09-20 10:20:23 -04:00
Ramakrishna Pallala c511857f57 subsys: power: Add support for pluggable PM policies
Add support for adding and selecting pluggable PM policies
which can be enabled based on the application needs.

Also added a dummy policy for demonstration purpose which
simply loops over the supported PM states.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-09-20 10:20:23 -04:00
Ramakrishna Pallala f0a2f2b423 soc: arm: nrf52: Select the supported Power States
Select the Low Power States supported by nrf52 SoC series.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-09-20 10:20:23 -04:00
Ramakrishna Pallala 56117f9f91 arch: Kconfig: Add Kconfig options for Low Power States
Add Kconfig options for Low Power and Deep Sleep States which
need to be selected by the SoC's based on it's supported
Low Power States.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-09-20 10:20:23 -04:00
Ramakrishna Pallala 6320043669 qemu: nios2: Enable UART 16550 driver for QEMU
Enable UART 16550 driver for Nios-II QEMU platform.

Note: This PR is tested with patched version Qemu 3.0.0 which
adds support for altera_10m50_zephyr machine type.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-09-20 08:51:51 -04:00
Piotr Zięcik 1c16cfcc30 arch: arm: Make ARM_MPU the sole option controlling MPU usage
This commit removes all MPU-related (ARM_CORE_MPU and NXP_MPU)
options exept ARM_MPU, which becomes master switch controlling
MPU support on ARM.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2018-09-20 14:16:50 +02:00
Piotr Zięcik d393186d51 arch: arm: Introduce CPU_HAS_ARM_MPU and CPU_HAS_NXP_MPU options
This commit introduces CPU_HAS_ARM_MPU and CPU_HAS_NXP_MPU options,
which indicate which flavour of MPU is supported by given SoC family.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2018-09-20 14:16:50 +02:00
Piotr Zięcik d9cc147c60 arch: nxp_kinetis: Remove HAS_SYSMPU option.
The HAS_SYSMPU option is just selecting NXP_MPU option,
which could be also controlled through menuconfig.

This commit removes the HAS_SYSMPU option and replaces
its usage by NXP_MPU option.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2018-09-20 14:16:50 +02:00
Piotr Zięcik edfcab428b arch: nxp_imx: Remove ARM_MPU_IMX_RT option.
The ARM_MPU_IMX_RT option is just selecting ARM_MPU option,
which could be also controlled through menuconfig.

This commit removes the ARM_MPU_IMX_RT option and replaces
its usage by ARM_MPU option.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2018-09-20 14:16:50 +02:00
Piotr Zięcik 9331064ff9 arch: nrf52: Remove ARM_MPU_NRF52X option.
The ARM_MPU_NRF52X option is just selecting ARM_MPU option,
which could be also controlled through menuconfig.

This commit removes the ARM_MPU_NRF52X option and replaces
its usage by ARM_MPU option.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2018-09-20 14:16:50 +02:00
Piotr Zięcik c4cd4cfe7f arch: beetle: Remove ARM_MPU_ENABLE option.
The ARM_MPU_ENABLE option is just selecting ARM_MPU option,
which could be also controlled through menuconfig.

This commit removes the ARM_MPU_ENABLE option and replaces
its usage by ARM_MPU option.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2018-09-20 14:16:50 +02:00
Piotr Zięcik eb1ee5f1ee arch: stm32: Remove STM32_ARM_MPU_ENABLE option.
The STM32_ARM_MPU_ENABLE option is just selecting ARM_MPU option,
which could be also controlled through menuconfig.

This commit removes the STM32_ARM_MPU_ENABLE option and replaces
its usage by ARM_MPU option.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2018-09-20 14:16:50 +02:00
Johan Hedberg 461a9de773 doc: Bluetooth: Mention Mesh in the supported features
Add Mesh to the supported features list of the Bluetooth stack.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-09-20 07:31:04 -04:00
Jukka Rissanen 27d99d16f8 samples: net: sockets: echo_server: Add VLAN support
If user enables VLAN support, then the sample application will
create two extra VLAN network interfaces for testing purposes.

The application can be compiled like this for VLAN support:

    cmake -DBOARD=qemu_x86 -DOVERLAY_CONFIG=overlay-vlan.conf ..

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-09-20 11:21:22 +03:00