Commit graph

41120 commits

Author SHA1 Message Date
Paweł Zadrożniak
aa4c30c3e9 samples: usb: hid: remote wakeup in HID mouse example
Added support for remote wakeup in hid_mouse example.
If rempote wakeup support is enabled, wakeup request
is performed on every button click when the bus in suspended state.

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
2019-02-27 10:37:16 +01:00
Paweł Zadrożniak
804b9e1ada drivers: usb: nordic: implement remote wakeup
Adds remote wakeup support for nRF chips.

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
2019-02-27 10:37:16 +01:00
Paweł Zadrożniak
3ecbff501a usb: Add remote wakeup support
This commit adds support for remote wakeup and extends USB api
with a wakeup request call. Remote wakeup can be dsabled in kconfig
when a specific driver does not support this feature.

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
2019-02-27 10:37:16 +01:00
Ravi kumar Veeramally
f940cec0d0 net: coap: Fix coverity issue
To get u8_t value, just right shift the operands are enough.

Fixes #12298
Coverity-CID: 190635

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-02-27 10:36:39 +01:00
Luiz Augusto von Dentz
46298da104 Bluetooth: Mesh: Use BT_GATT_CCC_MANAGED
This makes use of BT_GATT_CCC_MANAGED so instead of having a custom
attribute which is not managed by stack.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-02-27 10:30:50 +01:00
Luiz Augusto von Dentz
efb064ab9b Bluetooth; GATT: Consolidate code for finding a CCC config
This consolidates code for finding a CCC config in a helper function
thus reducing the amount of duplicated code.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-02-27 10:30:50 +01:00
Luiz Augusto von Dentz
da163794d0 Bluetooth: GATT: Add BT_GATT_CCC_MANAGED
This adds another helper macro called BT_GATT_CCC_MANAGED which can be
used to set 2 new callbacks:

 - cfg_write: Which application can set if it wants to manage writes to
 CCC configuration.
 - cfg_match: Which application can set if it wants to manage matching
 CCC configuration when notifying/indicating.

