Commit graph

4100 commits

Author SHA1 Message Date
Jordan Yates
6d1a08b3a8 pm: device: move pm_device_runtime_init_* funcs
Move the `pm_device_runtime_init_*` functions from <pm/device_runtime.h>
to <pm/device.h>. The initial device state should be settable
independently of whether `CONFIG_PM_DEVICE_RUNTIME` is enabled.

This also resolves a compilation error when attempting to use these
functions without also including <pm/device.h>.

Function documentation is also updated to be more general than only
referencing runtime PM, as this also applies to system PM and manually
run actions.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-03-25 10:39:55 +01:00
Alexander Mihajlovic
2888523b68 doc: settings: Add storage location section
Add section documenting how the settings storage location is selected
by different backends.

Signed-off-by: Alexander Mihajlovic <a@abxy.se>
2022-03-24 08:16:46 -04:00
Alexander Mihajlovic
245d21719a doc: devicetree: Add zephyr,settings-partition to list of available chosens
Add newly added chosen to the list to keep it complete.

Signed-off-by: Alexander Mihajlovic <a@abxy.se>
2022-03-24 08:16:46 -04:00
Gerhard Jörges
4fd24a4341 libc: minimal: Add strtoll() and strtoull()
- strtoll() and strtoull() are copies of strtol() and strtoul() with
  types changed to long long instead of long.
- added tests
- added documentation
- removed stubs from civetweb sample

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2022-03-24 11:03:06 +01:00
Martí Bolívar
50f9b3c2ca gen_defines: add _CHILD_IDX macros for nodes with parents
These expose every node's index in its parent's list of children to C.
The root node has no parent, so no _CHILD_IDX macro is generated for
it.

Keep macros.bnf up to date with the new generated macros.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-03-24 10:48:40 +01:00
Andrei Emeltchenko
4bdaffdf54 doc: west: Add mention about Git rewrite feature
Add Git rewrite feature mention, which can simplify handling of HTTPS
URLs.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-03-23 09:59:33 -07:00
Michał Barnaś
69d3187a22 docs: add missing Kconfig functions
Add missing Kconfig functions to documentation about Kconfig
preprocessor functions.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-03-23 13:25:21 +01:00
Michał Barnaś
a1ab8da862 kconfig: fix dt_node_has_prop and add nodelabel functions
The Kconfig function "dt_node_has_prop" was using label as its
parameter, where other functions use either chosen or path.
The documentation says that the parameter is path, so this patch
makes the function as documentation says and as other functions
in the file.
The additional nodelabel functions were added as counterparts that
are using nodes labels instead of paths.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-03-23 13:25:21 +01:00
Andrei-Edward Popa
5f35cdeece doc: reference: added documentation for Reset Controller
added documentation for Reset Controller Driver

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
2022-03-23 12:51:39 +01:00
Ludvig Samuelsen Jordet
0a8ad746af Bluetooth: Mesh: Add warning about RPL persistence
With BT_SETTINGS disabled, or when using an indefinite
RPL_STORE_TIMEOUT and not storing the RPL, the device will not be able
to follow the replay protection required by the spec. This adds a
warning about this.

Signed-off-by: Ludvig Samuelsen Jordet <ludvig.jordet@nordicsemi.no>
2022-03-22 12:35:15 +01:00
Stephanos Ioannidis
095001cdd1 doc: Use :kconfig:option: domain role
Multiple usages of the :kconfig: role, which is now obsolete, was
merged in the PR #43053; update these to use the :kconfig:option:
domain role.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-03-22 01:14:31 -04:00
Steve Winslow
717853088c doc: Fix west spdx command docs formatting bug
Fixes #43993

Signed-off-by: Steve Winslow <steve@swinslow.net>
2022-03-21 21:43:01 -04:00
Robert Lubos
fff22d3d7f doc: release: 3.0: Add release notes for networking
Add networking release notes based on the commit history.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-03-21 16:09:34 -07:00
Emil Gydesen
fb9e86f235 doc: Add BT L2CAP bt_l2cap_chan_state change to release notes
Add the change to enum bt_l2cap_chan_state to the release notes.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-21 19:14:44 +01:00
Henrik Brix Andersen
67ba9900f0 drivers: can: add struct device argument to callback functions
Include a pointer to the CAN controller device for the CAN
transmit, receive, and state change callback functions.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-19 14:31:22 -04:00
Nicolas Pitre
c9e3e0d956 sched: formalize the passing of NULL to z_get_next_switch_handle()
This is an attempt at formally distinguishing and supporting the case
described in 40795 where an architecture doesn't preserve/restore the
complete thread state upon entering/exiting interrupt exception state.

