Commit graph

17,121 commits

Author SHA1 Message Date
Jamie McCrae
20be667f16 mgmt: mcumgr: grp: settings_mgmt: Part revert settings save change
Partially reverts commit 7d2fb6c013,
it was originally thought that this commit added a method of saving
one specific key using the value that the device already has set,
but has been found to actually save the value that the user has
provided, bypassing the current value that the device has, which is
not compliant with the settings mgmt protocol, therefore remove
this change and it will need to be reworked in future to function
properly by saving one specific value from the device's current
configuration, not a user-specified value

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-10-29 20:18:20 +02:00
Pieter De Gendt
ca37494f09 include: zephyr: nvmem: Add retval doxygen to read/write functions
Document the return values for the read/write NVMEM functions.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-29 13:47:30 +02:00
Rob Barnes
5ce408b647 kernel: assert if k_current_get is called pre-kernel
k_current_get is not valid pre-kernel. It will return an invalid dummy
thread or invalid memory. The invalid memory case can occur when
CURRENT_THREAD_USE_TLS is enabled.

Assert in k_current_get when called pre-kernel so offending code may be
identified.

k_is_pre_kernel is moved up in kernel.h to avoid needing a prototype for
k_is_pre_kernel.

Signed-off-by: Rob Barnes <robbarnes@google.com>
2025-10-28 11:52:34 +02:00
Rob Barnes
ef844cee55 kernel: make k_is_pre_kernel safe to call from user mode
Make k_is_pre_kernel safe to call from user mode. Since
z_sys_post_kernel memory is not accessible to user threads, calling
k_is_pre_kernel would result in a memory access fault.

This change adds k_is_user_context guard. It can be assumed the system
is post-kernel if k_is_user_context is true.

Signed-off-by: Rob Barnes <robbarnes@google.com>
2025-10-28 11:52:34 +02:00
Tom Hughes
2487fe9a4d include: linker: Set eh_frame size to 0 when C++ exceptions are disabled
When building Zephyr with CONFIG_CPP_EXCEPTIONS=n and linking against a
libc++ built with support for exceptions, lld complains that the
eh_frame-related symbols are missing:

ld.lld: error: undefined symbol: __eh_frame_start
ld.lld: error: undefined symbol: __eh_frame_end
ld.lld: error: undefined symbol: __eh_frame_hdr_start
ld.lld: error: undefined symbol: __eh_frame_hdr_end

libunwind handles the zero size:

76e71e05d2/libunwind/src/AddressSpace.hpp (L520-L526)
76e71e05d2/libunwind/src/EHHeaderParser.hpp (L61-L64)

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-10-28 11:52:22 +02:00
Etienne Carriere
751711accc include: zephyr: sys: correct sys_test_bit() and friends description
Correct the documentation of sys_test_bit() and its derivative helper
functions (listed below) since these return a bit mask value instead of
an essentially boolean value as previosuly described.

In tree implementation do conform with that: the result of these
functions are always implicitly tested against being 0 or a non-zero
value.

Helper functions which documentation is modified are sys_test_bit(),
sys_test_and_set_bit(), sys_test_and_clear_bit(), sys_bitfield_test_bit(),
sys_bitfield_test_and_set_bit() and sys_bitfield_test_and_clear_bit().

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-10-28 11:52:01 +02:00
Qingsong Gou
d0ab7a2d55 dts: bindings: clock_control: fix sf32lb clock error
fix clock id definition and clock ids

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2025-10-27 16:17:03 -04:00
Emil Gydesen
02d0e96bf1 Bluetooth: BAP: Add bt_bap_unicast_client_unregister_cb
Add bt_bap_unicast_client_unregister_cb to unregister BAP
unicast client callbacks. This is required for unittests
to clean up between runs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-25 15:59:40 +03:00
Anas Nashif
e23d663b85 tracing: ctf: add condition variables
Add hooks for condition variables.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Felix Wang
659eccf5a3 drivers: clock_control: Configure STM clock
1.Add "mux-1-dc-0-div" and "mux-2-dc-0-div" property
 in mc_cgm device tree for STM clock divider setting
 and set these properties in frdm_mcxe31b.dts
2.Enable STM peripheral clock in mc_cgm_clock_control_on
 function
3.Support to get STM frequency from mc_cgm_get_subsys_rate
 function
