Commit graph zephyr/drivers
Author SHA1 Message Date
Sylvio Alves
26bcd68a40 drivers: esp32: use zephyr cache api for dma coherency
Replace direct esp_cache_msync() calls in the ESP32 GDMA and
SPI master drivers with the portable sys_cache_data_*() API.

Zephyr's API is a compile-time no-op when CACHE_MANAGEMENT is
disabled, so the same source compiles cleanly on every ESP32
SoC and stays cost-free where there is no writeback cache.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-20 19:22:10 -07:00
Sylvio Alves
b8af14f7b6 drivers: cache: add espressif esp32 data cache driver
Map the generic sys_cache_data_* API onto esp_cache_msync()
from hal_espressif. The driver is SoC-agnostic and activates on
any Espressif chip that selects CPU_HAS_DCACHE and enables
CACHE_MANAGEMENT, keeping PSRAM and DMA buffers coherent from
portable Zephyr code.

Instruction-cache and enable/disable entries are no-ops since
the bootloader brings the cache up before Zephyr runs.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-20 19:22:10 -07:00
Jun Lin
4251fa8e2e driver: espi: npcx: enable guaranteed VWire sent by default
Sets `ESPI_NPCX_VWIRE_ENABLE_SEND_CHECK` to defaut enabled.
This guarantees that VWires sent by the target are received by the
controller before the driver API returns.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2026-05-20 19:21:02 -07:00
Bernardo Perez Priego
28d45d88a4 drivers: i2c: mec: Increase PIN assertion timeout to 10 ms
The PIN_WAIT_INTERVAL_US timeout of 2000 microseconds is
insufficient for reliable hardware response. Increase it to
10000 microseconds to match the previous driver implementation
(i2c_mchp_xec.c) which used WAIT_INTERVAL * WAIT_COUNT for an
effective 10 ms timeout.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2026-05-20 20:07:49 -04:00
Dhanoo Surasarang
55b417f2fc drivers: mspi: dw: Start async timeout timer before starting transfer
Fix a race condition in start_next_packet() where the async timeout
timer is armed after writing the SER register (which starts the
transfer). On platforms where the bus transfer completes faster than
the CPU can execute the subsequent instructions, the ISR fires and
calls k_timer_stop() on a timer that hasn't been started yet.

The orphan timer fires after the configured timeout. At that point
the transfer context is stale: packets_done may index past the
original packets array, leading to out-of-bounds access, USAGE FAULT
(unaligned access), or BUS FAULT (dereferencing freed stack pointers).

Fix by moving k_timer_start() before write_ser(). The timer is now
armed before the transfer can possibly complete. If the ISR fires
immediately, k_timer_stop() in handle_end_of_packet() safely cancels
the already-running timer. For sync transfers the timer is not armed,
preserving the existing behavior.

Signed-off-by: Dhanoo Surasarang <dhanoo.surasarang@nordicsemi.no>
2026-05-20 20:06:35 -04:00
Florian Moesch
0c1ac1ce8e drivers: led: add LP586x I2C LED driver
Add support for the Texas Instruments LP586x family of LED drivers.

Signed-off-by: Florian Moesch <florian.moesch@draeger.com>
2026-05-20 20:05:48 -04:00
Peter van der Perk
5a0ee3f0fb dma: mcux_edma: Fix SG for use with SPI
Adds support for no increment needed to support the LPSPI and other
peripherals with a FIFO buffer.
Furthermore we disable interrupts on each major loop on SG, instead
only do an interrupt on the final TCD.
Also a small optimization in dma_mcux_edma_reset_channel, where TCD
got zeroed twice.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-05-20 20:04:45 -04:00
Peter van der Perk
b2b3274f05 spi: lpspi: rtio: FIFO tune and DMA support
Improve the LPSPI RTIO FIFO path by increasing the fifo
watermark if possible, this reduces IRQ load. Add DMA
support

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-05-20 20:04:45 -04:00
Richard Mc Sweeney
7120a9d72e drivers: Add pse84 PTComp
Added PTComp support to PSE84.

This implementation uses the shared autonomous controller (MFD)
with other autanalog drivers.

