Commit Graph

67235 Commits

Author SHA1 Message Date
Kumar Gala 5cca6ed087 drivers: ieee802154: b91: Convert to DEVICE_DT_INST_DEFINE
Move driver to use {NET_}DEVICE_DT_INST_DEFINE.  This lets us
remove the IEEE802154_B91_DRV_NAME Kconfig symobl.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 10:32:09 +02:00
Freddie Yang eca27824f3 drivers: fix race condition in SPI-based HCI driver
Give the semaphore after transceiving the message.

Signed-off-by: Freddie Yang <freddie.yang325@outlook.com>
2022-07-19 10:31:36 +02:00
Henrik Brix Andersen 7da63e1551 samples: net: sockets: can: add console harness configuration
Add a console harness for validating the output from the SocketCAN sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-19 10:31:10 +02:00
Henrik Brix Andersen dd96b86835 net: samples: sockets: can: add support for native_posix
Add support for running the SocketCAN sample on
native_posix/native_posix_64 using the CAN loopback interface.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-19 10:31:10 +02:00
Pavel Vasilyev b9078e98e6 tests: Bluetooth: Mesh: Add ability to abort bsim mesh tests by ctrl-c
Sometimes there is a need to interrupt mesh babblesim tests when
debugging or implementing new tests. Calling Ctrl-C doesn't work as it
only aborts the test script, but not the executables. This fix adds a
trap for Ctrl-C to kill all test instances run by the script.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-07-19 10:30:56 +02:00
Kumar Gala a8c400d1a5 samples: net: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 10:30:39 +02:00
Kumar Gala 28143b1cdc samples: subsys: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 10:30:20 +02:00
Kumar Gala d979995858 boards: arm64: imx8m{m,p}_evk: disable uart
Disable the uart device as the iuart driver is not supported on i.MX8

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 10:30:20 +02:00
Xiao Song 2218cb1094 tests: net: lib: move coap to new ztest API
Move tests/net/lib/coap/ to use new ztest API.

Signed-off-by: Xiao Song <songx.xiao@intel.com>
2022-07-19 10:30:06 +02:00
Yuval Peress 82caf98dde cbprintf: fix missing field initializer warning
When compiling with '-Werror=missing-field-initializers', the cbprintf
header causes an error since 'off' isn't initialized.

Signed-off-by: Yuval Peress <peress@google.com>
2022-07-19 10:29:53 +02:00
Anas Nashif 6027152408 scripts: set_assignee: handle exceptions
Deal with exceptions that happen when a user does not exist on GH.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-18 21:41:22 -04:00
Anas Nashif ffcedaa964 MAINTAINERS: remove lairdjm, account does not exist
This account does not exist anymore in GH, remove it from the
maintainers file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-18 21:41:22 -04:00
Martí Bolívar 7d7988d1a9 devicetree: clarify FOREACH_CHILD behavior
The children are iterated over in the same order they appear in
zephyr.dts, but this isn't documented. Clarify the order.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-07-18 17:50:44 -05:00
Martí Bolívar d6f68f0bbb scripts: gen_defines: fix tokenization of array elements
This fixes commit
3d5cc38cf6.

That commit only works if removing the quotes from e.g. a string in an
array actually results in a token. If the string's value is something
like

  "foo,bar"

though, it will result in the "token"

  foo,bar

in the generated output.

This is wrong; fix it using the new edtlib.str_as_token() API
introduced to allow callers to perform the same procedure as that
library for fixing up strings.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-07-18 17:50:44 -05:00
Martí Bolívar 7b2a728584 scripts: gen_defines: add a missing comment
Adding a comment at this point in the header file splits these macros
into their own section. They are presently grouped together with the
previous section, which is unrelated. This is confusing; fix it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-07-18 17:50:44 -05:00
Martí Bolívar 4ef8c8e447 edtlib: expose str_as_token() API
Some callers need to be able to convert strings to tokens in the same
way edtlib does. Make this possible by exposing the internal helper
function used to do that under a suitable name.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-07-18 17:50:44 -05:00
Martí Bolívar 19bb6b330c edtlib: fix error handling in an internal helper
The error message emitted by _interrupt_parent() is wrong; it
mistakenly says:

  node None has an 'interrupts' property, but [...]

This 'None' is appearing because the same routine overwrites the
'node' argument that the caller is asking about with node parents
until it hits the root, at which point root.parent is None.

Fix it by caching the original node and using that in the error
message instead.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-07-18 17:50:44 -05:00
Jason Wright c6c7dde969 scripts: better logging for --coverage-formats option
Adds additional log messages for coverage reports
beyond HTML format.

