Commit graph

25,525 commits

Author SHA1 Message Date
Alberto Escolar Piedras
01118e2657 drivers can_native_linux: Set socket to be closed on exec
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set for them.
(This default behaviour is usefull for stdin/out/err so that new process
is kept connected to them, but it is very rare for it to be usefull for
any other descriptor)

In general this leads to descriptors being kept open unnecessarily,
which either will block other process from using them (for example
if the child survives the parent but it does something else while keeping
a port open).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.

Let's ensure we do not leak it for this component as we do not need it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-10-02 22:00:02 +02:00
Sylvio Alves
7c1193c813 udc_dwc2: fix off-by-one in TX FIFO unset check
Fix the check in dwc2_unset_dedicated_fifo() that wrongly included the
current endpoint when testing for higher FIFOs. This caused false
warnings and early returns.

Use ~BIT_MASK(ep_idx + 1) to only test FIFOs above the current EP.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-10-02 21:59:14 +02:00
Jakub Michalski
30092cfcce drivers: virtio: virtio_pci: fix virtqueue overallocation
virtio_pci_init_virtqueues was allocating more virtqueues than
specified by num_queues param if data->common_cfg->num_queues
was greater than num_queues

Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
2025-10-02 21:59:01 +02:00
Guillaume Gautier
d76e0004fe drivers: pwm: stm32: kconfig: remove ll_tim selection
Usage of stm32xxxx_ll_tim.c has been removed so we can also remove the
selection of USE_STM32_LL_TIM from the Kconfig.
Also remove the LL_RCC that plays no part in the driver.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-02 21:58:55 +02:00
Guillaume Gautier
1d2029a137 drivers: counter: stm32: kconfig: remove ll_tim selection
Usage of stm32xxxx_ll_tim.c has been removed so we can also remove the
selection of USE_STM32_LL_TIM from the Kconfig.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-02 21:58:55 +02:00
Guillaume Gautier
a02e1c70dd drivers: counter: stm32: rtc: remove init struct
Remove the calls to LL_RTC_Init, LL_RTC_DeInit and LL_RTC_ALMA_Init in
the RTC counter driver. This avoids calling functions from
stm32xxxx_ll_rtc.c.
They are replaced by a set of simpler functions from the header file.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-02 21:58:55 +02:00
Guillaume Gautier
bb2eb4e8b0 drivers: rtc: stm32: remove calls from ll source file
Remove all function calls for functions that are defined in the
stm32xxxx_ll_rtc.c and replaces them by simpler calls from the header file.
Also remove the use of LL_RTC_AlarmTypeDef since no functions from the
header file uses it.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-02 21:58:55 +02:00
Bjarki Arge Andreasen
5fd26a6cb7 drivers: adc: nrfx_saadc: implement PM device runtime
The NRFX SAADC device driver needs to implement PM DEVICE for it
to work with power domains, which is required for some SoCs. Inline
PM device runtime "self get/put" pm has been implemented for the
normal sync read API.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-10-02 21:58:14 +02:00
Luis Ubieda
f7dfcfbad6 spi: lpspi: Add include guards to common header file
Not motivated by any impacted functionality but rather following good
practices. Recursive inclusions may be confusing and hard to diagnose.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-10-02 21:57:37 +02:00
Luis Ubieda
97eb3eb1dd spi: lpspi: Extract FIFO length query helpers to common header file
To remove code duplication.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-10-02 21:57:37 +02:00
Luis Ubieda
df7b1a14b1 spi: lpspi: rtio: Re-introduce native RTIO support
This version is based on the CPU LPSPI driver, directly implementing
the submit call following the non-blocking asynchronous pattern.

This has been re-introduced after struggling to keep up with data
streaming applications, which demands reduced and controlled latency,
which for the default implementation (using RTIO workqueue) is not
guaranteed, due to being serviced by a thread-pool vs directly in the
ISR context.

This version includes limited feature-set, yet stress-tested:
- Required both rx-fifo and tx-fifo to be equal.
- 8-byte words supported only.
- SPI Controller-only supported (target mode not included).
- SPI_HOLD_ON_CS only supported with CS GPIOs.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-10-02 21:57:37 +02:00
Szymon Janc
9985a090fc bluetooth: hci: userchan: Implement close callback
This allows to use bt_disable() also in native_sim build.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-10-02 16:49:16 +02:00
Adam Mitchell
dcc61ae437 drivers: clock_control: Set maximum frequencies for CONFIG_SOC_STM32H742XX
Adds missing check to set maximum clock frequencies for stm32h742xx

