Commit graph

57309 commits

Author SHA1 Message Date
Martí Bolívar
ffa0c52552 doc: cmake package: remove stale cmake version lines
This page is meant to document the behavior of the Zephyr cmake
package. However, its example CMake snippets contain some stale
references to a minimum version (3.13.1, now 3.20).

These lines are a bit of a distraction anyway, so just remove them.
They matter in general, but they don't matter where the Zephyr cmake
package is concerned.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-04 12:09:58 +01:00
Anas Nashif
ab83b6e850 actions: only publish docs from zephyr repo
Do not run doc publication job on other reports, only on the main zephyr
repo.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-04 10:20:29 +01:00
Gerard Marull-Paretas
03b470c74e doc: doxyfile: update to 1.9.2
File updated automatically by running `doxygen -u zephyr.doxyfile.in`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 09:57:01 +01:00
Gerard Marull-Paretas
7fe6b6f0bf ci: docbuild: update to latest Doxygen
Use Doxygen 1.9.2, the latest version.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 09:57:01 +01:00
Gerard Marull-Paretas
b1a12cc454 doc: doxygen: update to doxygen-awesome 1.6.1
The new template fixes issues when using latest Doxygen version (1.9.2).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 09:57:01 +01:00
Vinayak Kariappa Chettimada
9bfba6948b Bluetooth: Add missing header that defines BT_ISO_SDU_BUF_SIZE
Add missing header iso.h to hci_raw.c, that defines the
BT_ISO_SDU_BUF_SIZE.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-04 09:52:48 +01:00
Vinayak Kariappa Chettimada
99e02ad62a Bluetooth: Controller: Fix missing initialization of crc_ok
Fix missing initialization of crc_ok in the Periodic
Advertising Sync implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-04 09:52:22 +01:00
Gerard Marull-Paretas
811a09bd83 drivers: serial: npcx: drop inline attribute for PM action callback
Making function inline doesn't provide any benefit here, and is
inconsistent with all other definitions.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Gerard Marull-Paretas
cb329bbefe drivers: sensor: bme280: make PM action callback static
The PM action callback is never accessed externally, so make it static.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Gerard Marull-Paretas
6d48a8833a pm: device: remove deprecated macro device_pm_control_nop
Developers must always use NULL if no device PM is available.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Gerard Marull-Paretas
ede1d5f4f6 doc: reference: power_management: adjust PM callback docs
Documentation was not up-to-date, still referencing pm_control.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Gerard Marull-Paretas
fd96e9bd7a device: remove PM related docs
Remove documentation that belongs to the PM subsystem (already
documented by relevant APIs).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Gerard Marull-Paretas
a8fc8ef17f samples: use common PM action callback naming
The PM callback is no longer referenced as "pm_control" but
"pm_action_cb", so reflect this new naming on the callbacks.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Gerard Marull-Paretas
18519ffe8d tests: use common PM action callback naming
The PM callback is no longer referenced as "pm_control" but
"pm_action_cb", so reflect this new naming on the callbacks.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Gerard Marull-Paretas
4baf1e01ff drivers: use common PM action callback naming
The PM callback is no longer referenced as "pm_control" but
"pm_action_cb", so reflect this new naming on the callbacks.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Gerard Marull-Paretas
01430da395 drivers: video: ov2640: remove deprecated PM macro
Use NULL if no PM is available.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Gerard Marull-Paretas
dd9d0560d1 drivers: spi: esp32_spim: use NULL for PM callback
A non-existing definition was being used (probably a misspelled
deprecated macro).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Gerard Marull-Paretas
79effd7d1a drivers: sensor: si7210: make PM callback static
The PM action callback is not used externally, so make it static.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Gerard Marull-Paretas
39abbf64f7 net: use pm_action_cb instead of pm_control_cb
The PM action callback is no longer called pm_control_cb but
pm_action_cb.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Sylvio Alves
d5aa5c2a77 drivers: esp32: uart: use hal functions
In order to have Espressif SoCs working with
the same uart drivers, all low level functions
are now replaced to hal_espressif HAL calls.

