Commit graph

17,121 commits

Author SHA1 Message Date
Nicolas VINCENT
ac254d1163 doc: flash: Fix typo
the off argument of flash_area_write is used to *write*

Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
2023-04-24 13:35:07 +02:00
Pavel Vasilyev
c4fa085ec4 Bluetooth: Mesh: Add async API for Large Comp Data Client
Add asynchronous API for Large Composition Data Client.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-04-24 13:31:27 +02:00
Aleksander Wasaznik
9b62cc6899 Bluetooth: l2cap.h: Document bt_l2cap_le_chan.rx/tx
Adding extra documentation to bt_l2cap_le_chan.rx/tx that will help
readers understand what those values mean in practice.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-04-24 13:31:18 +02:00
Aleksander Wasaznik
b1005460f7 Bluetooth: Host: Document bt_set_name kconfig requirements
Without `CONFIG_BT_DEVICE_NAME_DYNAMIC`, `bt_set_name` always return
`-ENOMEM`. Users looking to use `bt_set_name` should be pointed to the
relevant kconfig that enables its useful operation.

Also add a "see also" pointer to `CONFIG_BT_DEVICE_NAME_MAX`, which
controls the maximum length of the name passed to `bt_set_name`.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-04-24 13:31:18 +02:00
Jamie McCrae
7e11b6392b retention: Add boot mode system
Adds a boot mode system which allows for redirecting the boot
target of a device depending upon the state of a retained value.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-24 13:27:53 +02:00
Jamie McCrae
64f4404481 retention: Add retention system
Adds a retention system which builds on top of retained_mem
drivers to allow partitioning of areas and data integrity with
magic header prefixes and checksum of stored data.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-24 13:27:53 +02:00
Dawid Niedzwiecki
7f7e48e66e mgmt: ec_host_cmd: create chosen string per backend
Create strings to set the chosen node per backend. It is done for
better clarity.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-04-21 16:29:59 +02:00
Dawid Niedzwiecki
1d62002bba mgmt: ec_host_cmd: update configs naming
Just use better namings for the buffer sizes configs.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-04-21 16:29:59 +02:00
Krishna T
f7dbc59e04 net: wifi: Fix backward compatibility
Changing this enumeration breaks backward compatibility with Wi-Fi shell
as we rely on these values to decide the Wi-Fi security.

Add them at the end to fix backward compatibility.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2023-04-21 16:26:44 +02:00
Kumar Gala
30653bfbed console: uart_mux: Use TYPE_SECTION macros for uart_mux
Clean up uart_mux to utilize TYPE_SECTION macros for handling sections.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-21 12:55:38 +02:00
Peter Mitsis
3a08d9620a logging: Change Z_LOG_MSG_STACK_CREATE() variable
"flags" is a common variable name and is more likely to be passed
to LOG_DBG() or LOG_ERR() as a parameter. Changing the name of
the local variable created in Z_LOG_MSG_STACK_CREATE() from "flags"
to "_options" make it less likely that someone will pass a parameter
of that name to LOG_DBG() or LOG_ERR() and have that passed value
occluded by the variable created in Z_LOG_MSG_STACK_CREATE.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-04-21 10:46:43 +02:00
Emil Gydesen
4661e8f480 include: byteorder: Fix incorrect doc for sys_get_le24
The documentation said that it was for big-endian when it
really is for little-endian.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-21 09:40:21 +02:00
Carlo Caione
c2ec3d49cd arm64: cache: Enable full inlining of the cache ops
Move all the cache functions to a standalone header to allow for the
inlining of these functions.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-04-20 14:56:09 -04:00
Carlo Caione
d3ed4a784b cache: Rework headers and force inlining
The current headers do not allow the full inlining of the cache
functions. Rework and cleanup the headers to allow for the full
inlining.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-04-20 14:56:09 -04:00
Carlo Caione
de90dfccbc syscall: Introduce __syscall_always_inline
Sometimes we want to force the inlining of a __syscall. Introduce a new
__syscall_always_inline symbol to do that.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-04-20 14:56:09 -04:00
Bjarki Arge Andreasen
418da35697 include/drivers/rtc.h: Refined documentation
Hid type definitions of API functions from documentation
using INTERNAL_HIDDEN condition.

Changed nested groups inside rtc_interface group to use
@name instead.

Use @anchor to reference definitions for
RTC_ALARM_TIME_MASK.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-20 11:43:35 +02:00
Guennadi Liakhovetski
a0a0739992 log: fix a harmless bug
Z_LOG2() has a typo, confusing & with &&. The result is the same but
using && is more logical in that case and it eliminates a flood of

warning: dubious: x & !y

static analyser warnings. Also compare to 0 explicitly to fix a
coding style violation.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-04-20 10:52:18 +02:00
Kumar Gala
caea9dc196 logging: Use TYPE_SECTION macros for log strings
Clean up log_strings to utilize macros for handling sections.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-20 10:52:07 +02:00
Kumar Gala
301d0c4712 net: buf: cleanup net_buf_pool use of iterable section
Cleanup linker scripts for net_buf_pool section to use the linker
script related iterable section macros.

