Commit graph

53595 commits

Author SHA1 Message Date
Henrik Brix Andersen d679037643 modules: canopennode: move glue code to modules directory
Move the Zephyr-specific interface and support code for CANopenNode into
the modules directory. Consolidate the CMakeLists.txt files into one.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-07-01 13:32:18 -04:00
Vinayak Kariappa Chettimada aab30dad6f Bluetooth: controller: Use S8 encoding Tx chain delay
Minor update to calls to get Tx chain delay in extended
advertising and scanning to use S8 encoding delays.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-01 13:31:16 -04:00
Vinayak Kariappa Chettimada c7dd004148 Bluetooth: controller: PA/LNA radio timing tuned
PA/LNA related timing calculations tuned for extended
advertising and scanning.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-01 13:31:16 -04:00
Vinayak Kariappa Chettimada 3f519fea17 Bluetooth: controller: Fix 1st connection event offset for peripheral
We need to take RX chain delay and PHY used to receive
CONNECT_IND into account when calculating 1st connection
event offset.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-01 13:31:16 -04:00
Vinayak Kariappa Chettimada abc573e0f5 Bluetooth: Controller: Define a macro for active clock jitter value
Define a macro for active clock jitter value.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-01 13:31:16 -04:00
Vinayak Kariappa Chettimada d510351b4f Bluetooth: controller: Fix Tx-Rx switch delay calculation
In the Tx to Rx switch, fix the delay which should be the
Rx ready delay plus the Tx chain delay and plus 4 us active
clock jitter compensation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-01 13:31:16 -04:00
Vinayak Kariappa Chettimada 0bd05c0ed9 Bluetooth: Controller: Rename CPR mutual exclusion functions
Rename CPR mutual exclusion function to not sound similar to
OS mutex interfaces.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-01 13:30:50 -04:00
Vinayak Kariappa Chettimada a8d4c062fa Bluetooth: Controller: Use inline functions for CPR mutex operations
Use inline functions for CPR mutex operations.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-01 13:30:50 -04:00
Vinayak Kariappa Chettimada d518337835 Bluetooth: Controller: Cleanup mutual exclusion in CPR implementation
Minor cleanup of the implementation of mutual exclusion
of LE Connection Parameter Request amongst active
connections.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-01 13:30:50 -04:00
Pieter De Gendt 3945374d46 manifest: update openthread
Update the openthread repository to enable OT_ASSERT based on
CONFIG_ASSERT.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-07-01 13:22:01 -04:00
Pieter De Gendt 13d5894e46 net: openthread: Implement otPlatAssertFail
Add a platform implementation for OpenThread's otPlatAssertFail
and enable it by default.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-07-01 13:22:01 -04:00
Emil Gydesen 61847b6be0 samples: bluetooth: Adds central PAST sample
Adds a sample that demonstrates how to transfer a periodic
advertising sync from a device to another device.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-07-01 13:21:31 -04:00
Emil Gydesen bfa7315649 samples: bluetooth: Add peripheral PAST sample
Adds a sample of using (in this case subscribing) to periodic
advertising sync transfer (PAST).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-07-01 13:21:31 -04:00
Ruibin Chang d0ce9bb877 ITE drivers/pwm: add PWM for it8xxx2
Add pulse width modulator (PWM) for it8xxx2.

Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw>
2021-07-01 13:21:06 -04:00
Dino Li ee3ccc9696 driver: gpio: it8xxx2: enable gpio_driver_config
Fix assertion of unsupported pin.

