Commit Graph

562 Commits

Author SHA1 Message Date
Johann Fischer fdcc104455 usb: remove Kconfig option USB_UART_CONSOLE
Since there are no more users and dependencies of
Kconfig option USB_UART_CONSOLE in the tree,
remove the remains and the option USB_UART_CONSOLE.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-11-18 14:29:18 +01:00
Christopher Friedt 80f73a053f doc kernel: atomics: support for 64-bit atomic operations
By redefining `atomic_t` as `long`, the type is 32-bit on
32-bit architectures and 64-bit on 64-bit architectures.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-11-15 09:59:01 -05:00
Gerard Marull-Paretas f51f5276b5 doc: reference: drivers: remove incorrect reference
The PM documentation does not provide any details on usage of
SYS_DEVICE_DEFINE, so remove the reference.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas f64a9c1aba doc: reference: pm: include all API and move to pm
Include all API groups (some where missing) and move to pm folder
instead of power_management for consistency.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas cfa56f2ecb doc: reference: pm: remove Kconfig list
Kconfig options will be listed as needed in the guidelines.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas 4d6803383d doc: pm: split sections and move to guides
Splitted the PM reference document into smaller chunks (overview,
system, device and device_runtime). Moved this content to the guides
section, since the documentation intent is to provide general PM subsys
information and usage guidelines.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas 11cf06f5d5 doc: reference: pm: move terms to glossary
Glossary is a place where all terms can be defined, so move them there.
Some terms have been slightly adjusted and SOC interface remove since it
was not much relevant.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Neil Armstrong da512fd4d4 devicetree: add DT ranges public API
This adds the macro public API to handle the DT ranges properties.

This also updates the devicetree/api.rst documentation.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-11-10 08:23:00 -05:00
Gerard Marull-Paretas 6d269fcedc doc: reference: api: overview: fix reference to pinctrl
A space between :ref: and the actual reference prevented the reference
to be rendered correctly.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-09 11:05:51 +01:00
Christopher Friedt 918a574c88 clock: add k_cycle_get_64
This change adds `k_cycle_get_64()` on platforms that
support a 64-bit cycle counter.

The interface functions `arch_k_cycle_get_64()` and
`sys_clock_cycle_get_64()` are also introduced.

Fixes #39934

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-11-08 13:41:53 -05:00
Ingar Kulbrandstad 59d5ef1e24 Bluetooth: Mesh: Moved composition data out of mesh shell
The mesh shell module owns the composition data for the shell
application, which makes it impossible to use it outside of the
application itself. To support the shell as a generic debugging
component that can be added to any application, we have moved the
composition data out of shell.c, and into the application.

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2021-11-08 11:07:11 -05:00
Henrik Brix Andersen c817a09b0a canbus: rename zephyr,can-primary chosen property to zephyr,canbus
Rename the Zephyr chosen property for specifying the default CAN bus
controller from "zephyr,can-primary" to "zephyr,canbus".

The "zephyr,can-primary" property name was selected in antipation of
adding support for redundant CAN networks, which we have yet to
add. Meanwhile, the "primary" term causes confusion for non-redundant
CAN bus configurations (and the "can" term doesn't match the name of the
Zephyr CAN bus subsystem).

The CAN in Automation (CiA) 302-6, which deals with CANopen network
redundancy, uses the terms "default interface" and "redundant
interface". If/when we add support for redundant CAN networks, the
"zephyr,canbus" chosen property can be supplemented with a
"zephyr,canbus-redundant" chosen property.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-11-07 09:05:39 -05:00
Pavel Hübner 104714394f kernel: Introduce K_MEM_SLAB_DEFINE_STATIC
As the already existing macro K_MEM_SLAB_DEFINE results in
two variable definitions, the preceding static modifier leads to
a seemingly working solution, though linkage conflicts will occur
when the same memory slab name is used across multiple modules.

The new K_MEM_SLAB_DEFINE_STATIC macro duplicates the functionality of
K_MEM_SLAB_DEFINE with the difference that the static keywords are
internally prepended before both variable definitions.

The implementation has been tested on my Zephyr project (the build
issue faded out). The documentation has been updated altogether
with all incorrect occurences of static K_MEM_SLAB_DEFINE.

Signed-off-by: Pavel Hübner <pavel.hubner@hardwario.com>
2021-11-07 05:36:48 -05:00
Gerard Marull-Paretas 4daf285c8c pm: cleanup Doxygen groups and inclusion
- Add a new `subsys_pm` group, part of `subsys`
- Improve group naming
- Include conditional code using __DOXYGEN__, it allows to have better
  control of inclusion.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 16:49:08 +01: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 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 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