The PTComp is a programmable threshold comparator inside the
autonomous (aut) analog subsystem. It is controlled using the
autonomous controller (AC), which is a programmable state machine.
The AC is shared across all autonomous analog peripherals including
the SAR, PRB, PTComp, CTB, and CTDAC.

The PTComp block contains two comparators for edge detection and
with a capability for boolean post-processing. These two comparator
instances need to be configured together and accessed using the AC.
A PTComp MFD is used to bring together the two comparator
configurations. AC MFD then references the combined PTComp MFD
configuration, and brings together all other autanalog peripherals
into a single AC setup for the application.

Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
2026-05-20 20:02:35 -04:00
Robert Budai
c6c84446c4 drivers: dac: add ad5529r driver
Add DAC driver for the Analog Devices AD5529R 16-channel, 16-bit
voltage output DAC. The driver supports multiple output voltage
ranges, SPI communication, and optional reset/LDAC/clear GPIOs.

Signed-off-by: Robert Budai <robert.budai@analog.com>
Co-authored-by: Radu Ciobanu <raduciobanu096@gmail.com>
2026-05-20 20:02:09 -04:00
Muhammad Waleed Badar
3dbbb8773d drivers: display: sdl: move SDL pixel format configuration to devicetree
Replace the SDL display driver's default pixel format Kconfig
selection with a devicetree property and initialize the display
using the DT-provided format.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-05-20 20:01:00 -04:00
Laurentiu Mihalcea
f315bbaf6c firmware: scmi: clk: fix invalid command name
SCMI_CLK_MSG_CLOCK_GET_PERMISSIONS was renamed to CLOCK_GET_PERMISSIONS.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-05-20 16:45:13 +02:00
Sylvio Alves
330a8e19f1 drivers: wifi: esp32: use generic wifi_sta_auto_dhcpv4 option
Drop the Espressif-specific ESP32_WIFI_STA_AUTO_DHCPV4 Kconfig and
switch the driver to the generic WIFI_STA_AUTO_DHCPV4 option added
in the Wi-Fi L2 layer. The new option provides the same behavior
across all in-tree Wi-Fi drivers, allowing applications to control
automatic DHCPv4 start uniformly regardless of the underlying SoC.

A migration note is added so applications that previously disabled
the vendor option know to disable the generic one instead.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-20 14:13:17 +02:00
Chun-Chieh Li
6021eef82e drivers: clock_control: numaker: skip void clock module
Some peripherals e.g. some chips' GPIO ports may have their clocks
fixed to enabled and their clock module IDs are not defined. Skip these
modules when they are passed in.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2026-05-20 14:13:12 +02:00
Jordan Yates
0588a5aed5 Revert "entropy: psa: Deprecate psa entropy driver"
The option was deprecated without a migration path or reasoning. The PSA
interface is the only source of entropy for some setups. For example
TF-M, as the crypto hardware is on the secure side. Deprecating the
symbol while it is still enabled by default from devicetree just leads
to compiler warnings and confusion.

This reverts commit 04b003a5b1.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-05-20 14:11:21 +02:00
Shan Pen
ee4b636d5c eth: phy: rtl8211f: make RGMII delay configurable
Follow the pattern used by other PHY drivers and expose the
RTL8211F RGMII clock delay mode in devicetree.

Some MAC drivers, such as Renesas RA RMAC, can provide part of
the RGMII delay themselves. Boards then need a way to avoid
enabling the same delay in the PHY.

Keep the fallback at RX and TX delay enabled, matching the old
driver behavior for existing users.

Signed-off-by: Shan Pen <bricle031@gmail.com>
2026-05-20 14:09:01 +02:00
Sylvio Alves
cd51d08a05 drivers: serial: lpuart_esp32: reset register after clock enable
The LP_UART parameter configuration enabled the bus clock and
selected the source clock without asserting the reset register
in between. After a soft reset the LP_UART hardware could keep
stale state from the previous boot, leading to garbled output
until a power cycle cleared the registers.