This is mainly about promoting the current behavior from the accepted
workaround to a formal API specification. This workaround is currently
used on ARM64 but RISC-V requires it too.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-03-18 13:32:49 -04:00
Nazar Kazakov
f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Martin Jäger
86f075a962 doc: Add LoRa PHY and LoRaWAN sections
The LoRa and LoRaWAN documentation was not included anywhere, so the
Doxygen comments in drivers/lora.h and lorawan/lorawan.h were not
rendered. This commit adds a new section for LoRa and LoRaWAN to the
documentation.

People often confuse the difference between LoRa and LoRaWAN, so it
makes sense to combine both in the same doc section.

LoRa would otherwise not fit very well into any docs category, as it
is a driver, but not really a peripheral.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-03-18 10:41:46 -04:00
Henrik Brix Andersen
d836408de3 doc: reference: api: design guidelines: use const struct device *dev
Use "const struct device *dev" for first argument in callback functions.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-18 10:23:08 +01:00
Gerard Marull-Paretas
5a71eeb35c pm: policy: move constraints to policy API
The pm_constraint_* APIs were effectively used by the policy manager
only. This patch renames the API to the policy namespace and makes its
naming more explicit:

- pm_constraint_set -> pm_policy_state_lock_get()
- pm_constraint_release -> pm_policy_state_lock_put()
- pm_constraint_get -> pm_policy_state_lock_is_active()

The reason for these changes is that constraints can be of many types:
allow/disallow states, impose latency requirements, etc. The new naming
also makes explicit that the API calls will influence the PM policy
behavior.

All drivers and documentation have been updated accordingly.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-16 15:26:47 +01:00
Flavio Ceolin
d2a101cf01 x86: Remove Jailhouse references in this arch
Jailhouse support in X86 was removed long time ago. Just removing some
leftovers.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-03-16 04:20:26 -07:00
Georgij Cernysiov
aa00781a76 doc: release-notes-3.1: document stm32 f1 swj_cfg
STM32 F1 SWJ_CFG Kconfig options were removed in
favor of pinctrl/pinmux device tree properties.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-03-16 10:26:37 +01:00
Torsten Rasmussen
4bf9839d76 doc: fix spelling mistake, parition -> partition
Fix spelling mistake in the dfu / MCUboot documentation.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-03-16 10:24:53 +01:00
Torsten Rasmussen
a869d039e4 doc: correct location of fs.h in access.rst doc
The location of `fs.h` was wrongly specified as `include/fs.h`
resulting in a broken link.

Update the location to `include/fs/fs.h` which is the correct location.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-03-16 10:24:53 +01:00
Torsten Rasmussen
5a82b537b3 doc: remove space between argument and build folder
When using `zephyr-app-command` the CMake arguments and values are not
having spaces between them, except the `-B build`.

Remove the space, so that `-B build` becomes `-Bbuild` and thus looks
similar to other `-<arg><value>` occurences.

Example before this commit:
> Use cmake to configure a Ninja-based buildsystem:
> cmake -B build -GNinja -DBOARD=reel_board samples/hello_world
>
> Now run ninja on the generated build system:
> ninja -C build

With this commit:
> Use cmake to configure a Ninja-based buildsystem:
> cmake -Bbuild -GNinja -DBOARD=reel_board samples/hello_world
>
> Now run ninja on the generated build system:
> ninja -Cbuild

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-03-16 10:24:53 +01:00
Henrik Brix Andersen
754ed399f9 drivers: can: add CAN transceiver device driver API
Add API for controlling the state of a CAN transceiver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-15 14:32:29 -05:00
Henrik Brix Andersen
5e8399f84b devicetree: add devicetree/can.h
This contains accessor macros for getting the maximum bitrate supported
by a CAN controller/transceiver combination.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-15 14:32:29 -05:00
Gerard Marull-Paretas
893b941938 doc: guides: dts: improve device section
- Move to 1st option DEVICE_DT_GET
- Make device_get_binding 2nd choice
- Extend details on differences between DEVICE_DT_GET/device_get_binding
- Extend the troubleshooting section.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-15 15:45:55 +01:00
Martin Jäger
565fc4d29c doc: release-notes: mention API change for lorawan_send
The message type parameter was changed to the more explicit enum.
Existing code with unconfirmed message type has to be updated.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-03-15 10:37:36 +01:00
Nazar Kazakov
9713f0d47c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-14 20:22:24 -04:00
Krzysztof Chruscinski
be1f0059b9 doc: reference: logging: Extend frontend section
Update section about frontend feature.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-14 14:08:49 -04:00
Krzysztof Chruscinski
39c88fef8b doc: reference: misc: Update cbprintf documentation
Added information about package variants and updated package
structure table.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-14 11:16:14 +01:00
Emil Gydesen
13ded76242 doc: release-notes: add IN_RANGE to the release notes
Adds the new util macro IN_RANGE to the release notes.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-11 07:20:16 -06:00
Gerard Marull-Paretas
9fe21461f8 doc: reference: canbus: use DEVICE_DT_GET for the samples
Use DEVICE_DT_GET instead of device_get_binding on the samples. Also,
use the zephyr,canbus chosen device. Note that check for readiness has
not been added as previous code did not check for NULL either.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-11 10:59:18 +01:00
Joakim Andersson
84d15bbe90 doc: tfm: Improve documentation of non-secure firmware image
Explain when the TF-M nonsecure firmware image is used.
Use non-secure consistently instead of nonsecure or ns.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-03-09 14:03:52 -05:00
Joakim Andersson
3191191943 doc: tfm: Document size report commands for TF-M and BL2 images
Add documentation with example commands for getting the RAM and ROM
reports for the secure firmware image (TF-M) and mcuboot (BL2).

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-03-09 14:03:52 -05:00
Joakim Andersson
6a2e297231 doc: Fix whitespace alignment in example report
Fix whitespace alignment in example report.
This shows up unaligned in the published documentation.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-03-09 14:03:52 -05:00
Andy Ross
24d4becac2 include/atomics: doc: Clarify memory barrier behavior
Zephyr is migrating into hardware where memory ordering is starting to
matter.  The existing gcc-based defaults have always been specifying
__ATOMIC_SEQ_CST, which is safe and correct.  And all the
arch-specific assembly we have currently are either safe or for
platforms where barriers aren't needed.