Signed-off-by: Adam Mitchell <adam.mitchell@brillpower.com>
2025-10-02 16:49:08 +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
Arthur Gay
181082e84e drivers: i2s: i2s_ll_stm32: add support for IO swap
This commit adds a new property in the device-tree bindings for swapping
the serial data input and output pins of the SPI/I2S peripheral for
STM32 microcontrollers that support it.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2025-10-02 16:48:29 +02:00
Arthur Gay
d1ea7534c6 drivers: memc: stm32_ospi_psram: make NCS boundary configurable in dt
Limit a transaction to a boundary of aligned addresses. Each PSRAM may
specify different configuration.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2025-10-02 16:48:11 +02:00
Arthur Gay
1e966ba478 drivers: memc: stm32_xspi_psram: make NCS boundary configurable in dt
Limit a transaction to a boundary of aligned addresses. Each PSRAM may
specify different configuration.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2025-10-02 16:48:11 +02:00
Arthur Gay
53f91ea8ed drivers: spi: spi_ll_stm32: add support for IO swap
This commit adds a new property in the device-tree bindings for swapping
the MISO and MOSI pins of the SPI/I2S peripheral for STM32 microcontrollers
that support it.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2025-10-02 16:48:04 +02:00
Alain Volmat
e7aa49c60b drivers: video: dcmi: correct clock_control_subsys_t cast
Correct the clock_control_subsys_t cast in calls of the
clock_control_ framework.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-02 16:47:53 +02:00
Alain Volmat
c3995b65ba drivers: usb: udc: stm32: avoid unnecessary clock_control_subsys_t cast
Avoid incorrect (clock_control_subsys_t *) incorrect cast and
remove the cast of pclken in calls to the clock_control_
framework.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-02 16:47:53 +02:00
Alain Volmat
00fd580132 drivers: mbox: stm32-hsem: correct clock_control_subsys_t cast
Correct the clock_control_subsys_t cast in calls of the
clock_control_ framework.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-02 16:47:53 +02:00
Alain Volmat
c927d9ee09 video: stm32: dcmipp: correct clock_control_subsys_t cast
Correct the clock_control_subsys_t cast in calls of the
clock_control_ framework.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-02 16:47:53 +02:00
Mario Paja
5a0d4e106d drivers: i2s: stm32_sai: add support for stm32g4xx series
STM32G4xx series shares several DMA configurations with
the other platforms. These changes aim to enable platform
specific DMA configuration and align them to other platforms.

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2025-10-02 16:47:45 +02:00
Christian Mauderer
f042a1cca0 drivers: spi: mchp_mss: Avoid sending extra bytes
The driver did send some extra 0 bytes when the receive hasn't been
finished yet. This patch makes sure to avoid that.

Signed-off-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
2025-10-02 16:47:38 +02:00
Christian Mauderer
a52206201c drivers: spi: mchp_mss: Handle NULL buffers better
At the moment, if you would pass a NULL buffer to the driver, the rx and
tx counts of that buffer would not advance. This patch fixes that.

Signed-off-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
2025-10-02 16:47:38 +02:00
Christian Mauderer
b39876938a drivers: spi: mchp_mss: Make more universal
The driver has ignored the first RX buffer. Most likely it has been
modeled for accesses to a SPI flash or similar where the first read data
is not relevant.

This commit makes sure that the driver can work as a universal SPI
master instead.

Signed-off-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
2025-10-02 16:47:38 +02:00
Jeppe Odgaard
5eed3a9c92 drivers: sensor: explorir_m: fix variable mix-up
Fix the mix‑up between `filtered` and `scaling` in
`explorir_m_buffer_process()`.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-10-02 15:15:06 +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
Lin Yu-Cheng
83e350b5a0 sensor: rts5912: reduce Tachometer wake up frequency
Adjusted RTS5912 tachometer behavior to reduce interference with CPU sleep.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-10-02 11:47:12 +03:00
Andreas Schweigstill
4c221ac3cf drivers: disk: sdmmc_stm32: fix compilation error for SDMMC_STM32_EMMC
Compilation fails if CONFIG_SDMMC_STM32_EMMC is set. This bugfix
adds #ifdef ... #endif pairs for unused static functions and
a call to stm32_sdmmc_card_detect_uninit().

Signed-off-by: Andreas Schweigstill <andreas@schweigstill.de>
2025-10-02 09:32:03 +02:00
Alain Volmat
e94495700f dma: stm32: removal of unused stm32_dma_config_channel_function
Function stm32_dma_config_channel_function is unused hence remove it
from headers and dma_stm32_v1. In case of dma_stm32_v1, the related
configuration is already part of the LL_DMA_Init call done in
another place in dma_stm32.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-02 09:31:36 +02:00
Alain Volmat
a09fc068ea dma: stm32: dma_stm32_slot_to_channel is only applicable on STM32Fx
The dma_stm32_slot_to_channel function is only applicable on the
STM32Fx series since the LL_DMA_CHANNEL_x macros only exist for those
platforms among the one based on st,stm32-dma-v1.
While checking for !defined(CONFIG_DMAMUX_STM32) is ok to enable this
on STM32Fx, it prevents to disable dmamux on other platforms since
required symbols do not exist.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-02 09:31:36 +02:00
Hieu Nguyen
424a12446f drivers: counter: Add Counter support for Renesas RZV2L, A3UL
Add Counter driver support for Renesas RZ/V2L, A3UL

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>