Also replace _net_buf_pool_list with macro's instead to complete
iterable section usage.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-20 10:50:04 +02:00
Emil Gydesen
da9096c103 Bluetooth: BAP: Add guard of BIS specific CC data
The data can only be used if CONFIG_BT_CODEC_MAX_DATA_COUNT
is non-0.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-20 10:47:10 +02:00
Pieter De Gendt
6e0dfe50bf include: net: dns_sd: Explicit DNS service struct members
Convert the DNS service struct initialization to use explicit
member names.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-04-19 11:55:40 -04:00
Kumar Gala
eec299c130 pm: Use TYPE_SECTION macros for pm_device_slots
Clean up pm_device_slots to utilize TYPE_SECTION macros for handling
sections.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-19 17:15:29 +02:00
Eduardo Montoya
760d8fc970 modules: openthread: align received frame timestamp to SFD
OpenThread requires that the `mTimestamp` parameter from the `mRxInfo`
struct points to the end of SFD, i.e. beggining of PHR.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2023-04-19 17:15:02 +02:00
Kumar Gala
47cf00058e fb: cfb: Use TYPE_SECTION macros for cfb_fonts
Clean up cfb_fonts to utilize TYPE_SECTION macros for handling sections.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-19 17:14:54 +02:00
Kumar Gala
7469ad426a drivers: pcie: Use TYPE_SECTION macros for irq_alloc
Clean up irq_alloc to utilize TYPE_SECTION macros for handling sections.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-19 17:14:46 +02:00
Kumar Gala
5b5fbc4c11 shell: remove dead linker section for shell
The initshell sections in the linker scripts where associated with theo
old shell code.  The old shell code has been removed for some time so
remove references to initshell in the linker scripts and size_calc.py

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-19 17:14:37 +02:00
Victor Chavez
b8e1ee1042 device: Fixed CPP compatiblity for Z_DEVICE_HANDLES_DEFINE
By using the __weak attribute with the macro `Z_DEVICE_HANDLES_DEFINE`
C++ throws the error "weak declaration must be public". This change
adds the keyword extern if the macro is included in a C++ source
file.

Signed-off-by: Victor Chavez <chavez-bermudez@fh-aachen.de>
2023-04-19 10:02:12 +02:00
Victor Chavez
bd59170402 device: Fixed CPP compatiblity for Z_DEVICE_INIT
The macro `Z_DEVICE_INIT` is not compatible with C++ due to
initialization order of the struct device. This commit fixes
the initialization for compatiblity with C++.

Signed-off-by: Victor Chavez <chavez-bermudez@fh-aachen.de>
2023-04-19 10:02:12 +02:00
Emil Gydesen
5e19ef0748 Bluetooth: CAP: Remove packing from unicast audio start param
The packing field was never used.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-19 10:01:06 +02:00
Gerard Marull-Paretas
1b73d1e0c6 drivers: can: allow NULL init function
Generic device API allows for NULL init function, do the same for I2C.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-19 10:00:25 +02:00
Gerard Marull-Paretas
40957e3b49 drivers: i2c: allow NULL init function
Generic device API allows for NULL init function, do the same for I2C.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-19 10:00:25 +02:00
Gerard Marull-Paretas
4d06166623 device: allow NULL init function
Some devices do not need to perform any initialization, so allow the
init function to be NULL. In this case, the initialization code will
just mark the device as initialized, i.e. ready.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-19 10:00:25 +02:00
Daniel DeGrasse
6f938f347b drivers: interrupt_controller: introduce PINT driver
Introduce PINT driver, for NXP pin interrupt and pattern match engine.
The driver currently supports only the pin interrupt feature of the
PINT.

Add DTS entires for the PINT on LPC and RT devices that support this
peripheral, and remove the interrupt defintions that are PINT specific
from the GPIO module on these devices.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-04-18 16:14:57 -05:00
Peter Hoyes
2f2f3edacd toolchain: gcc: Fix separator between directives on same line
The Arm assembler in binutils 2.40 contains a change [1] which affects
how multiple directives on the same line are parsed.

Previously, the following combination of directives parsed successfully:

    .code 32 .balign 4