This also changes pinmux, gpio and uart
init order to meet its dependencies.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-11-03 16:47:32 -04:00
Ying ming
56ef5aac52 test: change test suite name and testcase name
Because there are two testcases be the same name
in directory tests/kernel/sched/, so change one of
them to avoid confusion.

Signed-off-by: Ying ming <mingx.ying@intel.com>
2021-11-03 16:44:50 -04:00
Gerard Marull-Paretas
64aea4d57e tracing: fix PM system tracing
System PM tracing was broken for SEGGER SystemView, and was missing
proper documentation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Gerard Marull-Paretas
866b88fd2c tracing: update pm device runtime
Update the tracing definitions used by the device runtime API.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Gerard Marull-Paretas
1cee284a46 pm: device: runtime: use pm_device_runtime* namespace
Move all PM device runtime API calls from pm_device* to the
pm_device_runtime* namespace.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Gerard Marull-Paretas
05e5a72e03 tests: pm: device_runtime: add test for the API
Add a test for the device runtime API that makes sure most common usage
scenarios behave as expected:

- get + put
- get + asynchronous put until suspended
- get + asynchronous put + get (while suspend still ongoing)

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Gerard Marull-Paretas
eed8bd9c61 pm: device: runtime: refactor API
This patch refactors the runtime API to make it more clear and simple.

Relevant changes:

- API uses the action callback in a direct manner, avoiding unnecessary
  overhead.
- API documentation has been improved to include detailed return error
  codes.
- pm_runtime_disable() is now synchronous (to simplify possible error
  paths) and returns error in case it fails. It is also safe to disable
  in pre-kernel now.
- pm_runtime_put(_async)() will return -EALREADY if called with usage
  count at zero (result of an unbalanced get/put call sequence)
- A transitional state has been added back. This makes code more
  readable, and avoids using atomics (not required).

TODO:

- Solve in a better manner the asynchronous suspend error path (now
  "solved" using asserts).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Gerard Marull-Paretas
e3fece5241 pm: device: runtime: remove pm_device_wait
After the removal of pm_device_get_async, the pm_device_wait API has
become redundant. Its usage after pm_device_put_async should not be
considered a valid usecase, since after that call what will happen is a
pm_device_get (which is blocking).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Gerard Marull-Paretas
30d217aa28 pm: device: runtime: remove pm_device_get_async
As of today there is no clear usage of asynchronous gets, since in
general, a resume operation should be synchronous (we are about to use
the device immediately after resuming it). Removing this API simplifies
the runtime implementation in a significant way (refer to future
commits).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Gerard Marull-Paretas
8dd018ba85 tests: pm: device_runtime: delete test
Delete current device_runtime test. A refactored test will be added in
later commits. It is done at this point to prevent a broken range of
commits due to API changes/removal.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Vinayak Kariappa Chettimada
a7b5cc7af8 Bluetooth: Controller: Use define for offset unit bits
Use define for offset unit bits in the auxiliary pointer
structure.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:36:49 -04:00
Vinayak Kariappa Chettimada
1d0709792d Bluetooth: Controller: Use function to get set/clear AD data
Use function to get the set/clear AD data parameter to
populate the common extended payload format field.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:36:49 -04:00
Vinayak Kariappa Chettimada
c78e0512d6 Bluetooth: Controller: Explicitly typecast void return
Explicitly typecast void return for memcpy and memmove
calls.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:36:49 -04:00
Vinayak Kariappa Chettimada
dab1bb17d5 Bluetooth: Controller: Update PDU header fields population
Updated the implementation to allow population of auxiliary
pointer field as necessary to append PDU chains.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:36:49 -04:00
Vinayak Kariappa Chettimada
0c196d1334 Bluetooth: Controller: Extended Scan Response back-to-back chaining
Add LLL implementation to chain Extended Advertising Scan
Response PDUs back-to-back.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:36:49 -04:00
Vinayak Kariappa Chettimada
c5eab2011f Bluetooth: Controller: Extended Advertising back-to-back chaining
Add LLL implementation to chain Extended Advertising PDUs
back-to-back.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:36:49 -04:00
Andrew Hedin
e828009757 mgmt: mcumgr: Make SMP service notification function public
Allow SMP messages to be sent from user space.
For example, a user defined command can be sent when a value changes
so the client doesn't have to poll.
Signed-off-by: Andrew Hedin <andrew.hedin@lairdconnect.com>
2021-11-03 16:36:17 -04:00
Pavel Hübner
14ecebcde8 settings: Add name to backend choice in Kconfig
Unless a choice is named, its default value
cannot be changed in another Kconfig file.

