Commit graph

17,121 commits

Author SHA1 Message Date
Måns Ansgariusson
98917a022b tracing: Remove retired k_pipe tracing api
The old k_pipe api was retired in #95408, the tracing hooks should be
removed as well.

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2025-10-08 08:44:11 +02:00
Khanh Nguyen
fa8ea53fdb dts: bindings: gpio: add ArduCam FFC-40 pin connector binding
Add a devicetree binding and corresponding dt-bindings header for
the ArduCam FFC-40 pin GPIO connector used by camera shields.

- Add dts binding schema for arducam,ffc-40pin-connector
- Add dt-bindings header with GPIO pin definitions

Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
2025-10-08 08:44:02 +02:00
Titouan Christophe
b0fa1be5b0 net: lib: midi2: new Network MIDI 2.0 host stack
Add a new network protocol for MIDI2.0 over the network, using UDP sockets.
This allows Zephyr to host a UMP endpoint on the network, which can be
invited by UMP clients to exchange MIDI2.0 data.

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-10-08 08:42:27 +02:00
Titouan Christophe
5e83d222b6 lib: midi2: new UMP Stream responder library
Add a new top-level, transport independent library to respond to UMP Stream
Discovery messages. This allows MIDI2.0 clients to discover UMP endpoints
hosted on Zephyr over the UMP protocol.

The endpoint specification can be gathered from the device tree, so that
the same information used to generate USB descriptors in usb-midi2.0
can be delivered over UMP Stream.

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-10-08 08:42:27 +02:00
Titouan Christophe
4b04b74bcd audio: midi: improve API documentation
Improve the API documentation for Universal MIDI Packets definitions:

- Add link to the reference document, and make it referenceable in doxygen
- Use BIT_MASK macro instead of hexadecimal litterals to better convey the
  length of various fields within UMP packets
- Add more cross-references where possible
- Use @remark when applicable

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-10-08 08:42:27 +02:00
Siwei Yang
4b71cf9822 lib: smf: add API to get the current leaf and executing state
Retrieve the current leaf state by calling `smf_get_current_leaf_state`
and the state which is currently-executing by calling
`smf_get_current_executing_state`.

Signed-off-by: Siwei Yang <yswysc@gmail.com>
2025-10-07 22:58:58 -04:00
Jakub Zymelka
e5ecbd2112 drivers comparator: nordic: Align drivers to changed analog input types
External analog input types changed from `string` to `int`.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2025-10-07 22:58:20 -04:00
Jakub Zymelka
d85bdb7ee9 dts: bindings: comparator: nordic: Change inputs type to int
Unify external analog inputs type to be consistent
in COMP, LPCOMP and SAADC nordic drivers.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2025-10-07 22:58:20 -04:00
Quang Le
77c1aed630 drivers: clock control: Add Clock Control support for RZ/N2L, T2M
Add Clock Control driver support for Renesas RZ/N2L, T2M

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-10-07 22:58:03 -04:00
Anas Nashif
bf82f7ffac copyrights: fix copyright line
Add space before (c) to allow correct parsing by linters.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-07 22:53:45 -04:00
Jordan Yates
83375a8f86 modem: chat: add modem_chat_is_running
Add a helper function to query if the chat instance is currently running
a script.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-07 14:06:37 +02:00
Andrzej Puzdrowski
418eed0f90 arch/arm: introduce the pre-stack/RAM init hook
Introduce hook for customize reset.S code even before stack is
initialized or RAM is accessed. Hook can be enabled using
CONFIG_SOC_EARLY_RESET_HOOK=y.
Hook implementation is by soc_early_reset_hook() function which should
be provided by custom code.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2025-10-07 12:50:10 +02:00
Pieter De Gendt
6a4b5cd3d3 net: lib: coap: Add packet pointer to client response callback data
Pass a pointer to the CoAP packet in the response data. This allows
callback function to inspect for CoAP options.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-07 11:00:50 +02:00
Pieter De Gendt
cbef8679f4 net: lib: coap: Convert client response callback arguments to struct
Make it easier to modify the response callback data by passing it as a
struct pointer rather than a long list of arguments.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-07 11:00:50 +02:00
Charles Hardin
2bfd76425a net: ip: account for the size in the inet_ntop code path
The code was writing to the dst without a verification check on
size which is not appropriate. The guard on the arguements should
be enforced and so just ensure the size is larger then the
definition of the strings from POSIX and return an error in those
cases.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
2025-10-07 10:59:08 +02:00
Loic Domaigne
c123d983d1 include: kernel: doc: improve slab API "isr-ok" documentation
As discussed on Discord, certain k_mem_slab* APIs are ISR-OK, but not
marked as such. After APIs review, the following functions should be
ISR-OK:
- k_mem_slab_free
- k_mem_slab_num_used_get
- k_mem_slab_max_used_get
- k_mem_slab_num_free_get
- k_mem_slab_runtime_stats_get
- k_mem_slab_runtime_stats_reset_max