Insert the missing lp_uart_ll_reset_register() between the bus
clock enable and the source clock selection.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-20 14:08:52 +02:00
Sylvio Alves
7be342b190 drivers: mipi_dbi: esp32: enable lcd bus clock and reset
The driver only enabled the LCD core clock, so operation relied
on the LCD bus clock being left enabled by ROM or the
bootloader. If the bus clock is gated by a later peripheral
teardown the LCD registers become inaccessible.

Enable the LCD bus clock and assert the reset register before
initializing the HAL.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-20 14:08:52 +02:00
Sylvio Alves
89e33bff59 drivers: i2s: esp32: enable core clock at init
clock_control_on() only enables the bus clock and asserts the
reset. The matching core clock must be enabled separately on
chips with independent reset and clock control, otherwise the
register writes that configure the sampling clock can stall
the bus.

Add an explicit i2s_ll_enable_core_clock() call right after
clock_control_on().

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-20 14:08:52 +02:00
Sylvio Alves
881978f13f drivers: adc: esp32: fix dma init clock and reset sequence
The DMA path enabled the SARADC bus clock directly with
adc_ll_enable_bus_clock() and adc_ll_reset_register(), which
skips the function clock on chips where reset and clock control
are independent and also skips the temperature sensor register
preservation. On ESP32-C3 this left the SAR analog block in a
state where writing the digital controller timer enable bit
stalled the bus and hung the driver on the first DMA read.

Replace the manual sequence with adc_apb_periph_claim() and add
sar_periph_ctrl_adc_reset() at the start of every DMA read.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-20 14:08:52 +02:00
Sylvio Alves
0277fbcfa8 drivers: i2c: esp32: use the renamed hw fsm reset macro
The driver guarded the manual FSM recovery path with
SOC_I2C_SUPPORT_HW_FSM_RST, which no longer exists. The actual
HAL macro is I2C_LL_SUPPORT_HW_FSM_RST, so the guard always
evaluated false and the hardware FSM reset shortcut was never
taken on chips that support it.

Switch the guard to the new name.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-20 14:08:52 +02:00
Sylvio Alves
a2cedb9fc2 drivers: dma: esp32: derive shared irq config from devicetree
The GDMA_LL_AHB_TX_RX_SHARE_INTERRUPT macro used to gate the
shared rx/tx interrupt handler is no longer defined in the HAL,
so the guard always evaluates false and breaks the IRQ wiring
on ESP32-C2 and ESP32-C3.

Replace it with a check derived from devicetree that compares
the declared interrupt count against the channel pair count.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-20 14:08:52 +02:00
Sylvio Alves
f0cf229864 drivers: counter: esp32_tmr: fix absolute alarm late detection
The previous late-detection logic for absolute alarms built the
target as (now & ~0xFFFFFFFFULL) | ticks and pushed it into the
next 32-bit window when the value was behind the counter. This
treated a target of ticks=0 after the counter had advanced as a
far-future alarm rather than a late one, so -ETIME was returned
only in the small window where now itself was below
guard_period.

Use a modular comparison instead: compute the forward distance
to the target modulo top + 1 and flag the alarm as late when
that distance exceeds top - guard_period. The hardware alarm
register is still programmed with the actual future target.

Also reset the counter to zero on counter_stop so the
capability probe in late_detection_capable does not leave the
counter past the guard window for the next test.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-20 14:08:28 +02:00
Tim Pambor
a9afaa246e drivers: ptp_clock: Add native_sim PTP clock driver
Add a new PTP clock driver for the native_sim board, allowing
it to simulate a PTP clock for testing and development purposes.

This replaces the previous implementation of the PTP clock
functionality that was integrated into the eth_native_tap ethernet
driver.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-05-20 14:08:19 +02:00
Laurentiu Mihalcea
1ec33542e7 firmware: scmi: make protocol command IDs private
SCMI stack users don't need access to the SCMI command IDs. Thus, they
can be made private to the protocol module making use of them.

Since the command IDs are private now, their corresponding macro names can
be aligned with those found in the SCMI spec.

Furthermore, remove definitions for the commands that are common to all
protocols:

	* PROTOCOL_VERSION (0x0)
	* PROTOCOL_ATTRIBUTES (0x1)
	* PROTOCOL_MESSAGE_ATTRIBUTES (0x2)
	* NEGOTIATE_PROTOCOL_VERSION (0x10)