Nikolai Kondrashov 6d8fd96a2f doc: threads: Use plural for SSE registers
Use plural when referring to SSE registers (as in previous sentence) in
documentation of K_SSE_REGS thread option.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-11-02 10:46:00 +01:00
Carlo Caione 1976f33e87 drivers: mbox: Introduce MBOX driver class
One limitation of the current IPM API is that it is assuming that the
hardware is only exporting one single channel through which the data can
be sent or signalling can happen.

If the hardware supports multiple channels, the IPM device must be
instantiated (possibly in the DT) several times, one for each channel to
be able to send data through multiple channels using the same hw
peripheral. Also in the current IPM API only one callback can be
registered, that means that only one driver is controlling all the
signalling happening on all the channels.

This patch is introducing a new MBOX API that is supporting
multi-channel signalling and data exachange leveraging and extending the
previous (and outdated) IPM API.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-27 18:27:21 +02:00
Flavio Ceolin 9239fd4a90 pm: device: Simplify device pm states
As discussed in issues/38619, this commit aims to simplify device
power management. It was removed PM_DEVICE_SATE_LOW_POWER.
The power subsystem now doesn't need to figure out which device state to
use of a given system power state. It just suspend and resume devices.

Devices now just need to respond to ACTIVE and SUSPEND and OFF actions
and they are free to use any particular substate they have when the
subsystem asks to suspend. They also don't need to worry about states
transitions (unless they have multiple substates) because the system
will just request them to suspend if they are active and vice-versa.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

rebase
2021-10-26 15:02:15 -05:00
Gerard Marull-Paretas 838380bb63 doc: fix C domain reference usage
THis patch fixes multiple issues when referencing to the C domain. In
some cases there were typos (e.g. missing :), in some others no domain
syntax was used for referencing, etc.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-26 10:57:45 +02:00
Gerard Marull-Paretas ea1f7b7184 doc: reference: add pinctrl API
Add pinctrl API documentation to the reference guides.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-25 15:26:47 -05:00
Peter Mitsis 1d8c1162c7 doc: Fix K_EVENT_DEFINE macro code-block example
Fixes the code-block example for K_EVENT_DEFINE() documentation
to show that it only takes one argument instead of three.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-20 17:44:12 -04:00
Peter Mitsis 3ff549d1a2 doc: events: Add events documention
Adds documentation for event objects. Events are posted to event
objects. Threads may wait on an event object for a specified set
of events.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-16 06:27:10 -04:00
Carlo Caione 43cb00df08 multi_heap: Introduce shared multi-heap memory pool manager
The shared multi-heap memory pool manager uses the multi-heap allocator
to manage a set of reserved memory regions with different capabilities /
attributes (cacheable, non-cacheable, etc...) defined in the DT.

The user can request allocation from the shared pool specifying the
capability / attribute of interest for the memory (cacheable /
non-cacheable memory, etc...)

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-12 07:44:46 -04:00
Johann Fischer a9442e5e20 doc: usb: add CDC ACM device support documentation
Add CDC ACM device support documentation.

Co-authored-by: Carles Cufí <carles.cufi@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:07 +02:00
Johann Fischer fb454d09bb doc: usb: refactor USB device support documentation structure
Move related areas to their own files and order
documentation logically from lower to upper layer.
Fix gross errors and inconsistencies.

Co-authored-by: Carles Cufí <carles.cufi@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:07 +02:00
Lauren Murphy a6dcf333a1 doc: misc fixes
Makes miscellaneous fixes to kernel and usermode documentation,
such as fixing broken links and adding clarifying wording.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-10-04 16:42:08 -04:00
Martí Bolívar 12351cb391 doc: devicetree release notes for 2.7
There's enough meat here to split the content up into areas:
devicetree.h itself, Python tooling changes, and bindings changes.