With binutils 2.40, the following error is now seen:

    Error: junk at end of line, first unrecognised character is `.'

To fix, insert a semicolon after '.code 32', as there already is after
'.thumb'.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=a37854f9162fac592b669eda53f465fc190c9341

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
2023-04-18 12:22:21 -04:00
Kumar Gala
1105fa9092 rtio: Remove unused linker section
rtio is utilizing iterable sections so the explicit linker
code does not need to exist so we can remove it.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-18 12:21:24 -04:00
Kumar Gala
6b5139c4bb shell: Convert to using iterable sections
Convert handling of shell_root_cmds, shell_subcmds, and
shell_dynamic_subcmds to use iterable section macros.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-18 12:48:16 +02:00
Georges Oates_Larsen
7c4397ae79 net: conn_mgr: connectivity API
Allows L2s to declare generic association/connection routines
that can be bound by name to ifaces.

Allows L2-agnostic control over connectivity/association for
iface that support it.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-04-18 09:31:53 +02:00
Krzysztof Chruscinski
f167e5c9b4 logging: Fix LOG_RAW failing when logging is disabled
Macro was not taking into account case when logging was disabled
and it was failing to link in that case.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-04-17 22:24:08 -04:00
Andrzej Głąbek
8fba8aa535 drivers: flash: nrf_qspi_nor: Add custom API function to allow XIP
Normally, the driver deactivates the QSPI peripheral for periods when
no QSPI operation is performed. This is done to avoid increased current
consumption when the peripheral is idle. For the same reason, the base
clock on nRF53 Series SoCs (HFCLK192M) is configured for those periods
with the default /4 divider that cannot be used otherwise. However,
when XIP accesses are used, the driver must be prevented from doing
both these things as that would make XIP to fail. Hence, a function
is provided so that applications can inform the driver that XIP is
needed and the above idle actions should be suppressed.
This function (`nrf_qspi_nor_xip_enable()`) replaces the old one
(`nrf_qspi_nor_base_clock_div_force()`) that was intended for similar
purpose but after deactivation of the peripheral was introduced in
commit 95d867e8ed it became useless.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-04-17 16:43:16 +02:00
Johann Fischer
4c6a5e0fa3 usb: add a note about the return value of usb_transfer_sync()
The transfer completion callback does not provide a way to pass
transfer status to the transfer submitter.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-04-17 11:30:48 +02:00
romain pelletant
eab19663a9 net: lwm2m: add callback for send confirmation
Issue #52328

Signed-off-by: romain pelletant <romainp@kickmaker.net>
2023-04-17 11:29:14 +02:00
Kumar Gala
39ec490534 toolchain: common: iterable sections: Add generic type macros
Add a set of macros that can be utilized for any type and redefine
the struct macros to utilize these macros.  While the majority of
uses for iterable sections are for structs, there are some cases
where the elements of the section might be a union or some other
type.

Also added <STRUCT|TYPE>_SECTION_<START|END>_EXTERN helper macros to
give a common means to handle setting externs in rare case they
are needed.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-17 10:19:53 +02:00
Ajay Parida
d961a483c3 net: wifi_mgmt: fix for function name mismatch
changes for mismatch between .h and .c file in
function name..

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2023-04-17 10:17:37 +02:00
Théo Battrel
1008bf186b Bluetooth: Host: Define new macro for Bluetooth data
Add a new macro called `BT_DATA_SERIALIZED_SIZE` in `bluetooth.h` that
calculate the total size of a serialized `bt_data` given a `data_len`.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-04-17 10:15:04 +02:00
Andy Sinclair
0d68c86c95 drivers: gpio: npm1300: Initial driver for nPM1300 PMIC
Initial GPIO driver for NPM1300 PMIC

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-04-17 10:14:40 +02:00
Andy Sinclair
d1e201ccf6 drivers: regulator: npm1300: Initial driver for nPM1300 PMIC
Initial regulator driver for Nordic NPM1300 PMIC.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-04-17 10:14:40 +02:00
Gerard Marull-Paretas
667eeb11fb shell: fix MISRA 5.7 violations on struct shell
MISRA Rule 5.7 requires uniqueness of tag identifiers. Shell is
frequently problematic because many code uses `const struct shell
*shell`. This causes CI noise every time one of these shell files is
edited, so let's update all of them with `const struct shell *sh`
instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-14 12:21:08 +02:00
Jaroslaw Stelter
b8d9b833a2 intel_adsp: ace20_lnl: dmic: Add HDA channel map programming
Add new field to dai_config structure and function that
program it in HW register.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-04-13 20:51:10 -04:00
Paul Fagerburg
04611a5735 init: set init_entry.dev to NULL
[PR#51217](https://github.com/zephyrproject-rtos/zephyr/pull/51217)
changed the `init_entry` structure, but `Z_INIT_ENTRY_NAME` (called
by `SYS_INIT` or `SYS_INIT_NAMED`) does not initialize all of the
members of the struct, leading to errors when building with
`-Werror=missing-field-initializers`.

Change the macro to initialize the `dev` member to `NULL` so that
all members of the struct are initialized.

Signed-off-by: Paul Fagerburg <pfagerburg@google.com>
2023-04-13 17:36:29 -04:00
Gerard Marull-Paretas
6d192e50cf init/device: add missing __noasan
__noasan attribute was accidentally removed by
a5fd0d184a. Add it back as it is causing
some address sanitizer issues when using the LLVM toolchain.

Details on why this is needed can be found in
74cc534758.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-13 13:39:54 +02:00