since Zephyr already implements these in common.c.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-05-20 14:08:05 +02:00
Laurentiu Mihalcea
1163e2ee6a firmware: scmi: base: remove common command ID definitions
These commands are already implemented in common.c so there's no need for
each protocol to define or implement these commands.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-05-20 14:08:05 +02:00
Guillaume Legoupil
a63034734e drivers: ieee802154: mcxw_get_eui64() get IEEE802154 address using NVMEM
The IEEE 802.15.4 address is moved from flash hw_params_partition
to internal IFR0.
Abstraction layer is done by using CONFIG_NVMEM.

Signed-off-by: Guillaume Legoupil <guillaume.legoupil@nxp.com>
2026-05-20 14:07:54 +02:00
Carlo Caione
dbb2ddddca lora: native: sx126x: add blocking lora_recv_duty_cycle
Add a synchronous counterpart to lora_recv_duty_cycle_async that
blocks until a packet is received or the timeout expires, then
stops the duty cycle and returns the data. This mirrors the
lora_recv / lora_recv_async pairing.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-05-20 14:07:35 +02:00
Muhammad Waleed Badar
79a6368540 drivers: firmware: add raspberry pi videocore firmware
The firmware provides an interface between the ARM CPU and the
VideoCore GPU for system management and platform services on
Raspberry Pi devices. It allows the ARM to communicate with the
VideoCore firmware through mailbox property channels to perform
operations such as framebuffer allocation, display configuration,
clock and power management, thermal queries, memory configuration,
and other board-specific services.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-05-20 14:07:04 +02:00
Muhammad Waleed Badar
07597ffcf6 drivers: mbox: broadcom: add bcm2711 mbox driver support
Add support for Broadcom VideoCore mailbox controller driver
for BCM2711 (Raspberry Pi 4). This driver exposes two mailbox
instances, mbox0 and mbox1, where mbox0 is used by the VideoCore
GPU to signal the ARM CPU, and mbox1 is used by the ARM CPU to
signal the VideoCore GPU.

Parts of the driver is based on Yoan Dumas pull request that was
https://github.com/zephyrproject-rtos/zephyr/pull/88501

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Signed-off-by: Yoan Dumas <yo_dumas@hotmail.fr>
2026-05-20 14:07:04 +02:00
Zayne Stites
1b78978026 drivers: serial: uart: make Infineon poll_in non-blocking
Per the uart_polling header documentation, this API should
not block.  Updating this API to simply check and return
instead of spinning until it gets a value.

Assisted-by: Claude:claude-opus-4.7

Signed-off-by: Zayne Stites <Zayne.Stites@infineon.com>
2026-05-20 10:58:09 +02:00
Laurentiu Mihalcea
e275b878f5 firmware: scmi: shell: clk: handle state control restrictions
On some systems, an agent may be restricted from enabling/disabling
certain clocks. Trying to do so would result in a DENIED error from
the platform.

Instead of throwing a generic error when the enable/disable operation
fails, first check if the targeted clock has any state control
restrictions. If so, let the user know with a more specific message and
then abort the operation.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-05-20 10:56:42 +02:00
Laurentiu Mihalcea
e4e8f5afb7 firmware: scmi: clk: handle state control restrictions
On some systems, an agent may be restricted from enabling/disabling
certain clocks. Trying to do so would result in a DENIED error from the
platform.

To handle such cases, first check if the targeted clocks has state control
restrictions. If so, skip the enable/disable operation and inform the
caller that the operation was successful.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-05-20 10:56:42 +02:00
Laurentiu Mihalcea
6cf3af34f4 firmware: scmi: clk: implement CLOCK_GET_PERMISSIONS command
Add function implementing the CLOCK_GET_PERMISSIONS command.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-05-20 10:56:42 +02:00
Haoran Jiang
5e84358759 drivers: regulator: sf32lb: add SF32LB52x peripheral LDO driver
Add a regulator driver for the SF32LB52x internal peripheral LDOs
controlled by PMUC