Signed-off-by: Jason Wright <jwright@synchron.com>
2022-07-18 15:03:13 -04:00
Jason Wright 60c4d20548 scripts: restrict --coverage-formats option to gcovr
Generates an error if --coverage-formats option is supplied without
coverage tool being set to gcovr.

Signed-off-by: Jason Wright <jwright@synchron.com>
2022-07-18 15:03:13 -04:00
Jason Wright 786f28f162 scripts: add --coverage-formats option for use with gcovr
Adds optional twister flag to support gcovr output report formats.

Signed-off-by: Jason Wright <jwright@synchron.com>
2022-07-18 15:03:13 -04:00
Fabio Baltieri 55b243e124 test,arch: fix few odd suffix include paths
Fix some more legacy include paths found in files with unusual suffixes.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-07-18 14:44:47 -04:00
Kumar Gala 03912c23e3 dts: bindings: dma: device labels are now optional
All in tree device drivers use some form of DEVICE_DT_GET
so we no longer need to require label properties.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-18 11:53:36 -05:00
Henrik Brix Andersen c9b7b4e018 tests: drivers: can: canfd: enable loopback tests on native_posix
Enable the CAN-FD driver loopback tests on native_posix and
native_posix_64.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-18 18:43:36 +02:00
Henrik Brix Andersen 3ba47f94d1 boards: posix: native_posix: list CAN-FD as a supported feature
List CAN-FD as supported by the native_posix and native_posix_64 boards to
reflect the recent addition of CAN-FD loopback support.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-18 18:43:36 +02:00
Henrik Brix Andersen b407b5697f drivers: can: loopback: add CAN-FD loopback support
Add support for CAN-FD frames in the CAN loopback driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-18 18:43:36 +02:00
Benjamin Björnsson 4b30008f5b drivers: gpio: gpio_cy8c95xx.c: move driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 18:43:17 +02:00
Benjamin Björnsson ff327c419d drivers: gpio: gpio_pca953x: move driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 18:43:03 +02:00
Benjamin Björnsson 21cf889c87 drivers: led: tlc59108: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 18:42:52 +02:00
Mariusz Skamra 31d3479c85 Bluetooth: shell: audio: Extend `vcs init` with opt params
Extend the `vcs init` command with optional parameters to set the
initial VCS state including volume level, mute state and step size.
This is needed to pass qualification test cases listed below:
VCS/SR/CP/BV-01-C,
VCS/SR/CP/BV-02-C,
VCS/SR/CP/BV-02-C,
VCS/SR/CP/BV-04-C

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-07-18 18:42:34 +02:00
Kumar Gala 1525a352b9 drivers: gpio: esp32: Remove unused code
Remove gpio_esp32_get_gpio_for_pin as its no longer used.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-18 18:42:20 +02:00
Andreas Rudolf 422f98182c Bluetooth: shell: fix bt init sync command
Shell command "bt init sync" now correctly enables Bluetooth
synchronously, and "bt init" enables Bluetooth asynchronously.

Fixes #47860.

Signed-off-by: Andreas Rudolf <andreas.rudolf@husqvarnagroup.com>
2022-07-18 18:42:02 +02:00
Emil Gydesen 577caf774e Bluetooth: Audio: User _ prefix for sys_snode_t nodes
The sys_snode_t nodes are used internally, and we use the
convention of the "_" prefix to indicate that this is
an internally used value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-18 18:30:43 +02:00
Emil Gydesen 549a98acce Bluetooth: Audio: Modify broadcast sink to use list of streams
Modify the broadcast sink to use a list of streams instead
of an array. This removes the requirement that the array
of stream pointers shall be static, and makes the
broadcast sink API and implementation more similar
to the unicast group and broadcast source.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-18 18:30:43 +02:00
Emil Gydesen 468bd4d852 Bluetooth: Audio: Modify broadcast source to use a list of streams
Modify from array to list. The list approach is easily
implemented as it is used for the unicast groups, and
using the list approach instead of an array does not
require the array to be static.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-18 18:30:43 +02:00
Carlo Caione ec0b3148cc test: syscall_perf: Do not re-define csr_read
No need to re-define csr_read().

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-18 12:22:00 -04:00
Carlo Caione b1242522c4 riscv: Use STRINGIFY for CSR helpers
We usually want to be able to access CSR using:

1. the explicit name of the register:
     csr_read(mstatus);

2. the numeric equivalent of the register:
     csr_read(0xB00);

3. the numeric equivalent of the register using some defines:
     #define REG 0xB00
     csr_read(REG)