Added the Doxygen marker where needed.

Signed-off-by: Loic Domaigne <tech@domaigne.com>
2025-10-06 20:17:27 -04:00
Emil Gydesen
6c870b071a Bluetooth: Remove CONFIG_BT_BUF_ACL_RX_COUNT
Remove the deprecated CONFIG_BT_BUF_ACL_RX_COUNT config
as it has been deprecated since 4.1

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-06 20:17:14 -04:00
Daniel Leung
36413cdbf7 arm: linker: add snippets-text-sections.ld to cortex_a_r, arm64
Adds snippets-text-sections.ld to arm/cortex_a_r and arm64
linker scripts.

For now, this is for the memory mapping test.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-10-06 20:16:31 -04:00
Daniel Leung
55a904882f x86: linker: add snippets-text-sections.ld
Adds snippets-text-sections.ld to x86 linker scripts.
For now, this is for the memory mapping test.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-10-06 20:16:31 -04:00
Pieter De Gendt
05a605021a nvmem: Introduce new subsystem for Non-Volatile Memory layer
This commit adds the NVMEM subsystem with a basic implementation for use
with EEPROM devices.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-06 15:09:30 -04:00
Andriy Gelman
f4b3d3946d devicetree: Add nvmem-consumer
Adds property nvmem-cells for referencing a node that stores some
configuration information. A typical use case is the reading of MAC
address from an EEPROM device.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-06 15:09:30 -04:00
Emil Gydesen
360880b7c7 Bluetooth: Host: Remove bt_le_set_auto_conn
Remove the deprecated function bt_le_set_auto_conn
as it has been deprecated since 4.1.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-06 20:01:04 +03:00
Jukka Rissanen
c546c1cad1 net: socket: Change socklen_t to be 4 bytes long
There is an issue when zephyr is compiled with native_sim_64 where
size_t is 8 bytes. The socklen_t in specified as 4 bytes in Linux
even for 64 bit builds so we have a conflict between Linux and Zephyr.
To make things work properly, define socklen_t as uint32_t in order to
align with Linux. Four bytes is enough for socket address length anyway.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-10-06 09:38:01 +02:00
Jordan Yates
f047a412e0 modem: cmux: auto calculate work buffer sizes
Automatically size the CMUX work buffers based on
`CONFIG_MODEM_CMUX_MTU`. This eliminates a Kconfig variable that would
otherwise need to manually be kept in sync. The option to extend the
size of these buffers is still provided through
`CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE_EXTRA`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-06 09:37:26 +02:00
Jordan Yates
4b39be61f1 cellular: extend registration status definitions
Extend the registration status definitions and explicitly tie them to
the values defined in 3GPP TS 27.007. Definitions were copied from
version v18.6.0.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-06 09:37:00 +02:00
Jordan Yates
e15a65ca23 cellular: update access technologies
Update the defined access technologies to align with the 3GPP standard
TS 27.007. Definitions were copied from version v18.6.0.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-06 09:37:00 +02:00
Jilay Pandya
ee909efaf8 tests: stepper_api: drop test_run_zero_step_interval_correct_position
Setting 0 as microstep interval is invalid. If microstep_interval is
not set then the motion related functions should return -EINVAL.