Signed-off-by: Pavel Hübner <pavel.hubner@hardwario.com>
2021-11-03 16:35:46 -04:00
Erwan Gouriou
e19716e5c9 include/driver/clock_control: stm32: Remove STM32_PLL_PREDIV1
Make the code coherent with the comment:
purely remove STM32_PLL_PREDIV1.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-03 16:19:06 -04:00
Erwan Gouriou
dede798ce5 include/drivers/clock_control: stm32: Simplify macro definitions
When possible, replace DT_INST(0, st_stm32xx_rcc) by equivalent
DT_NODELABEL(rcc).
Also, replace DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(pll),
st_stm32f1_pll_clock, okay) by equivalent
DT_NODE_HAS_STATUS(DT_NODELABEL(pll), okay).

Last, don't check about rcc node label status, which is not an
optional node.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-03 16:19:06 -04:00
Erwan Gouriou
1a73c39dfc dts/bindings: clock: cpu2-prescaler is optional on stm32wl
STM32WL could be either single core (stm32wlex) or
dual core (stm32wl5/4x).
Make CPU2 prescaler an optional property (while it will
be required if inherited from st,stm32wb-rcc.yaml.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-03 16:19:06 -04:00
Erwan Gouriou
bbe47ee529 dts/bindings/clocks: stm32: Set RCC properties as mandatory
Now that Kconfig option for STM32 clocks configuration has been
removed, set rcc properties as required.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-03 16:19:06 -04:00
Erwan Gouriou
ace71a98a4 drivers/clock_control: stm32: Remove CLOCK_STM32_ Kconfig symbols
Remove deprecated Kconfig based STM32 clock configuration system.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-03 16:19:06 -04:00
Daniel DeGrasse
7cd8c06bb3 boards: mimxrt1160: Enable watchdog timer on RT1160
Enable watchdog timer on RT1160 evk. This was tested using
the watchdog timer api test (tests/drivers/watchdog/wdt_basic_api)

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
a477b25060 boards: mimxrt1160: Enabled ADC support for RT1160
ADC support verified with driver sample. LPADC1 channel 0 pin used,
which maps to pin 10 on J9 on the EVK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
a30d7b5125 boards: mimxrt1160: Added SPI support for RT1160
SPI support was verified on lpspi1, by connecting MISO to MOSI

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
2b0ef89f20 boards: mimxrt1160: Added CAN bus support for RT1160
CAN bus was verified in loopback mode, and transmitted output was
verified using an oscilloscope. Receive functionality was verified in
loopback mode only.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
309dfe7cfe boards: mimxrt1160_evk: Fix DTS inconsistencies with reference manual
Fix register addresses in rt11xx SOC dts. Flexcan1 was defined with an
incorrect register address, and watchdog 3 was incorrectly labelled as
watchdog 1. Watchdog 2 should not be enabled, as it is only accessible
from code running in the trustzone context.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
c0cee4fb5c boards: Add support for NXP RT1160 EVK
Add baseline support for mimxrt1160_evk Cortex M4 and M7 cores
UART shell, synchronization, and hello world have all been verified to
build and run correctly.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Jake Swensen
4a4a03d476 uncrustify: force a single EOF newline
The CI compliance check scripts check for newlines in patch submissions.

Signed-off-by: Jake Swensen <jake@swensen.io>
2021-11-03 16:14:20 -04:00
Jake Swensen
f7870ff61b gitignore: ignore macos DS_Store files
.DS_Store files contain meta-data for the local macos system and should
not be tracked.

Signed-off-by: Jake Swensen <jake@swensen.io>
2021-11-03 16:14:20 -04:00