Currently Zephyr only allows the first two cases, throwing an error when
trying to use the case 3.

Fix this and support all the cases by forcing the CSR helpers to use the
STRINGIFY() macro.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-18 12:22:00 -04:00
Krzysztof Chruscinski b6dcdb17f9 lib: os: spsc_pbuf: Improve data cache configuration
Use CONFIG_DCACHE_LINE_SIZE to determine distance between
fields modified by different cores.
Add option which specifies what is the data cache line
of the remote core. Maximum from local and remote cache
line sizes is used as distance and alignement.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-18 12:21:16 -04:00
Krzysztof Chruscinski e63fc06491 tests: lib: spsc_pbuf: Increase test buffers
Test buffers must be increased to fit test data when cache
is enabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-18 12:21:16 -04:00
Guo Lixin d6995cb050 tests: fpu_sharing/generic: workaround crash on qemu_leon3
When running tests/kernel/fpu_sharing/generic on qemu_leon3 with the
new ztest API, a fatal error is raised while test is reported success.
So workaround this by changing the main stack size to 2048.

Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-18 12:20:39 -04:00
Guo Lixin 948cb6a8d9 tests: kernel: generic: move to new ztest API
Move tests/kernel/fpu_sharing/generic/ to use new ztest API.

Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-18 12:20:39 -04:00
Guo Lixin 4f37c99601 tests: kernel: float_disable: move to new ztest API
Move tests/kernel/fpu_sharing/float_disable/ to use new ztest API.

Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-18 12:20:39 -04:00
Tomislav Milkovic 0fe2c1fe90 everywhere: Fix legacy include paths
Any project with Kconfig option CONFIG_LEGACY_INCLUDE_PATH set to n
couldn't be built because some files were missing zephyr/ prefix in
includes
Re-run the migrate_includes.py script to fix all legacy include paths

Signed-off-by: Tomislav Milkovic <milkovic@byte-lab.com>
2022-07-18 16:16:47 +00:00
Bernard Lee 5658e9e30d soc: arm: nordic_nrf: include linker sections header
Include linker sections header to move z_arm_platform_init to text
section. It is now is placed in the TEXT section.

Signed-off-by: Bernard Lee <bernard.lee@nordicsemi.no>
2022-07-18 16:11:50 +00:00
Robert Lubos 78c871ab86 net: sockets: Fix potential deadlock during TCP send
There is a potential, corner case scenario, where a deadlock can occur
between TCP and socket layers, when both ends of the connection transmit
data.

The scenario is as follows:
 * Both ends of the connection transmit data,
 * Zephyr side send() call gets blocked due to filing the TX window
 * The next incoming packet is data packet, not updating the RX window
   on the peer side or acknowledging new data. The TCP layer will
   attepmt to notify the new data to the socket layer, by calling the
   registered callback. This will block the RX thread processing the TCP
   layer, as the socket mutex is already acquired by the blocked send()
   call.
 * No further packets are processed until the socket mutex is freed,
   which does not happen as the only way to unblock send() is process
   a new ACK, either updating window size or a acknowledging data.
   The connection stalls until send() times out.

The deadlock is not permament, as both threads get unlocked once send()
times out. It effectively breaks the active connection though.

Fix this, by unlocking the socket mutex for the time the send() call is
idle. Once the TCP layer notifies that the window is available again,
the mutex is acquired back.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-07-18 08:36:09 -07:00
Aastha Grover 35f42797b8 samples: drivers: fpga: merge both samples and add sample.yaml
Merge the fpga_controller and fpga_controller shell
sample applications and add sample.yaml to enable testing in
twister.

Fixes #47613

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-07-18 10:28:08 -05:00
Benjamin Björnsson 0649679b98 drivers: sensor: bmp388: Rename spi variable
Rename variable for consistency across drivers.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 10:24:35 -05:00
Benjamin Björnsson b6c8148e7e drivers: sensor: bmp389: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 10:24:35 -05:00
Christopher Friedt 3783cf8353 scripts: release: list_backports: use older python dict merge method
In Python versions >= 3.9, dicts can be merged with the `|` operator.

This is not the case for python versions < 3.9, and the simplest way
is to use `dict_c = {**dict_a, **dict_b}`.

Signed-off-by: Christopher Friedt <cfriedt@fb.com>
2022-07-19 00:20:13 +09:00
Benjamin Björnsson b92144ca3b samples: sensor: stm32_temp_vbat: Update sample to use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE to remove usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 14:32:09 +00:00
Benjamin Björnsson 8af2f0460d samples: sensor: stm32_temp_sensor: Update to use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE to remove usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 14:31:54 +00:00