Commit Graph

15532 Commits

Author SHA1 Message Date
Robert Lubos
151295f98e net: sockets: Move socket vtable definition
Offloaded socket implementations need to create the socket operations
vtable, therefore need access to struct socket_op_vtable. So far this
has been defined in a private header, so implementations needed to add
the header location to the include path in CMake.

Therefore, move struct socket_op_vtable definition to the internal part
of the public socket header, so it's no longer needed to include a
private header. This is also more consistent with the rest of the public
header content, as for example macros needed to register a socket
implementation are already there.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-11 16:32:49 -05:00
Dipak Shetty
fd1f4392a6 include: zephyr: bluetooth: uuid: fix typo in characteristic doxygen
Fixes correct GATT characteristic description for Device Time.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-07-11 16:32:39 -05:00
Ilya Tagunov
708c1dc488 linker: arc: add .rodata_in_data section to avoid unexpected placement
The .rodata_in_data section is produced by MWDT toolchain with -Hccm
option enabled. This option moves read-only data from the executable
memory (ICCM) to the data memory (DCCM), improving performance by
reducing conflicts between instruction fetches and data fetches.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2025-07-11 16:32:28 -05:00
Tim Pambor
970c715ef4 sys: cbprintf: Suppress bugprone-sizeof-expression
clang-tidy reports a bugprone-sizeof-expression warning for
sizeof((__v)) when __v is a pointer type. This is a false-positive
in contexts like logging with %p, where using a pointer is
intentional and expected.

Add a NOLINT comment to suppress the warning in static analysis.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-11 09:41:50 -05:00
Tim Pambor
9f5492acec sys: cbprintf: Fix performance-no-int-to-ptr warning
clang-tidy reports a performance-no-int-to-ptr warning due to the cast
(const char *)(uintptr_t)(v).

Previously, only char * was cast to const char *, but there's no downside
to constifying all pointer types.

This change updates the Z_CONSTIFY macro to apply const consistently,
which even aligns better with its name and resolves the warning.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-11 09:41:50 -05:00
Josuah Demangeon
e0b706b6c6 drivers: video: stm32_dcmipp: move video/ header directory to drivers/
During #89407 a driver-specific header stm32_dcmipp.h got introduced to
support new functionnalities not yet covered by video APIs.
Move this header into a new <include/zephyr/drivers/video/> include
direcctory like what other driver classes do.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-09 09:42:43 -05:00
Benjamin Cabé
86bea343b1 Bluetooth: BAP: fix bad doxygen @cond placement
Move `@cond INTERNAL_HIDDEN` comment where it belongs (fixing what was
probably a copy-paste/refactoring error).
This also makes the previously `bap_iso`, `group`, `_prev_seq_num`
visible again.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-08 13:41:02 -05:00
Benjamin Cabé
80b7745d24 include: math: doc: add doxygen groups
add doxygen groups to include/zephyr/math header files and fold them
under Utilities top-level group.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-08 13:39:35 -05:00
Benjamin Cabé
3d111dd6e9 include: dsp: doc: cleanup Doxygen for DSP headers
moved docs to Utilities group (vs. top-level)
cleaned several incorrect Doxygen group definitions

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-08 13:39:35 -05:00
Chris Friedt
7da64e7bda poxi: aio: include zephyr/toolchain.h for ZRESTRICT
Previously, ZRESTRICT was used in aio.h without also including
zephyr/toolchain.h.

Tests may have compiled because the toolchain header was included by
some other means.

We should explicitly include it to ensure that ZRESTRICT is defined.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-07-04 16:44:02 -10:00
Yong Cong Sin
1967d1e699 drivers: syscon: do not assume that a function isn't supported
When a function pointer is `NULL`, it could be that the underlying
hardware doesn't support it, or it isn't implemented.

If a function isn't supported by the hardware, its driver should
return `-ENOTSUP`, the API layer should return `-ENOSYS` when a
function isn't implemented.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2025-07-04 16:42:53 -10:00
Benjamin Cabé
11a552b0f8 include: drivers: virtio: fix doxygen groups
Virtio Doxygen documentation is now folded under Device Driver API group
like it should be.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 15:49:54 -05:00
Benjamin Cabé
ee2b9a4e6d drivers: virtio: move virtio headers to zephyr/drivers
Virtio headers are moved to zephyr/drivers/ as they have no reason to be
top-level headers since virtio is a driver class.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 15:49:54 -05:00
Robert Lubos
48d1a01b2d net: sockets: Specify alignment for sockaddr* structs
To avoid misalignment errors when casting between
sockaddr_storage/sockaddr and specialied sockaddr_* variants, specify
alignment for the former to match the alignment of the others.