drop test_run_zero_step_interval_correct_position

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-10-06 09:36:35 +02:00
Shawn Huang
f7412dc0df logging: allow simplified logging of backend
This allows no timestamps and level prefixes in backend log output.

Signed-off-by: Shawn Huang <shawn.huang724@realtek.com>
2025-10-06 09:36:23 +02:00
Pieter De Gendt
7eba25f472 include: zephyr: toolchain: Introduce macros to ignore -Wcast-qual
Allow enabling/disabling the -Wcast-qual warning, for example to cast away
constness.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-05 20:02:08 -04:00
Gustavo Romero
139407f818 instrumentation: Add instrumentation subsystem
This commit adds the instrumentation subsystem.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2025-10-05 06:18:25 -04:00
Kevin Townsend
217bb19651 toolchain: gcc: Add __no_instrumentation__ definition
Adds a new '__no_instrumentation__' preprocessor definition for GCC,
mapping it to '__attribute__((__no_instrument_function__))'.

This new macro is used to disable code instrumentation (enabled when
'-finstrument-functions' flag is passed to the compiler) for specific
functions when placed before a function definition.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
2025-10-05 06:18:25 -04:00
Stefan Gloor
ea499caa25 sys: cbprintf: logging: fix equivalent branches in argify macro
The ((0) ? (arg) : (arg)) compiler trick leads to a codechecker
violation:

"conditional operator with identical true and false expressions"

Replace it by ((0) ? (0) : (arg)) to work around this issue.

Signed-off-by: Stefan Gloor <stefan.gloor@siemens.com>
2025-10-03 21:19:47 -04:00
Ali Hozhabri
f9655654ab drivers: Fix the improper use of CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
Fix the improper use of CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC for STM32WB0
drivers due to the misunderstanding of its definition.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Firas Sammoura
2d1cfe8911 include: util: Applied clang-formatting
This commit applies clang-format to file include/zephyr/sys/util.h
to align them with the latest Zephyr coding style guidelines.

Signed-off-by: Firas Sammoura <fsammoura@google.com>
2025-10-03 21:14:29 -04:00
Fabio Baltieri
d906376640 sys: util: add Z_INTERNAL_MAX and Z_INTERNAL_MIN
Add two internal Z_INTERNAL_MAX and Z_INTERNAL_MIN macros and use those
for implementing the actual MIN and MAX. This allows a downstream
application to undefine and redefine MIN and MAX, for example to define
them to min and max, which is useful if it relies on MIN and MAX to be
the single call version.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-03 21:14:11 -04:00
Fabio Baltieri
7e0d8f9119 sys: util: add min3 and max3 single evaluation macros
Add three argument variants of the single evaluation min and max, seems
like there's few of these in the code we may as well have them.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-03 21:14:11 -04:00
Fabio Baltieri
c576b090b0 sys: util: add support for nested min/max
Add support for nested min/max by using unique automatic variables. This
is heavily inspired by the Linux implementation, just reimplemented from
scratch using the Zephyr internal APIs.

Link: https://elixir.bootlin.com/linux/v6.16.8/source/include/linux/minmax.h#L314-L315
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-03 21:14:11 -04:00
Fabio Baltieri
37717b229f sys: util: rename Z_MIN Z_MAX Z_CLAMP to min max and clamp
Rename these three macros to an unprefixed lower-case variant. This is
normally not done for Zephyr macros (see container_of) but in this case
it seems like a good idea to adopt the lowercase names to:

1. have the same convention as the equivalent Linux macros, helping devs
   working cross project recognizing (mis)use patterns.
2. make it somewhat intuitive that the lowercase ones are meant to be
   used in functions while the uppercase ones are to be used for static
   evaluation.

Add few c++ guards to avoid colliding with std::min and std::max.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-03 21:14:11 -04:00
Fabio Baltieri
25578a0413 sys: util: move Z_MIN, Z_MAX, Z_CLAMP into util.h
These three are single evaluation versiono of MIN, MAX and CLAMP, they
are defined in toolchain headers as they use typeof [1] and statement
expressions [2], which are compiler extensions, but given that these are
used by other macros in util.h as well, it seems to be fair to assume
that these are supported by all compilers used with Zephyr today.

