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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>