Assisted-by: Copilot:claude-sonnet-4.6

Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
Signed-off-by: Zhengyu Yan <859361238@qq.com>
2026-05-20 10:55:16 +02:00
Zhaoxiang Jin
f25b49d872 mipi_dbi: dcnano_lcdif: use clock control
Allow the DCNano LCDIF MIPI DBI driver to request the optional
devicetree clock before touching the LCDIF registers.

This aligns the DBI frontend with the shared RT7xx clock-control
model.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-20 10:54:37 +02:00
Zhaoxiang Jin
5ceea5ed86 display: mcux_dcnano_lcdif: use clock control
Allow the display driver to request the optional devicetree clock
before it initializes the LCDIF block.

This removes the remaining dependency on board-level LCDIF gate
enablement for the display path.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-20 10:54:37 +02:00
Zhaoxiang Jin
26e4a02a01 clock_control: mcux_syscon: add RT7xx LCDIF gate
Add the RT7xx LCDIF clock identifier and extend the shared MCUX
SYSCON clock control driver so devicetree clients can enable the
LCDIF gate through the standard clock-control API.

Keep this shared infrastructure change limited to LCDIF on this
branch.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-20 10:54:37 +02:00
Zhaoxiang Jin
2662fa9ccb mipi-dbi: nxp: dcnano-lcdif: add reset controller support
add reset controller support for mipi_dbi_nxp_dcnano_lcdif.c driver,
and use reset controller API to release reset in the driver if available.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-20 10:54:37 +02:00
Zhaoxiang Jin
32e32913a3 display: mcux: dcnano-lcdif: add reset controller support
add reset controller support

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-20 10:54:37 +02:00
Albort Xue
e076682661 drivers: clock_control: Add NXP MCXW clock control driver
This commit introduces a new clock control driver for NXP MCXW series
microcontrollers, replacing the previous hardcoded clock initialization
in soc.c with a devicetree-based approach.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2026-05-20 10:54:22 +02:00
Sven Hädrich
bad5a0b5d1 drivers: dali: Add driver for Zephyr PWMs
Implementation of a DALI driver for mcus
that provide a PWM interface for zephyr.
The Zephyr specific PWM, counter, and gpio
nodes handle the work. Hence, the `zephyr`
vendor prefix is used for the binding.
The code is tested for the STM32F091 mcu and
for the nRF52840 mcu.

Signed-off-by: Sven Hädrich <sven.haedrich@sevenlab.de>
2026-05-20 10:54:05 +02:00
Sven Hädrich
cb5fbe2036 drivers: dali: Add generic driver API
Defines the generic interface for the
DALI driver.

Signed-off-by: Sven Hädrich <sven.haedrich@sevenlab.de>
2026-05-20 10:54:05 +02:00
Ryan McClelland
78dfbf1833 drivers: sensor: bmp581: make INT pin polarity and drive type configurable
The streaming code previously hard-coded the INT pin as active-high
push-pull when writing INT_CONFIG. Add two boolean DT properties,
int-active-low and int-open-drain, and thread them through
bmp581_config so boards with active-low or open-drain INT wiring can
be supported without patching the driver.

Defaults preserve the previous hard-coded behavior (active-high,
push-pull) so existing in-tree boards do not need DT changes. Boards
with active-low INT wiring set int-active-low, which programs
BMP5_INT_POL_ACTIVE_LOW into INT_CONFIG. Note that the GPIO flags on
int-gpios must agree with the chip-side polarity setting.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-05-19 17:49:34 -04:00
Ryan McClelland
c68a25e4d5 drivers: sensor: bmp581: add PM device action support
Add a CONFIG_PM_DEVICE action handler that maps PM_DEVICE_ACTION_RESUME
to the devicetree-configured power-mode (NORMAL/FORCED/CONTINUOUS) and
PM_DEVICE_ACTION_SUSPEND to STANDBY, reusing set_power_mode() so the
mandatory STANDBY transition before entering an active mode (datasheet
section 4.3.7) is preserved. PM_DEVICE_DT_INST_DEFINE is wired into the
SENSOR_DEVICE_DT_INST_DEFINE call so the handler is registered for each
instance.