The issue was reported by UBSAN:

  utils.c:802:8: runtime error: member access within misaligned
  address 0xf4aff186 for type 'struct sockaddr_in6', which requires
  4 byte alignment

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
f549bfcfeb net: ipv4: Add raw variants of various IPv4 functions
To address the misaligned access issues reported by UBSAN, introduce raw
variant of certain IPv4 functions used in the critical data path of the
network stack, operating on plain uint8_t buffers in stead of IPv4
address struct.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
74ccd5fdaa net: ipv6: Add raw variants of various IPv6 functions
To address the misaligned access issues reported by UBSAN, introduce raw
variant of certain IPv6 functions used in the critical data path of the
network stack, operating on plain uint8_t buffers in stead of IPv6
address struct.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
9b00a1d656 net: ipv6: Fix net_ipv6_is_addr_mcast_group() check
Some bytes were compared twice and one comparison used wrong index.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Guillaume Gautier
9977ce4eb6 dts: bindings: memc: stm32-fmc: reorder parameters to match code
Description of parameters in st,control property didn't match the values
used in the code.
Modify the description to match with the current driver implementation.
Also add a description for reg property to help setting it properly and
add corresponding dt-bindings.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-07-04 13:07:24 -05:00
Gaetan Perrot
4bee190264 sensor: icm42688: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
aee0c34ece sensor: adxl345: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
5d2f4e8dcd sensor: adxl367: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
e6c1f02436 sensor: adxl362: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
89cdd133ad sensor: tmp114: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
fbbb777795 sensor: mc3419: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
0490f03b29 sensor: tmp11x: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Josuah Demangeon
645f3d38e1 drivers: video: fix order of fields to allow use with FIFOs
The struct video_buffer are currently used with `struct k_fifo`, which
require them to preserve the first word of data for use by the kernel.
Move the first fields to make it possible to keep using video buffers in
FIFO safely.

Fixes #92526

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-02 17:58:46 -05:00
Gaetan Perrot
48c85cb065 sensor: sensor_axis_align: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-02 17:58:37 -05:00
Gaetan Perrot
9125e8941d sensor: adxl3xx: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-02 17:58:37 -05:00
Gaetan Perrot
ccad3cf5b6 sensor: sensor_axis_align: clarify defgroup
Rename and clarify the @defgroup SENSOR_AXIS_ALIGN to better reflect its
purpose. Replace the vague "DT Options" title with a more descriptive
name: "Sensor axis alignment DT options".

This improves documentation clarity for developers configuring sensor
orientation via Device Tree.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-02 17:58:37 -05:00
Gaetan Perrot
4d11a1188c sensor: adxl3xx: Clarify defgroup names in DT bindings
Replace vague "ADI DT Options" titles with explicit, device-specific
@defgroup names such as "ADXL345 DT Options", "ADXL362 DT Options",
"ADXL367 DT Options", and "ADXL372 DT Options".

This improves clarity for developers and documentation readers by avoiding
the unclear "ADI" abbreviation.

Fix: #92021

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-02 17:58:37 -05:00
Tom Hughes
14f1c567f9 arch: riscv: Increase IDT_LIST size
Some boards fail to build arch.interrupt.gen_isr_table_local.riscv test
since this region is too small:

riscv64-zephyr-elf/bin/ld.bfd: zephyr/zephyr_pre0.elf section `.intList'
will not fit in region `IDT_LIST'