I also reworked the section describing vendor prefix fixes to use a
table, which I find more readable on a second pass through it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-02 20:00:28 -04:00
Andy Ross a8f02ed5ee doc: lib/os: Add overview docs for sys_multi_heap
Add a short section to the "heap" page detailing the new
sys_multi_heap utility.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-10-01 20:38:35 -04:00
Peter Mitsis 0153b7dc50 doc: Add deadline scheduling information
Adds information to the kernel scheduling documentation explaining
how a thread's deadline is used to determine the thread's relative
priority.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-09-30 17:01:09 -04:00
Robert Lubos 7abc68d432 doc: net: Remove obsolete note about sockets thread-safety status
The socket API was updated with mutex protection, however this
was not reflected in the documentation. Remove the obsolete note on the
thread-safety status of the socket API, to prevent confusion.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-09-27 10:25:59 -04:00
Anas Nashif 4ffb90f202 doc: pm: rework main documentation
Minor edits and remove old terminology of central and distributed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-09-09 08:06:36 -04:00
Anas Nashif f4cf104e59 doc: power management: remove mention of tickless-idle
Tickless Idle was removed, so remove this last mention of it in the
docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-09-09 08:06:36 -04:00
Flavio Ceolin d9d5c41294 pm: device: Remove transitional states
PM_DEVICE_STATE_RESUMING and PM_DEVICE_STATE_SUSPENDING
are transitional states and are only used in device runtime. Remove it
and use device flag to keep track of a transition.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-27 17:47:10 -04:00
Arvin Farahmand 419b103dd6 drivers: Add mdio API
This commit adds support for MDIO bus. The bus is used by Ethernet
MACs to communicate with PHYs.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-08-27 11:43:48 -04:00
Flavio Ceolin c42cde5b69 kernel: work_q: Fix k_work_queue_start documentation
Inform that the queue has to be initialized in zeroed memory or with
the k_work_queue_init before use.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-25 22:07:04 -04:00
Martí Bolívar e0b41a8f51 doc: document devicetree/pinctrl.h macros
Add a new section in the API reference for the newly added
devicetree/pinctrl.h macros.

Amend macros.bnf in the guide to reflect the new generated macros for
getting at pinctrl information by name.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-25 18:09:00 -04:00
Johann Fischer 9ad610d1a7 bluetooth: remove Kconfig options CONFIG_BT_*_ON_DEV_NAME
Follow up on commit bfd45e5b8c
("drivers: remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME")
Remove Kconfig options
CONFIG_BT_UART_ON_DEV_NAME and CONFIG_BT_MONITOR_ON_DEV_NAME
since all UART drivers are converted to devicetree and we can just use
DEVICE_DT_GET(DT_CHOSEN(zephyr_bt_uart)) and
DEVICE_DT_GET(DT_CHOSEN(zephyr_bt_mon_uart)).

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-25 18:05:17 -04:00
Flavio Ceolin 93e674e373 docs: pm: Fix system pm diagram
The device pm actions (low_power or suspend) were switched. Also,
added SOFT_OFF to the suspend action.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-24 22:29:34 -04:00
Johann Fischer 741ae93ce2 shell: remove Kconfig option CONFIG_UART_SHELL_ON_DEV_NAME
Follow up on commit bfd45e5b8c
("drivers: remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME")
Now we can also remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME
since all UART drivers are converted to devicetree and we can just use
DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart)).

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-24 17:15:58 -04:00
Anas Nashif eef51a8958 doc: kernel: move meta-irq doc to threads
Move this to where priorities are being discussed to keep things in
context and to have all priority types documented in 1 place.

Fixes #21648

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-08-24 06:59:13 -04:00
Michał Barnaś 5a1fcb609c doc: replace courge with corge
Grault and corge are both syntactical variables used globally.
Courge is misspelling of corge.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2021-08-23 18:54:27 -04:00
Michał Barnaś 1b06477832 doc: change functions arguments in drivers documentation
Fix functions arguments in documentation to match
order of their real declarations

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2021-08-23 18:54:27 -04:00
Johann Fischer bfd45e5b8c drivers: remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME
Remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-23 18:53:47 -04:00
Johann Fischer f460848002 net: ot: rework NCP interface configuration
Rework NCP interface configuration and NCP sample. Remove
CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_DEV_NAME and
CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_ACM Kconfig
options in favor of chosen node zephyr,ot-uart usage.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-23 18:53:47 -04:00
Emil Obalski 6f4f1dc230 logging: Add configurable logging thread delay
This patch adds confiugurable delay when starting log processing
thread.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2021-08-13 11:19:27 -04:00
Fabio Baltieri f6d7c38adb doc: iterable_sections: add an API example
Expand the iterable sections documentation by adding a usage example.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2021-08-12 17:47:04 -04:00
Flavio Ceolin 1c6507afa8 doc: pm: Add wakeup information
Add documentation for wakeup sources.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-11 19:39:13 -04:00