Add a bmp581_pm_busy_check() helper that returns -EBUSY when the device
is not PM_DEVICE_STATE_ACTIVE. The check is applied only to the
streaming branch of bmp581_submit(), because DRDY/FIFO interrupts only
fire while the device is in NORMAL or CONTINUOUS mode and a streaming
submission against a suspended device would otherwise wait forever for
an interrupt that cannot arrive.

Per datasheet section 4.3.1, STANDBY keeps all registers accessible for
read and write and preserves the last sample in the data registers, so
sample_fetch, channel_get, attr_set and the one-shot submit path are
deliberately left ungated. In particular IIR/FIFO/NVM writes (section
4.3.8) require STANDBY, and BMP5_ATTR_POWER_MODE is the mechanism used
to leave STANDBY, both of which would deadlock if attr_set were gated.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-05-19 17:49:34 -04:00
Ryan McClelland
3106896eab drivers: sensor: bmp581: add SPI and I3C bus support
The BMP581 driver previously only supported I2C. Add SPI and I3C
transports by extending the existing RTIO-based bus abstraction with
two new bus types (BMP581_BUS_TYPE_SPI, BMP581_BUS_TYPE_I3C),
following the pattern established by the icm45686 driver.

For SPI, the read register address is OR'd with bit 7 (BMP5_SPI_RD_MASK)
per the datasheet, and bmp581_init() performs the SPI activation dummy
read both before and after soft-reset (the device boots and reverts to
I2C/I3C mode on reset and requires a 16-SCK transaction with CSB
asserted to switch to SPI). For I3C, RTIO_IODEV_I3C_STOP/RESTART flags
are set on the read/write SQEs.

The BMP581_INIT macro now uses COND_CODE_1 to dispatch on the bus type
and instantiate the appropriate I2C/SPI/I3C iodev. Kconfig selects
I2C/SPI/I3C and the corresponding *_RTIO option conditionally based
on which buses the matching DT nodes use.

The original bosch,bmp581.yaml is split into a common binding plus
per-bus bindings (bosch,bmp581-i2c.yaml, bosch,bmp581-spi.yaml,
bosch,bmp581-i3c.yaml) that include the bus-specific yaml. Test nodes
for SPI and I3C are added to the build_all sensor test.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-05-19 17:49:34 -04:00
Nicolas Pitre
90d1963745 sys: util: move lowercase min/max/clamp to a new minmax.h
Since commit 37717b229f ("sys: util: rename Z_MIN Z_MAX Z_CLAMP to min
max and clamp"), <zephyr/sys/util.h> unconditionally defines function-
like macros named `min`, `max`, and `clamp` in the global namespace (in
C mode). util.h gets pulled in transitively by very broad headers,
including the POSIX layer's <pthread.h>, so any third-party C code that
uses these names as ordinary identifiers (e.g. XNNPACK's static `clamp`
helper and its public `clamp` struct field) fails to build as soon as
<pthread.h> is included.

Following the approach used by Linux, move the lowercase `min`, `max`,
`min3`, `max3`, and `clamp` macros (and their helpers) into a new
<zephyr/sys/minmax.h> header that has to be included explicitly by
source files that want them. util.h keeps the uppercase MIN/MAX/CLAMP,
so most code is unaffected; only the (much smaller) set of files that
actually use the lowercase variants needs to pick up the new include.

Fixes #107853.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-05-19 17:49:24 -04:00
Fin Maaß
0dcf6a345a serial: uart: change return type of irq_update to void
the return value of uart_irq_update() is not relevant,
therefore change it to void.

Also as most uart drivers don't need irq_update, make
it optional to implement this function in the driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-19 17:46:51 -04:00
Fin Maaß
4156093121 serial: uart: remove empty irq_update implementations
remove empty  irq_update implementations.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-19 17:46:51 -04:00
Fin Maaß
675231df7a drivers: serial: remove syscall from interrupt only functions
remove syscall from uart_irq_update() and
uart_irq_is_pending() as these are only allowed in
the interrupt.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-19 17:46:51 -04:00