riscv64-zephyr-elf/bin/ld.bfd: region `IDT_LIST' overflowed by 239 bytes

This is a bogus memory region, so increasing it has no effect on the
final binary size.

Issue #92194

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-07-02 17:57:58 -05:00
Jonathan Nilsen
b18c326946 soc: nordic: move nrf_ironside from drivers/firmware to soc/nordic
Move the IronSide APIs to soc/nordic from drivers/firmware since
these are vendor specific APIs. The header files are now included
from <nrf_ironside/*.h>. Adjust code that uses these APIs accordingly.

Also move the DT binding for "nordic,ironside-call" from
bindings/firmware to bindings/misc.

Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
2025-07-02 17:57:45 -05:00
Grzegorz Swiderski
75dd614437 drivers: firmware: nrf_ironside: Update the spelling
s/IRONside/IronSide/g

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-07-02 17:57:45 -05:00
Mark Wang
b93dec9295 bluetooth: sdp: cast from 'const x *' to 'struct x *' drops const qualifier
SonarQube reports: cast from 'const struct _snode *' to 'struct _snode *'
drops const qualifier. Fix it by removing the const.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit 7982ee0df13b7f9e54595f799e32f38c464b0f9e)
2025-07-02 03:52:02 -10:00
Cong Nguyen Huu
c52ba71f94 drivers: introduce support Peripheral Sensor Interface (PSI5) driver
This driver allows to communication (send, receive) with PSI5 device

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2025-07-01 10:53:59 -10:00
Alberto Escolar Piedras
34fece8f26 toolchain/gcc.h: Add macro to get address of unaligned member
In principle getting the address of an unaligned structure member
is undefined behaviour, and clang warns as much.
Let's provide a macro which can return such an address.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-01 10:15:55 -05:00
Gaetan Perrot
2fc1dd54af arch: common: semihost: update RISC-V semihosting spec link
Replace dead link in include/zephyr/arch/common/semihost.h.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-01 10:15:32 -05:00
Fin Maaß
369517444b lib: smf: mark as unstable
mark State Machine Framework API as unstable,
as it is now used by usb-c and hawkBit.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-30 15:24:37 -05:00
Adam Kondraciuk
e77f942cff drivers: timer: nrf_grtc_timer: add last_count initialization
The GRTC counter is not cleared at startup, therefore the
`last_count` variable needs to be initialized accordingly.
This change:
- Prevents overflow of the `sys_clock_announce()` int32_t parameter
- Ensures the correct uptime value, which should be reset during
  initialization

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-30 15:23:44 -05:00
Daniel Leung
a9574c17ae xtensa: gdbstub: fix code stepping
The ICOUNTLEVEL register needs to be manipulated carefully
according to where we want to stop.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-30 15:19:59 -05:00
Robert Lubos
ae7d7a800e net: events: Add missing net_mgmt.h include
net_event.h header makes use of macros defined in net_mgmt.h, therefore
it should include that header.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-30 15:18:01 -05:00
Victor Brzeski
d9c7b19ae0 include: usb_ch9: fix USB_FS_ISO_EP_INTERVAL calculation
Per section 5.6.4 of the USB 2.0 standard, Isochronous Endpoints
are derived by the (2^(bInterval-1) * F) formula. The current
implementation uses the formula intended for Interrupt Endpoints.

Signed-off-by: Victor Brzeski <vbrzeski@gmail.com>
2025-06-27 09:02:29 -10:00
Erwan Gouriou
a5fad911bd include: dt-bindings: stm32n6_clock: Add MEM bus
Add MEM bus clock which is used to enable AXISRAM3/4/5/6 clocks.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-06-27 09:01:52 -10:00
William Tambe
abeccfec28 xtensa: support for more than 32 interrupts
This change add support for using more than 32 interrupts.

Signed-off-by: William Tambe <williamt@cadence.com>
2025-06-27 08:59:56 -10:00
Johann Fischer
5ba44ffd3e usb: host: allow status stage to be omitted
For testing purposes, allow the status stage to be omitted.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-27 08:52:22 -10:00
Kate Wang
8548b3cb8a include: drivers: mipi_dsi: add member in mipi_dsi_msg structure
Add member in mipi_dsi_msg structure to store user data, incase the high
level driver or application needs to pass down extra configuration.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-06-27 08:49:44 -10:00
Victor Brzeski
3c47f91be4 include: kernel: add macros to enable allocation from specific sections
This change adds two macros that allow the user to specify the section
the memslab buffer should be allocated from. This is useful for systems
where memory must reside in DMA-able memory like USB.

Signed-off-by: Victor Brzeski <vbrzeski@gmail.com>
2025-06-27 10:00:14 -05:00
Frank Kühndel
dbb8ee38f2 drivers: reset: Add MPFS MSS driver
Add driver for Microchip PolarFire SoC (MPFS) peripheral clock and soft
reset control.

Normally, the peripheral clocks and reset state are controlled by the
Hart Software Services (HSS) running on the Monitor processor.  As an
alternative to using HSS services, applications can now enable the reset
controller in a device tree overly, for example:

&reset {
  status = "okay";
};

&uart4 {
  resets = <&reset MSS_RESET_ID_MMUART4>;
};

Embedded the reset controller node in system controller node.

Signed-off-by: Frank Kühndel <frank.kuehndel@embedded-brains.de>
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2025-06-27 09:59:08 -05:00
Daniel Marjamäki
eb80530618 sca: Fix undefined behavior during preprocessing
According to the C standard it is undefined behavior to use preprocessor
directives inside macro invocations.

Cppcheck stops when it see this UB with an error message, and so this
change will improve Cppcheck analysis

This is a refactoring to fix UB, no logical change is intended.

Signed-off-by: Daniel Marjamäki <daniel.marjamaki@cppchecksolutions.com>
2025-06-27 14:14:35 +02:00
Ren Chen
caeda699f5 drivers: spi: add it51xxx spi driver
This commit adds it51xxx spi driver.

Tested with: samples/drivers/spi_flash

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2025-06-27 14:14:16 +02:00