[1] https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
[2] https://gcc.gnu.org/onlinedocs/gcc/Typeof.html

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-03 21:14:11 -04:00
Kevin ORourke
f5a783c1df net: mqtt: Remove misleading comment
Setting the peer hostname to NULL does not skip hostname verification.
After discussion in the issue it was agreed that it's better to remove
this comment than to implement skipping hostname verification.

Also fixed a typo in the remaining part of the comment.

Fixes: #96853

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
2025-10-03 21:05:01 -04:00
Pierrick Guillaume
176e2a424f drivers: hwspinlock: add zephyr spinlock per hwspinlock
HWSPINLOCK are used to protect accesses to shared resources between
clusters. However, we don't want to sleep or be preempted while holding
a HWSPINLOCK. This means we need to lock IRQs while holding the
HWSPINLOCK.
Moreover, in an SMP context, we need to protect accesses to a HWSPINLOCK
between cores, so it is not possible to lock or release the same
HWSPINLOCK multiple times.

Introduce a zephyr spinlock per HWSPINLOCK to counter those issues. User
facing APIs have been udpated to take into account those changes, and a new
hwspinlock_dt_spec struct has been added to align with other subsystem on
the management of complex device's data.

Take the opportunity to rename public APIs to match the naming scheme of
normal zephyr spinlocks:
hwspinlock_lock -> hw_spin_lock
hwspinlock_trylock -> hw_spin_trylock
hwspinlock_unlock -> hw_spin_unlock

Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
2025-10-03 12:52:18 +03:00
Pierrick Guillaume
36e5672ee6 devicetree: add hwspinlock helpers
Add helpers to access hwspinlock controller and id from a phandle array.

Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
2025-10-03 12:52:18 +03:00
Pierrick Guillaume
403b4ef84b drivers: hwspinlock: remove syscall support
HW spinlocks are not supposed to be used by user application. They are used
to protect shared resources between clusters. Consumer of such spinlocks
should be other drivers in kernel space.
Moreover, syscalls were actually not generated properly because of
a missing call to zephyr_syscall_header() in CMakeLists.txt.

Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
2025-10-03 12:52:18 +03:00
Alvis Sun
6664958107 drivers: flash: npcx: support GDMA operation for NPCXn and NPCKn
1. Introduced GDMA support for efficient data transfer in the
NPCX FIU QSPI driver.
2. Refactor flash driver mutex handling to enhance concurrency safety,
preventing other threads from preempting erase/write operations during
UMA until mutex release.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2025-10-03 12:51:55 +03:00
Alexander Kozhinov
f53c283acb opamp: introduce new mode
Some MCUs are supporting external resistor dividers for gain setting in
standalone mode.
Add OPAMP_FUNCTIONAL_MODE_STANDALONE to the opamp_functional_mode enum.

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2025-10-02 16:48:49 +02:00
Alexander Kozhinov
783d4a141f opamp: adjust modes enum to avoid clash with STM32 HAL macros
In the enum opamp_functional_mode becomes prefix
OPAMP_FUNCTIONAL_MODE_ to avoid clash with STM32 HAL macros
The suffix _MODE were removed to make the names shorter

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2025-10-02 16:48:49 +02:00
Peter van der Perk
dd9eb37ad9 include: arch: arm: cortex_m: Move ITCM before .text
Reordered ITCM section to appear before .text in the ARM Cortex-M linker
script.

This allows functions placed in ITCM via *(.text.<function_name>) using
snippets-itcm-section.ld to avoid being absorbed into the default .text
section, enabling more flexible code placement.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-10-02 15:15:28 +03:00
Lin Yu-Cheng
2d72d86ba2 serial: rts5912: implement power management
support uart wake up function

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-10-02 11:47:32 +03:00
Lin Yu-Cheng
3372459e28 serial: uart_ns16550: add uart_ns16550_get_port() function
For user to get the register address of the device by this function

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-10-02 11:47:32 +03:00
Lin Yu-Cheng
5bca3095ac gpio: rts5912: implement power management
support gpio wake up function.
change init stage from POST_KERNEL to PRE_KERNEL_1
because uart wrap init need to use the gpio functions.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-10-02 11:47:32 +03:00