4.Configure STM clock in mc_cgm_init function

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2025-10-25 10:47:09 +03:00
Yong Cong Sin
df1cb88eec arch: arc: add sys_write64/sys_read64 functions
Added sys_read64 and sys_write64 functions for 64-bit memory
operations when building for 64-bit.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2025-10-25 10:46:27 +03:00
Benjamin Cabé
010a7e3765 include: doc: fix trivial doxygen warnings
Fix incorrect/unbalanced usage of backticks in a bunch of headers
causing doxygen warnings.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-10-25 10:46:08 +03:00
Winteri Wang
6cfc76ffbf drivers: clock: ccm_rev2: add imx93 common clocks set support
Setup most clocks with common_clock_set_freq().
PLL and mux are preset.

Signed-off-by: Winteri Wang <dongjie.wang@nxp.com>
Signed-off-by: Ruoshan Shi <ruoshan.shi@nxp.com>
2025-10-24 20:19:17 -04:00
Brett Peterson
8e4e766c09 drivers: spi: add psc3 and pse84 support
- Updating spi_ifx_cat1_pdl driver to support psc3 and pse84 devices

Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
2025-10-24 20:17:57 -04:00
Benjamin Cabé
2d153c87e6 include: tracing: doxygen coverage and cleanup
Gets tracing API to 100% coverage as well as some wordsmithing to
improve readability.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-10-24 23:07:48 +03:00
Kim Seer Paller
2d141260de dts: bindings: adc: Add AD4170-4, AD4190-4, and AD4195-4 ADCs
Document the AD4170-4, AD4190-4, and AD4195-4 low noise, high precision
24-bit ADCs, each supporting 4 differential or 8 single-ended inputs,
integrated PGA (0.5-128). All devices feature internal and external
buffered references, operate from 4.75-5.25V analog and 1.7-5.25V
digital supply.

Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
2025-10-24 13:26:26 -04:00
Alain Volmat
a6ceee976e video: addition of video_transfer_buffer helper function
Addition of a helper function which takes care of dequeue
from a source video device and queue into a sink video device.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Guillaume Gautier
0cf6b7775a drivers: clock: stm32: remove adc prescaler setting
Now that the ADC prescaler are set within the driver using the clock
system, remove the specific setting of the prescaler from the clock driver.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 13:24:44 -04:00
Guillaume Gautier
b02dacf065 include: dt-bindings: clock: stm32: add adc prescaler for f1, f3, n6 and u3
This commit adds the RCC configurations for ADC prescaler for STM32F1, F3,
N6 and U3.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 13:24:44 -04:00
Guillaume Gautier
d891aad2ed include: dt-bindings: clock: stm32: rework STM32_DT_CLOCK_SELECT details
Reworks the way the STM32_DT_CLOCK_SELECT builds its elements. Instead of
taking a mask, it takes the MSB of the field. From the MSB and LSB, we
calculate the width of the field, and this width is then stored (instead
of the mask). This allows to gain space for higher values for the fields.

This larger space is necessary to add the selection of the ADC prescaler
on STM32N6 because it is an 8-bit long field.

The allowed width is from 1 to 8 (and internally stored as 0-7 to fit on
3 bits).

STM32_DT_CLKSEL_MASK_GET keeps the same name, since we still need the mask,
and returns the bitmask from the width with the BIT_MASK macro. Other
STM32_DT_CLKSEL_MASK_* macros are renamed with WIDTH.

All call to STM32_DT_CLOCK_SELECT are updated to reflect the change and use
a width instead of a mask.

This also fixes a few issues like STM32H7 MCO macros, and adds MCO_PRE for
STM32N6.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 13:24:44 -04:00
Khaoula Bidani
5e81c84a93 drivers: i2c: Support target error callbacks
Support I2C target error callback in I2C driver when
registered by the bus target consumer.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
2025-10-24 13:23:57 -04:00
Filip Kokosinski
67085f1e2a include/zephyr/instrumentation: add missing @return docstrings
This commit add missing `@return` docstrings to the instrumentation
subsystem public header.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-10-24 13:19:45 -04:00
Jérôme Pouiller
46b498ad16 drivers: adc: siwx91x: Fix clock name
All the clocks names on SiWx91x follow the pattern "SIWX91X_CLK_xxx".
SIWX91X_ADC_CLK was an exception.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-10-24 13:18:42 -04:00
Jeremy Dick
0a878179f7 drivers: mipi-dbi-spi: Fix initialization of GPIO CS
Access the correct node to get the SPI device GPIO CS.
It comes from the parent spi-dev node, not the bus

Signed-off-by: Jeremy Dick <jdick@pivotint.com>
2025-10-24 09:01:21 -07:00
Yong Cong Sin
643e09febf arch: riscv: streamline fatal handling code
`CONFIG_EXTRA_EXCEPTION_INFO` that was added in #78065 doesn't
seem necessary, as we were already storing and printing the
callee-saved-registers before that. All `CONFIG_EXTRA_EXCEPTION_INFO`
does in RISCV is to add an additional `_callee_saved_t *csf` in the
`struct arch_esf`, which overhead is negligible to what's being enabled
by `CONFIG_EXCEPTION_DEBUG`.

