Refactors all of the on-chip GPIO drivers to use a shared driver class
initialization priority configuration, CONFIG_GPIO_INIT_PRIORITY, to
allow configuring GPIO drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.
Most drivers previously used CONFIG_KERNEL_INIT_PRIORITY_DEFAULT or
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, therefore the default for this new
option is the lower of the two, which means earlier initialization.
Driver-specific options for off-chip I2C- or SPI-based GPIO drivers are
left intact because they often need to be initialized at a different
priority than on-chip GPIO drivers.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
- Add APIs to the `subsys_tracing` group
- Add some missing documentation
- Minor header file style fixes
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- Add tracing to the subsys group
- Use `subsys_tracing` "namespace"
- Some minor header style improvements
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This change updates the atomic tests to validate 32-bits on
32-bit architectures and 64-bits on 64-bit architectures.
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
The audio/sof Zephyr module needed print specifiers updated
for the transition from `int` to `long` for `atomic_t`
which supports 32-bit atomics and also 64-bit atomics.
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
With the change of `atomic_t` from `int` to `long` there
were a few places where there was some type aliasing
occuring.
Update CMSIS to use `atomic_t` rather than `int` for all
atomic operations.
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
This driver aliases a regular `int` to `atomic_t` but that
should be updated to `long` with the change to `atomic_t`.
Added a comment to highlight that the variable was aliased.
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
The print specifier for `atomic_t` should be updated
to `%ld`, `%lu`, or `%lx` to account for the type
change of `atomic_t` to `long`.
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
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>
With this change, `atomic_t` is 32-bit for 32-bit architectures
and 64-bit for 64-bit architectures. More specifically,
`sizeof(atomic_t) == sizeof(long)`.
Fixes#39530
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
In commit 918a574c88 ("clock: add k_cycle_get_64") this driver was
augmented with a count64() method to get a 64 bit cycle output from
the two-32-bit-word device registers.
Unfortunately it appeared to be trying to use a spinlock around the
two (low/high) reads to protect against overflow. But that doesn't
work: spinlocks protect against other CPU code using the same
spinlock, not against a hardware counter that is incrementing in real
time!
Thankfully there was already a count() routine in place that does a
detect-overflow-and-retry loop to solve this. Use that.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
If source_id is -1, which is a valid value, it will be
converted to unsigned since it's compared with an unsigned
which means it will be huge and asserts will trigger. To avoid
this, we typecast the unsigned part to signed.
Resolves#40115
Signed-off-by: Emil Lindqvist <emil@lindq.gr>
Adjust the logging test case code to make them the same as other test
cases which deal with the CONFIG_USERSPACE used. It does not change
the original test logic, but just the file structure changed.
It also corrects the duplicated testsuite name of logging testcases.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
- use zephyr runner
- reduce number of builders and adapt matrix to be platform based
- check for changed files and optimize run accordingly, should reduce
build times depending on what has changed
- If no source has changed, skip twister completely.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Enable ISO (unicast and broadcast) for the BT shell.
This allows users to use the ISO features (if supported by
the controller) in the shell.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
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>
Add a new and more extensive guide that describes the device runtime
API. It contains a brief introduction, API design principles and goals,
some example sequence diagrams and usage guidelines.
While the API still needs important additions, such a guide will
hopefully guide developers when trying to deal with device PM in Zephyr.
Note: sequence diagrams have been created using PlantUML (2021 version).
The rendered SVG diagrams embed the original code if they have to be
edited and re-rendered.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The API is already rendered automatically by breathe, so do not manually
add definitions again.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The API is already rendered automatically by breathe, so do not
duplicate it manually.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- Remove duplicated information (e.g. enum list, available in the API
docs)
- Use C domain to 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>
Update crypto modules prompt strings to follow the Kconfig guidelines.
"For a Kconfig symbol that enables a driver/subsystem FOO, consider
having just “Foo” as the prompt, instead of “Enable Foo support” or the
like."
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The ASSYMETRIC crypto module has been split in two, for sign and
encrypt. Update Kconfig entries to match.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove CRYPTO_GENERATOR_MODULE Kconfig which has been removed.
Its features are covered by TFM_CRYPTO_KEY_MODULE and
CRYPTO_KEY_DERIVATION_MODULE.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Adds support for reading multiple variable length characteristics.
Previously read_multiple() always set the variable flag to false.
This is used by GATT/CL/GAT/BV-03-C.
Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
Setting variables for console is platform dependent. Having
uninterested platform mixed in is too noisy and hard to read. Follow
"Getting Started Guide" pattern to use tabs to group things.
Getting Started Guide uses "Ubuntu" to reference Linux based platform
but Application Development uses "Linux". This commit doesn't change
the choice of words and sticks to "Linux".
The order of the platfroms is, OTOH, unified to "Linux/macOS" from
"macOS/Linux".
This commit only changes formatting, no wording change.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
This commit adds required config files for Renode simulation and adds
missing QEMU_binary_suffix. It also adds flash and newlib tags to
ignore_tags, as flash chip is currently not provided by default in
Renode for FE310 and newlib does not fit into the available memory.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
New targets have been added that allow the user to choose a specific
emulator platform. Inform about this in the docs.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Currently there is no way to support running a board on multiple
emulation platforms nor to choose a desired emulation platform for the
simulation to be run on. This commit introduces a new
SUPPORTED_EMU_PLATFORMS list, which defines available emulation
platforms for a given board.
Fixes#12375.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
page_frame_dump() and z_page_frames_dump() are used for
debug print, so there is no need to cover those funcs.
__weak function is also excluded, every test overrides it.
Signed-off-by: Lixin Guo <lixinx.guo@intel.com>
These drivers are no longer enabled for every application,
even hello_world. The right SoC-specific drivers are
enabled in applications that need them.
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Always flash the merged hex file.
This fixes flashing for samples. Before "west flash" only worked for
tests.
I don't know why this was not done from the get-go.
This also fixes builds that enables CONFIG_TFM_REGRESSION_NS, which will
use the tfm_ns application file instead of the zephyr application, and
will merge tfm_ns hex into the merged hex file. Otherwise the wrong
application hex file will be flashed.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>