This change also remove ngpios field.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2021-07-01 11:39:08 -04:00
Anas Nashif 34c47a7a96 doc: update slack invite
Update slack invite.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-07-01 10:56:34 -04:00
Benedikt Schmidt 08a39c37dd boards: arm: add STM32H735G discovery kit
Add the STM32H735G discovery kit to the available boards.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2021-07-01 08:49:26 -05:00
Andrei Emeltchenko 882600834e edac: shell: Use helper functions for shell devmem command
Using helper functions decreases function complexity numbers reported
by static code analyzers.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko fee256bc72 edac: shell: Print exact error with shell error message
Include to shell_error() also exact error.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 228232e29d edac: shell: Check error for log clear functions
Check errors returned by edac_ecc_error_log_clear() and
edac_parity_error_log_clear().

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 9da4e3f3dc edac: ibecc: Reduce CCM number using fallthrough
Reduce CCM number reported by Coverity by using __fallthrough.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 50c47267b4 edac: ibecc: Strip debug information
Remove debug information increasing code coverage.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko d5a8f1200e edac: Add dumy EDAC driver for API coverage
Add dummy EDAC driver for -ENOSYS test coverage.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko a6dda9aa80 edac: Use -ENOSYS also for optional interfaces
Use -ENOSYS for all not implemented interfaces.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 7b035bb67d edac: Use boolean expressions in if conditions
Use only boolean in if conditions as new coding style implies for edac
API header file.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 07d524357e edac: ibecc: Simplify PCI probing
Use only one pcie_conf_read() instead of several reads and make code
more readable.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko b1d79776c7 edac: ibecc: Simplify NMI handling
Refactor NMI handling making it clearer and fix return code for other
NMI source.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko b6c75cfd34 edac: ibecc: Use boolean expressions in if conditions
Use only boolean in if conditions as new coding style implies.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 9bad08e3e7 edac: shell: Use boolean expressions in if conditions
Use only boolean in if conditions as new coding style implies.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko daf8095851 edac: shell: Replace ret with err
Replace ret with err for simple int type errors.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 661eb79f6f edac: Use TODO instead of workaround in comment
Using TODO is more appropriate since workaround implies working around
a bug.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 7293587725 edac: Use -ENOSYS for not implemented mandatory API functions
Use standard Zephyr way for not implemented mandatory API functions.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko f766d13b91 edac: docs: Use @retval instead of @return when applicable
Make documentation more readable by using @retval instead of @return
when applicable.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 6dfe3f668a edac: Include error injection API to documentation
Remove #ifdefs making code cleaner and including error injection API
functions to documentation.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 32b17d3b0a edac: tests: Use new EDAC API in tests
Use new EDAC API in tests.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 0eb48e30c6 edac: shell: Use new EDAC API in shell
Use new EDAC API in shell.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 6622eccddb edac: Refactor EDAC API
Refactor EDAC API making it more clear, removing unneeded typedefs and
using check for optional and assert for mandatory APIs.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 5567f498f6 edac: Introduce enum type for error type
Use edac_error_type enum type instead of defines for EDAC error types.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Kumar Gala 1e71415214 tests: kernel: device: Exclude beaglev_starlight_jh7100
The beaglev_starlight_jh7100 uses a full 64-bit devicetree map
which uses #{address/size}-cells = 2.  The device test expects
that #{address/size}-cells = 1 so exclude beaglev_starlight_jh7100
from the test.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-30 13:39:52 -04:00
Benedikt Schmidt ae0fc4984d manifest: order subsystems alphabetically
Order the subsystems in the manifest file alphabetically, as they
actually should be according to the comment within the manifest file.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2021-06-30 10:01:22 -05:00
Flavio Ceolin fbd2d2f557 drivers: ps2: Build syscall handlers
syscall handler were not being built at all !!

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-06-30 10:44:44 -04:00
Flavio Ceolin 297fb5a90f drivers: ps2: Fix wrong cast
ps2_read() syscall was casting the value to uint32_t *

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-06-30 10:44:44 -04:00
Flavio Ceolin 407ea645a0 drivers: ps2: Fix syscalls handlers
This driver was using a very old macro to declare a syscall. Fix
syscall handlers.

Fixes #23745

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-06-30 10:44:44 -04:00
Martí Bolívar bd8afe9365 drivers: sensor: clean up zephyr_library calls
In drivers/sensor/CMakeLists.txt, we have various lines like this:

    add_subdirectory_ifdef(CONFIG_FOO foo)

Then drivers/sensor/foo/CMakeLists.txt says:

    zephyr_library()
    zephyr_library_sources_ifdef(CONFIG_FOO foo.c)

This is redundant; the foo/CMakeLists.txt won't be added to the build
system unless CONFIG_FOO=y in the first place, so there's no need for
extra boilerplate testing it again.

Remove all these unnecessary instances in each sensor driver's
CMakeLists.txt using this pattern:

    zephyr_library()
    zephyr_library_sources(foo.c)

In a couple of places, the '.c' extension is missing. Add them in for
consistency when that happens.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-30 09:36:33 -04:00
Gerard Marull-Paretas a9b1c42f40 doc: extensions: remove eager_only
The eager_only is currently breaking the usage of the `.. only``
directive, so remove it. Documentation seems to build fine without it,
so it has been removed for now.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-30 08:29:01 -04:00
Lingao Meng cc0abee3db Bluetooth: Mesh: Check the CID field before opcode compare
Bluetooth Mesh Vendor model hava company id field.

Accordin MeshPRFV1.0.1 3.7.3.1 Operation codes.

The 3-octet opcodes are used for manufacturer-specific opcodes.
The company identifiers are 16-bit values defined by the
Bluetooth SIG and are coded into the second and third octets of
the 3-octet opcodes.

Therefore, we can speed up the search process by checking whether
CID fields match, rather than comparing opcodes one by one.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-06-29 17:08:02 -04:00
Piotr Pryga 9fd079bb0d samples: Bluetooth: df_rx: Add config for support the nRF52820
Add required configuration and DTS overlay for support the nRF52820 SOC.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-06-29 17:07:20 -04:00
Vinayak Kariappa Chettimada d3c27aeb8f Bluetooth: Controller: Fix Data Length Update node Rx reservations
Reserve a minimum node rx of 2 that can happen when local
central initiated PHY Update reserves 2 node rx, one for PHY
Update complete and another for Data Length Update complete
notification. Otherwise, a peripheral only needs 1
additional node rx to generate Data Length Update complete
when PHY Update completes.

Relates to #36381.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-06-29 17:05:20 -04:00
Vinayak Kariappa Chettimada 6810facffa Bluetooth: Controller: Fix free rx buffer MFIFO enqueue
Replace the post decrement in loop's conditional into
explicit decrement inside the loop so as to avoid
decrementing the maximum count without enqueueing free rx
buffers into the free rx buffer MFIFO.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-06-29 17:05:20 -04:00
Vinayak Kariappa Chettimada ecf7106177 Bluetooth: Controller: Minor change to use IS_ENABLED
Minor changes to use IS_ENABLED and updates to comments in
code.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-06-29 17:05:20 -04:00