BT_GATT_CCC_MANAGED retains the ability of saving peer configuration
on storage making it useful for clients which are only interrested in
managing the CCC configuration but not the storage itself.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-02-27 10:30:50 +01:00
Marc Herbert
f085647521 cmake: more deterministic git describe --abbrev=12
Hardcode --abbrev=12 not to depend on personal git config preference.
12 is deemed large enough for the Linux kernel which should leave some
room:
https://public-inbox.org/git/xmqq37knwcf4.fsf@gitster.mtv.corp.google.com/

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-02-27 10:27:47 +01:00
Jukka Rissanen
cd100899ed doc: net: Enhance Ethernet management documentation
The Ethernet management documentation was missing Overview
chapter.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-27 10:27:02 +01:00
Savinay Dharmappa
f6208622fb boards: x86: quark_d2000_crb: exclude watchdog test case
patch exclude the watchdog test case for quark_d2000_crb
,as it seen that upon watchdog reset the conents of ram are lost.
Hence the existing testcase fails.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-02-27 00:28:40 -08:00
Ulf Magnusson
9aab5cef96 kconfig: Remove redundant 'default n' properties
Some more were added since the cleanup pass in June 2018. See e.g.
commit 2d50da70a1 ("drivers: ipm: Kconfig: Remove redundant 'default n'
properties") for a motivation. It also avoids people wondering whether
or not they need to put in 'default n'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-27 09:25:22 +01:00
Rajavardhan Gundi
60186eba8c lib: cmsis_rtos_v2: kernel: Fix a coverity issue
Fixes an issue corresponding to CID: 190641

Fixes #12292.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-02-27 09:23:56 +01:00
Ulf Magnusson
40436f730b kconfig: Use a short consistent prompt style
Same change as in commit 8cf8db3a73 ("Kconfig: Use a short, consistent
style for prompts"), fixing stuff that got introduced since then.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-27 09:23:30 +01:00
Cinly Ooi
2810b88971 tests: Enable kernel.device tests for qemu_x86_64
Reworked platform_whitelist to enable the "test kernel.device" for
qemu_x86_64

kernel.device.pm is not yet enabled for qemu_x86_64 because
there is a link error

   undefined symbol `_DEVICE_STRUCT_SIZEOF'
   referenced in expression

Signed-off-by: Cinly Ooi <cinly.ooi@intel.com>
2019-02-26 22:55:40 -08:00
Daniel Leung
4c77c91f83 soc: intel_s1000_crb: fix GPIO IRQ in dts_fixup.h
The IRQ defined in DTS has already been shifted so there is
no need to shift again in dts_fixup.h.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-02-26 20:18:13 -06:00
Daniel Leung
f8cafdeb8e soc: intel_s1000: make zephyr_prebuilt.elf a lot smaller
Due to fake IDT_BASE address, zephyr_prebuilt.elf is about 1.1GB
in size due to all the empty space between end of SRAM and IDT_BASE.
So move the IDT_BASE to the empty space just after SRAM. The section
will be discarded in the final zephyr.elf so it should not be a big
issue. After this change, zephyr_prebuilt.elf is now a bit smaller
than 5MB.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-02-26 20:17:47 -06:00
Ulf Magnusson
7db2e20ba3 kconfig: tests: Fix double 'source' of subsys/testsuite/Kconfig
Both Kconfig.zephyr and subsys/Kconfig 'source's
subsys/testsuite/Kconfig, giving multiple redundant identical
definitions for all the symbols in it.

Remove the 'source' in Kconfig.zephyr.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-26 20:12:09 -06:00
Daniel Leung
603f068690 uart/ns16550: Use DT_ prefix for remaining device configs
Previous rename from CONFIG_* to DT_* left a few remaining
CONFIG_*. So rename them manually now.

Fix #13753

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-02-26 20:06:26 -06:00
Ulf Magnusson
dd5ff3957c doc/guide/dts: Clean up DTS template
Add a missing semicolon after /dts-v1/, and a blank line between
/dts-v1/ and the root node.

Use 'code-block:: none' instead of 'code-block:: yaml' as well.
DTS is not YAML.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-26 17:27:51 -08:00
Jukka Rissanen
13b8c2ccbf doc: net: Change connectivity API doc to use BSD sockets
The connectivity API will now point to BSD socket API instead
of legacy connectivity API (net_context.h) when creating
a network application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-26 17:27:08 -08:00
Robert Lubos
663460cd21 doc: net: Add socket offload description
Add decription and API reference for socket offloading.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-02-26 17:26:48 -08:00
Robert Lubos
d26963fceb net: socket: Add doxygen descriptions for socket offloading
Add brief doxygen documentation for socket offloading API.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-02-26 17:26:48 -08:00
Jukka Rissanen
b68f5f0fe1 doc: net: Update network overview chapter
Fixing typos and missing features in network overview
chapter.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-26 17:23:29 -08:00
Paul Sokolovsky
4bcd560985 lib: fdtable: Update for zephyr_write() rename
_impl__zephyr_write() was renamed to _impl__zephyr_write_stdout().
This wasn't caught by CI because we didn't have POSIX tests build
for newlib, but now we have.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-02-26 14:56:58 -06:00
Andrzej Głąbek
cd65ed857c boards: nrf52810_pca10040: Override delay loop cycles
On nrf52810_pca10040 board, the nRF52810 SoC is emulated on nRF52832.
This patch overrides for this board the number of cycles consumed by
one iteration of the internal loop in `nrfx_coredep_delay_us()` (used
by `k_busy_wait()`), so that the value adequate for nRF52832 is used.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-02-26 11:53:20 -06:00
Andrzej Głąbek
e2dd85472a soc: nrf52810: Allow the use of SPI0, TWI0, and UART0
In the recent MDK brought by nrfx 1.6.2, these legacy peripherals have
been revealed as available also in nRF52810. This patch allows their
use in Zephyr drivers.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-02-26 11:53:20 -06:00
Andrzej Głąbek
91bd31e883 ext: hal: nordic: Update nrfx to version 1.6.2
Updates nrfx to the recently released version. See
https://github.com/NordicSemiconductor/nrfx/blob/v1.6.2/CHANGELOG.md
for a list of changes that this version introduces.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.6.2
commit: 6f54f689e9555ea18f9aca87caf44a3419e5dd7a
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-02-26 11:53:20 -06:00
Kumar Gala
c894aa31a6 tests: posix: add newlib cfg option
Add a build variant of the posix tests with newlib enabled.  Since the
interation of posix is greatly related to the libc we should have these
tests build with and without newlib support.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-26 11:36:52 -06:00
Paul Sokolovsky
b5639c4ee2 libc: newlib: Rename adhoc read/write implementation for stdin/stdout
In case newlib is enabled, but POSIX subsys isn't, there're adhoc
implementations of read() and write() which work only with adhoc
stdin/stdout emulation layer. These are backed by system calls named
like "read" and "write". Rename all these functions and syscalls to
explicitly mention stdin/stdout in the names, to free namespace
for the implementation of generic read/write syscalls which will
integrate with POSIX fdtable.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-02-26 11:36:33 -06:00
Wayne Ren
951d96a3c3 arch: arc: fix the overkilled codes caused by removing APP_MEM
these codes are overkilled by commit 41f6011c

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-02-26 08:41:38 -08:00
Loic Poulain
cf856183d1 soc: nxp_imx: mimxrt1064_evk: Enable ethernet support
The i.MX RT1064 evk has one ethernet (10/100M) connector via KSZ8081RNB
phy. Enable related dts nodes and config flags

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-02-26 08:04:40 -06:00
Loic Poulain
e980ef8a8e soc: nxp_imx: Add on-chip flash code location support
iMXRT1064 has 4MB on-chip Flash memory (flexspi2) mapped to 0x70000000.
Add it as configurable code location for MIMXRT1064-EVK board.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-02-26 08:04:40 -06:00
Andrew Boie
feab37096b libc: fix CONFIG_STDOUT_CONSOLE semantics
The intent of this Kconfig is to allow libc stdout
functions like printf() to send their output to the
active console driver instead of discarding it.

This somehow evolved into preferring to use
printf() instead of printk() for all test case output
if enabled. Libc printf() implementation for both
minimal libc and newlib use considerably more stack
space than printk(), with nothing gained by using
them.

Remove all instances where we are conditionally
sending test case output based on this config, enable
it by default, and adjust a few tests that disabled
this because they were blowing stack.

printk() and vprintk() now work as expected for
unit_testing targets, they are just wrappers for
host printf().

Fixes: #13701

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-02-26 08:00:33 -06:00
Pawel Dunaj
51a00cf790 include: misc: Use logger in STACK_ANALYZE macro
When printk is used stack size expanding may be needed. This is
especially a problem for threads with small stacks.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2019-02-26 11:35:03 +01:00
Erwan Gouriou
4fe3aea774 codeowner: add codeowner for ST stm32 development boards
Add codeowner for STM32 based ST development boards

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-26 00:40:43 -06:00
Anas Nashif
0f6b6fc675 doc: update xcc installation instructions
Update instructions to match latest SDK and avoid installation in system
folders using sudo.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-26 02:58:07 +01:00
Anas Nashif
ee11592186 toolchain: Do not hardcode where the toolchain was installed
Contrary to all other toolchains, the xcc toolchain had a hardocded
installation path. Replace this with XTENSA_TOOLCHAIN_PATH so users can
install in different locations.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-26 02:58:07 +01:00
Piotr Mienkowski
40b5522058 power: doc: fix usage of 'low power state' phrase
The phrase 'low power state' is often incorrectly used to indicate
'low power' or 'deep sleep' states. This commit fixes the ambiguities
by renaming 'low power state' to 'power state' where necessary.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-02-26 02:30:13 +01:00
Piotr Mienkowski
f04a4c9deb power: rename CPU_LPS_n power states
CPU_LPS_n name used to indicate a low power state is cryptic and
incorrect. The low power states act on the whole SoC and not exclusively
on the CPU. This patch renames CPU_LPS_n states to LOW_POWER_n. Also
HAS_ pattern for Kconfig options is used in favor of a non standard
_SUPPORTED. Naming of deep sleep states was adjusted accordingly.

Following is a detailed list of string replacements used:
s/SYS_POWER_STATE_CPU_LPS_(\d)_SUPPORTED/HAS_STATE_LOW_POWER_$1/
s/SYS_POWER_STATE_CPU_LPS_(\d)/SYS_POWER_STATE_LOW_POWER_$1/
s/SYS_POWER_STATE_DEEP_SLEEP_(\d)_SUPPORTED/HAS_STATE_DEEP_SLEEP_$1/

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-02-26 02:30:13 +01:00
Piotr Mienkowski
c75187587b power: simplify SYS_POWER_*_SUPPORTED Kconfig options
This commit removes dependency on SYS_POWER_LOW_POWER_STATES_SUPPORTED,
SYS_POWER_DEEP_SLEEP_STATES_SUPPORTED Kconfig options. Power management
SYS_POWER_LOW_POWER_STATES, SYS_POWER_DEEP_SLEEP_STATES options depend
now directly on specific power states supported by the given SoC. This
simplifies maintenance of SoC Kconfig files.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-02-26 02:30:13 +01:00
Daniel Leung
336d3d3adc xtools: exclude "sources" when searching xtools output dir
When using xtools as toolchain, cmake searches the toolchain home
directory. However, if the first toolchain directory does not
begin with any character before "s", "sources" (if exists) would
become the first directory being probed. Since it does not
conform to "arch-vendor-abi" naming, cmake would fail.
So exclude "sources" from the list to avoid this issue.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-02-26 02:28:38 +01:00
Kwon Tae-young
45fdb5d267 drivers: ssd1306: Add high and delay for reset.
Add high and delay for reset.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2019-02-26 02:27:32 +01:00
Maksim Masalski
a4c0810aa0 shell: changed dead code part in function buffer_trim()
According to the Coverity issue 190614 (github issue #12319)
Fix for logically dead code in function buffer_trim
Before while execution cannot reach this statement: buff[0] = '\0';

Tested and noticed that part of code is unnecessary inside of while
For the test, I made the same function in CodeBlocks and send to it
string to detect and delete whitespaces. After deletion of dead code
part, I tested function again, it works.

Function buffer_trim first detects whitespace characters in the end
of the string using first while, then it adds '\0' to the end
of the string to mark that string has new end after all whitespace
characters. Second while finds whitespaces at the beginning
of the string and counts how many whitespaces it found.
In the end using if counted whitespaces are removing from the
string.

Signed-off-by: Maksim Masalski <maxxliferobot@gmail.com>
2019-02-26 02:26:52 +01:00
Jukka Rissanen
429b6ed68e net: stats: Wrong Kconfig options were used for statistics
The net-shell was using wrong config options for statistics
support. Also net_stats.h had wrong config used for IPv6 MLD
statistics.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-26 02:25:45 +01:00
Ravi kumar Veeramally
c4f2ab143d net: tests: Migrate DHCPv4 tests
Migrate DHCPv4 tests to new net_pkt API.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-02-26 02:25:14 +01:00
Jukka Rissanen
985c5d72a5 doc: net: Add documentation for net-shell
Simple page describing net-shell commands.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-26 02:24:45 +01:00
Alexander Wachter
bcfe86b76b CODEOWNERS: Add hwinfo ownership
Add @alexanderwachter as hwinfo maintainer.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-02-26 02:08:28 +01:00
Alexander Wachter
89ddc391fd CODEOWNERS: CAN ownership
Add @alexanderwachter as CAN maintainer

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-02-26 02:08:28 +01:00
Jukka Rissanen
79824f4dcc doc: net: Hide misc host connectivity chapters from index
No need to show

* native_posix board setup (native_posix_setup.rst)
* QEMU Ethernet setup (qemu_eth_setup.rst)
* QEMU SLIP setup (qemu_setup.rst)
* USBNET setup (usbnet_setup.rst)

in main network index as links to those chapters are already
found in "Networking with the host system"
(networking_with_host.rst) chapter. In order not to trigger
a doxygen warning, place the chapters into hidden toctree.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-26 02:07:51 +01:00
Jukka Rissanen
c30f6c38d5 doc: net: Enhance Ethernet documentation
Add Overview chapter + info about IEEE 802.1Qav (credit based
shaper).

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-26 02:07:36 +01:00