drivers: counter: Improve ISR Prototype for Renesas RZ
2025-10-02 09:31:28 +02:00
Xiaolu Sun
0ab40913c2 drivers: i2c_sedi: add API to retrieve current configuration
Introduced a API to get the current I2C configuration.
Facilitates runtime inspection of I2C settings.
Useful for debugging and dynamic configuration changes.

Signed-off-by: Xiaolu Sun <xiaolu.sun@intel.com>
2025-10-01 20:24:23 -04:00
Jeppe Odgaard
29d01736d8 drivers: sensor: omron: add d6f driver
Add support for Omron D6F mass flow rate sensor series. The sensor series
outputs an analogue voltage which is read using an ADC.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-10-01 17:14:28 -04:00
Jeppe Odgaard
f8a952f2fe include: drivers: sensor: add flow rate channel
Add flow rate to `enum sensor_channel` in litres per minute.

The SI unit for flow rate is cubic metres per second. Due to a sensor value
resolution of 1/100000 this unit is not granular enough for low flow rate
sensors.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-10-01 17:14:28 -04:00
Rex Chen
e8e4d2159e mcux: wifi_nxp: Enable IMU IRQ after event initialized
After running 'kernel reboot' cmd on coex application,
zephyr os clean bss section, IMU13 IRQ event data set as 0,
then CPU3 receive IMU13 IRQ from CPU1, need access IMU13 IRQ event,
cause hang.
Put enable IMU13 IRQ operation after related task and event created
to fix this issue.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2025-10-01 17:14:15 -04:00
Cla Mattia Galliard
4925e3a221 drivers: sensor: voltage_divider: Use k_timepoint_t for absolute time
Use k_timepoint_t instead of k_timeout_t for absolute time to avoid
ambiguity and ensure the code works even when CONFIG_TIMEOUT_64BIT=n.

Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
2025-10-01 17:13:59 -04:00
Fabian Blatz
a6500f1c48 drivers: sensor: voltage-divider: Add skip-calibration property
Adds a skip-calibration property to the voltage divider sensor,
which can be enabled, in case the underlying ADC driver
does not support calibration.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-10-01 17:13:05 -04:00
Krzysztof Chruściński
7a6c7ea0f9 drivers: serial: nrfx_uarte: Remove redundant pinctrl call
Pinctrl call is redundant as uarte_periph_enable calls it as well.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-10-01 17:12:09 -04:00
Fabrice DJIATSA
fd8035e4f7 drivers: clock_control: stm32: replace pllsai1m with pllsaim
update the function name in driver since pllsai1m was changed
to pllsaim in clock_stm32_ll_common.h.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-10-01 17:11:38 -04:00
Tomasz Moń
c180420477 drivers: udc_dwc2: Fix memory leak on subsequent bus resets
Do not queue new buffer after bus reset if there is one already queued.
This fixes memory leak on each bus reset if there are no SETUP transfers
received between resets.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-10-01 17:21:18 +03:00
Pieter De Gendt
8d94c3b091 drivers: wifi: nrf_wifi: Set device config pointer to NULL
Commit 2de30ff782
moved the driver ops from the config pointer to the API. As the config
pointer isn't used, set it to NULL and allow future updates to actually add
a configuration struct.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-01 17:20:52 +03:00
Johan Hedberg
ca1ee72236 drivers: Fix deprecated SPI_DT_SPEC_INST_GET usage
This macro doesn't accept a delay parameter anymore (well, it does, but
it's deprecated and will trigger build warnings). Just remove it from the
places that were still passing it.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-10-01 17:20:41 +03:00
Johan Hedberg
e3f3b6dca6 drivers: sensor: Fix deprecated SPI_DT_IODEV_DEFINE usage
The delay parameter was removed from this macro, so don't pass it.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-10-01 17:20:41 +03:00
Declan Snyder
82b882faa4 drivers: spi: nxp_lpspi: Use spi_config timing params
Use the timing params from spi_config that are specific to the slave
instead of using the same timing for the controller for all slaves.
Remove these properties from the LPSPI DT binding.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-01 14:39:36 +03:00
Declan Snyder
570b445a61 drivers: Convert to use SPI macro without delay parameters
Convert all drivers and other consumers to use SPI macros without the
delay parameters.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-01 14:39:36 +03:00
Andrzej Głąbek
ca79733388 drivers: pinctrl_nrf: Add support for SPIM CSN pin function
Certain SPIM instances in nRF52/53/54L/54H Series provide hardware
control of the CSN (chip select) line. Although the standard SPI
drivers do not use this feature, it should be possible to configure
this line through pinctrl in case some special driver needs this.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-10-01 14:37:46 +03:00