Let's remove `CONFIG_EXTRA_EXCEPTION_INFO`, and have that extra
`_callee_saved_t *csf` in the `struct arch_esf` as long as
`CONFIG_EXCEPTION_DEBUG` is enabled.

TL;DR: it doesn't make sense to not enable `CONFIG_EXTRA_EXCEPTION_INFO`
when `CONFIG_EXCEPTION_DEBUG` is enabled, so let's merge them.

Then, since `*csf` is always available in the `struct arch_esf` when
`CONFIG_EXCEPTION_DEBUG=y`, we can simply rely on that pointer in
`z_riscv_fatal_error()` instead of an additional argument in
`z_riscv_fatal_error_csf()`, rendering the latter redundant and thus
can be removed.

Additionally, save the callee-saved registers before jumping to
to `z_riscv_fault()`, so that callee-saved-registers are printed on
generic CPU exception as well.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2025-10-24 08:51:15 -07:00
Lyle Zhu
74e94fd8e9 Bluetooth: SDP: Optimize functions bt_sdp_get_XXX()
Use a combination of multiple helper functions to implement the
functionality of existing interfaces starting with `bt_sdp_get_`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-24 11:34:32 +02:00
Lyle Zhu
7f04884eab Bluetooth: SDP: Add helper functions to parse discovered record
The current implementation does not support multiple attributes with
the same attribute identifier in a discovered SDP record.

Add function `bt_sdp_record_parse()` to parse the received SDP record.

Add function `bt_sdp_has_attr()` to check if the specified attribute
identifier has been discovered.

Add function `bt_sdp_get_attr()` to get the attribute of specified
attribute identifier.

Add function `bt_sdp_attr_value_parse()` to parse the attribute value.

Add function `bt_sdp_attr_has_uuid()` to check if the attribute
contains the specified UUID.

Add function `bt_sdp_attr_read()` to read the value of the attribute.

Add function `bt_sdp_attr_addl_proto_parse()` to parse the protocol
descriptor from the additional protocol descriptor list.

Add function `bt_sdp_attr_addl_proto_count()` to get the protocol
descriptor count of the additional protocol descriptor list.

Add function `bt_sdp_attr_addl_proto_read()` to read the attribute
value from the additional protocol descriptor list for specific index
and UUID.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-24 11:34:32 +02:00
Lyle Zhu
8365ed718e Bluetooth: Classic: SDP: Add protocol identifier codes
Add all protocol identifier codes defined in Assigned Numbers
specification.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-24 11:34:32 +02:00
Sunil Abraham
158cb294be drivers: clock_control: SAM D5x/E5x: add more functionality
Add more functionality in clock control driver.
Implement bootup clock initialization, async on and set_rate API.

Signed-off-by: Sunil Abraham <sunil.abraham@microchip.com>
2025-10-24 11:32:30 +02:00
Sunil Abraham
acf34f5ef3 dts: clock: SAM D5x/E5x: add more functionality
Add more functionality in clock control driver.
Add bindings for dfll, fdpll, gclk generator, mclk cpu, osc32k, rtc clock
and xosc.

Signed-off-by: Sunil Abraham <sunil.abraham@microchip.com>
2025-10-24 11:32:30 +02:00
Alain Volmat
38a21cc1a2 video: introduce video_set_compose_format helper
Some devices allow for downscale / upscale via the set_selection
compose API. When using it, it is necessary to perform a
set_selection of the compose target prior to setting the format.
In order to allow non-compose aware application to benefit from
it, introduce a helper which take care of setting the compose
prior to setting the format.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-23 16:03:10 -04:00
Mario Paja
6ee8d74a0d dt-bindings: clock: stm32wba add SAI1_SEL()
Add SAI1_SEL() clock sourse for SAI1

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2025-10-23 16:03:01 -04:00
David Jewsbury
a322957f59 drivers: mspi: Add timeout callback to MSPI API
This is a new callback option that drivers can use for when a request
or xfer has timed out. E.g if an Async RX request never received
anything, this callback can be used so a user can clean up their
application.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-10-23 18:00:13 +02:00
Aksel Skauge Mellbye
73151ad79c include: zephyr: dt-bindings: Add Silicon Labs xg26 binding headers
Add binding headers for clock control and pinctrl for Silicon Labs
xg26 socs.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-10-23 17:57:39 +02:00
Qingsong Gou
039389187f drivers: clock_control: fix sf32lb clock_control typo
fix a sf3232lb_clock_is_ready_dt typo

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2025-10-23 17:53:25 +02:00
Fabin V Martin
0bd56429d3 drivers: flash: microchip: add flash g1 driver
Add flash driver for Microchip NVMCTRL g1

Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
2025-10-23 17:50:29 +02:00
Josuah Demangeon
74e147e886 usb: device_next: uvc: remove application decisions from the UVC class
The UVC class was deciding itself which formats were sent to the host.
Remove this logic out of the UVC class and introduce uvc_add_format() to
give the application the freedom of which format to list.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-23 17:47:12 +02:00
Vinayak Kariappa Chettimada
29cf367568 samples: Bluetooth: hci_ipc: Enable HCI vendor-specific h/w error event
Enable HCI vendor-specific h/w error event generation in
samples and tests.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-23 11:43:10 +03:00
Vinayak Kariappa Chettimada
5db80f0d57 Bluetooth: Controller: Reduce assertion check code size
Reduce Controller assertion check code size for ARM Cortex-M
CPUs by using the undefined instruction exception.