Discussion in #42831 made the case that it would be nice if we were to
formally promise this, and require it from future implementations.  So
let's do that.

Fixes: #42831

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-03-09 13:46:06 -05:00
Sam Hurst
735c10882f doc: drivers: tcpc: Add USB TCPC API documentation
This commit adds documentation for the
USB Type-C Port Controller (TCPC) APIs.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-03-08 11:08:43 +01:00
Martí Bolívar
c050d1f2ec doc: bindings: improve gpio_dt_spec doc
Use _dt methods for everything.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-03-07 17:39:43 -05:00
Dominik Ermel
92109e1f62 doc/guides/device_mgmt: SMP protocol documentation
The commit adds guide that describes format of SMP reqests/responses
as issued by Zephyr implementation within mcumgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-07 16:45:52 +01:00
Erwan Gouriou
f2dde2819f doc: Release note 3.0: Document removed STM32 Clock Kconfig symbols
In this release, STM32 Clock Kconfig symbols, which were deprecated
in favor of device tree, we removed.
Document it.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-03 16:25:14 +01:00
Gerard Marull-Paretas
483585b6dd doc: delete old kconfig scripts and extensions
These are no longer used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-02 09:28:37 +01:00
Gerard Marull-Paretas
260deccb6e doc: use :kconfig:option: domain role
Kconfig options now belong to the Kconfig domain, therefore, the
:kconfig:option: role needs to be used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-02 09:28:37 +01:00
Gerard Marull-Paretas
fc942ef7d3 doc: use new kconfig extension
Enable the new extension and delete usage of the old script/extensions.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-02 09:28:37 +01:00
Gerard Marull-Paretas
8bdeac62bb doc: extensions: add kconfig search extension
Add a new extension to handle Kconfig documentation. This means that no
more CMake hackery is required. However, the way it works differs from
the current approach. Instead of creating a single page for each Kconfig
option, the extension creates a JSON "database" which is then used on
the client side to render Kconfig options on a search page. The reason
to go for a single page choice is because Sphinx is significantly slow
when handling a lot of pages. Kconfig was responsible for an increase of
about ~10K pages.

Main features:

- Generates a Kconfig JSON database using kconfiglib APIs.
- Adds a new Sphinx domain for Kconfig. The domain provides a directive,
  :kconfig:search:: that can be used to insert a Kconfig search box onto
  any page. This page is where all Kconfig references inserted using the
  :kconfig:option: role will point to. The search functionality is
  implemented on the client side using Javascript. If the URL contains a
  hash with a Kconfig option (e.g. #CONFIG_SPI) it will load it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-02 09:28:37 +01:00
Flavio Ceolin
0387bced28 drivers: crypto: Organize documentation
Move the Cipher subgroup documentation to where this API is set.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-03-01 16:32:43 -05:00
Gerard Marull-Paretas
1f0c7ca59d doc: release-notes: announce nvs_init deprecation
Add a note about deprecation of nvs_init in favor of nvs_mount.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-01 12:46:34 +01:00
Gerard Marull-Paretas
56d5486fbf fs: nvs: introduce nvs_mount and deprecate nvs_init
Add a new API call to replace nvs_init: nvs_mount. The new API does the
same as nvs_init except that it assumes to be provided with a valid
flash device via `struct nvs_fs` `flash_device` field. Previously, it
was not possible to avoid the runtime overhead of device_get_binding()
even if the flash device was known at compile time.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-01 12:46:34 +01:00
Henrik Brix Andersen
7249dab0c8 scripts: twister: harness: pytest: add support for custom cmd line args
Add support for passing custom command line arguments to a pytest
harness in twister.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-02-28 12:18:48 -05:00