`arm-none-eabi-addr2line` commandline can be used to get the
source file and line number.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-23 11:43:10 +03:00
Valerio Setti
fc422beb68 lib: uuid: replace legacy crypto support with PSA API
Legacy crypto support is going to be removed in the next Mbed TLS release
(which will be named TF-PSA-Crypto for the crypto support) so this
commit transitions UUID library from legacy crypto to PSA API.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-23 11:42:11 +03:00
Jordan Yates
13d35288bd net: l2: ppp: expose the peer ACCM
Expose the currently configured value for the PPP peers Asynchronous
Control Character Map through a public function.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-23 08:02:28 +02:00
Andreas Klinger
c93788a0ea drivers: sensor: remove redundancies in veml6031 and veml6046
- create common header file veml60xx-common.h for sensors VEML6031 and
  VEML6046.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2025-10-22 18:14:02 -04:00
Andreas Klinger
1e80842749 drivers: sensor: add Vishay veml6046 RGBIR color sensor
- add driver for Vishay VEML6046 RGBIR color sensor
- add new compatible "vishay,veml6046"
- support fetch and get sensor subsystem operations
- triggered mode and interrupts are not yet supported

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2025-10-22 18:14:02 -04:00
Nathan Winslow
22710b7a14 drivers: fuelgauge: Added properties to prop_type.
Adds properties to fuel gauge api to support ADI LTC2959.

Signed-off-by: Nathan Winslow <natelostintimeandspace@gmail.com>
2025-10-22 18:35:37 +03:00
Daniel Kampert
cc3c0d04cf drivers: sensor: Add driver for MAX32664C
- Add DTS for MAX32664C
- Add driver for MAX32664C
- Add example for MAX32664C Heart rate measurement with Bluetooth
- Add private attributes and channels for health measurement

Closes: #93473

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2025-10-22 18:35:14 +03:00
Lucien Zhao
3179b6be53 drivers: clock_control: add nxp_mc_cgm clock driver
- add clock_init function to initialize clock sources according
  devicetree settings
- finish basic clock api function

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-10-22 18:35:01 +03:00
Kai Cheng
e2f962137f Bluetooth: Classic: add mode change notification for sniff mode
Implement mode change event handling and callback notification for
BR/EDR power mode transitions. Adds br_mode_changed callback to
notify applications when connection switches between active and
sniff modes. Handles HCI mode change events and propagates mode
and interval information to registered callbacks.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-10-22 18:34:33 +03:00
Kai Cheng
84abd9351f Bluetooth: Classic: add power mode control for sniff mode
Implement BR/EDR power mode control with sniff mode functionality.
Adds APIs bt_conn_br_enter_sniff_mode() and bt_conn_br_exit_sniff_mode()
to manage power saving modes. Includes parameter validation and HCI
command handling for sniff mode configuration with min/max intervals,
attempt count, and timeout parameters.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-10-22 18:34:33 +03:00
Zhaoxiang Jin
eaa07d0e0f drivers: mcux_syscon: enable MICFIL clock control
Enable MICFIL clock control for NXP MCUX SoCs.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-10-22 18:34:20 +03:00
Cla Mattia Galliard
80d00b5ec1 net: tc-mapping: Fix SKIP_FOR_HIGH_PRIO
Adjust the way the SKIP option worked. Before this patch, a constant
priority offset was considered "high priority" this had the effect, that
the threads assigned to work on the priority were effectively usesless.
To fix it, consider this immediate handling as a pseudo-queue and compute
the tc-thead-mapping based on the effective count (+1 if skipping is
enabled). This makes it so that all threads are usefull and the
high-priority skip-path is considered as a pseudo tc-thread.

Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
2025-10-22 18:33:43 +03:00