Commit graph zephyr/drivers
Author SHA1 Message Date
Tim Pambor
a551157159 drivers: ethernet: dwc_mac: stm32: configure the DMA bus mode
The bus mode register was left at its reset value, so the AHB master
issued undefined length bursts and did not align them. Utilize fixed
length bursts with address aligned beats instead.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-09-16 07:38:36 +02:00
Tim Pambor
11cf016daa drivers: ethernet: dwc_mac: esp32: configure the DMA bus mode
The bus mode register was left at its reset value, so the AHB master
issued undefined length bursts and did not align them. Utilize fixed
length bursts with address aligned beats instead.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-09-16 07:38:36 +02:00
Tim Pambor
e10fab6eed drivers: ethernet: dwc_mac: 1000: set the programmable burst length
The DMA bus mode register was only ever written for the software reset
and the descriptor size, which left the programmable burst length at
its reset value of one beat, so the DMA moved a single beat per bus
transaction. Set it to 32 beats, which is what the vendor drivers of
every platform this core supports use.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-09-16 07:38:36 +02:00
Duc Viet Le
0b0a16d933 drivers: i3c: stm32: remove IBI semaphore from ISR
The controller IBI handler executes in interrupt context but uses
ibi_lock_sem with K_FOREVER. Semaphore takes from an ISR may only use
K_NO_WAIT.

The semaphore is only used by the IBI interrupt handler and does not
serialize against another execution context. Remove it instead of
introducing a non-blocking acquisition failure path.

Signed-off-by: Duc Viet Le <levietduc0712@gmail.com>
2026-09-16 07:33:59 +02:00
Fin Maaß
d285da6f2d drivers: esp_hosted_mcu: use NET_AF_UNSPEC
use the zephyr network API symbols and not the
posix one.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-09-16 07:33:49 +02:00
Benjamin Cabé
bc2e7d0353 drivers: serial: numicro: fix irq_update() signature
The uart_driver_api irq_update member is void (*)(const struct device *),
but numicro_uart_irq_update() still returns int, so building the driver
fails with an incompatible pointer type error. Make it return void,
which changes no behavior: the body is a no-op and uart_irq_update()
discards the value.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5
2026-09-16 07:33:47 +02:00
Jordan Yates
24c5a69e0d sensor: generic_emul: added
Implement a generic emulated sensor that echoes back configured sensor
readings. This simplifies testing of higher level libraries and drivers
that depend upon querying a device exposing the sensor API.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-09-16 07:33:15 +02:00
Måns Ansgariusson
0bde5ccbeb lib: ring_buffer: drop select/depends on RING_BUFFER
The slim ring buffer API is now header-only and always available and the
tree has already migrated from the _claim/_finish API, so the RING_BUFFER
symbol no longer gates any code.
Remove the now-redundant "select RING_BUFFER" and CONFIG_RING_BUFFER=y
entries across drivers, subsystems, samples and tests.

Signed-off-by: Måns Ansgariusson <mansgariusson@gmail.com>
2026-09-16 07:29:22 +02:00
Måns Ansgariusson
f1b5428545 drivers: serial: serial_test: drop CONFIG_RING_BUFFER guards
The ring buffer API is now unconditionally available, so the mock serial
driver no longer needs to compile its written/read_queue buffers and the
poll/queue/peek helpers conditionally.
Remove the #ifdef CONFIG_RING_BUFFER blocks and the -ENOTSUP fallback in
serial_vnd_poll_in().

Signed-off-by: Måns Ansgariusson <mansgariusson@gmail.com>
2026-09-16 07:29:22 +02:00
Gaofeng Zhang
905d5ff3ce driver: wifi: remove duplicate register iface to nm during init
remove duplicate register iface to nm during uap and wap_supplicant
in wifi driver.

Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
2026-09-16 07:28:52 +02:00
Humphrey Chiramba
04be086c63 driver/wifi/esp_mesh: Converted to runtime config
Made some items runtime configurable such as the SSID and PSK
In addition, the channel and mesh id can be configured during runtime
Removed Kconfigs relating to these items

Signed-off-by: Humphrey Chiramba <humphrey@plentify.co.za>
2026-09-16 06:00:26 +02:00
Benjamin Cabé
0c5a0c9e1d drivers: audio: codec_dummy: implement the required operations
start_output, stop_output and apply_properties are mandatory in the
audio codec interface and this driver does not define them, so calling
one of them dereferences a null pointer.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-09-16 05:52:28 +02:00
Zayne Stites
8a88b7868f drivers: i3c: dw: report -EALREADY when detaching an unattached device
i3c_detach_i3c_device() documents -EALREADY for a device that is not
attached, but this driver's detach callback still returned -EINVAL.

Signed-off-by: Zayne Stites <Zayne.Stites@infineon.com>
Assisted-by: Claude:claude-opus-5
2026-09-16 05:52:11 +02:00
Zayne Stites
3fa63091cf drivers: i3c: rstdaa_all: tolerate -EALREADY when detaching in rstdaa_all
i3c_detach_i3c_device can return -EALREADY if a device is
already detached. Update i3c_bus_rstdaa_all to handle this
return type as a non-error.

Signed-off-by: Zayne Stites <Zayne.Stites@infineon.com>
Assisted-by: Claude:claude-opus-5
2026-09-16 05:52:11 +02:00
Vivian Pais
ee19103833 drivers: gpio: mspm0: fix syntax error by encasing case in block
Enclose the GPIO_INT_MODE_EDGE case logic within a block to fix a
compilation failure caused by case label being directly followed
by a variable declaration.

Signed-off-by: Vivian Pais <v-pais@ti.com>
2026-09-16 05:51:41 +02:00
Jaeyeong Lee
e10fd3d579 drivers: modem: fix ST87MXX context type
Store the modem context using its actual type so future accesses through
the registration data remain type-correct. Remove the incompatible cast.

Fixes #113551

Assisted-by: Codex:gpt-5
Signed-off-by: Jaeyeong Lee <lee@jaeyeong.cc>
2026-09-16 05:49:39 +02:00
Zayne Stites
1f0ec6bffe drivers: i3c: dw: read the IBI status count from the right field
Fix mixup of QUEUE_STATUS_IBI_BUF_BLR (IBI data buffer level)
with QUEUE_STATUS_IBI_STATUS_CNT (number of queued IBI status entries).
Using BUF_BLR was causing under-reading while data was pending, and
over-reads while it wasn't.

Signed-off-by: Zayne Stites <Zayne.Stites@infineon.com>
Assisted-by: Claude:claude-opus-5
2026-09-16 05:44:32 +02:00
Zayne Stites
1014bdc684 drivers: i3c: dw: clear target DA-assign status when IBI is disabled
INTR_SLAVE_MASK enabled INTR_IBI_UPDATED_STAT and
INTR_DYN_ADDR_ASSGN_STAT unconditionally, but the INTR_STATUS
write in i3c_dw_irq was guarded by CONFIG_I3C_USE_IBI=y.  This was
causing my target to get stuck re-entering ISR and hang.

Resolving by removing INTR_IBI_UPDATED_STAT from the target
interrupt mask when IBI=n and moving the dynamic address handling
out of the IBI=y guard.

Signed-off-by: Zayne Stites <Zayne.Stites@infineon.com>
Assisted-by: Claude:claude-opus-5
2026-09-16 05:44:18 +02:00
Benjamin Cabé
c5ed2bc42b drivers: gnss: fix unused-function build error without PM_DEVICE
gnss_nmea_generic_suspend() is only called from
gnss_nmea_generic_pm_action(), which is compiled out unless
CONFIG_PM_DEVICE is set. Building with CONFIG_PM_DEVICE=n leaves it
unused and fails with -Werror=unused-function. Guard its definition
with the same #if CONFIG_PM_DEVICE used for the caller.

Found via a twister CI run building drivers.gnss tests for boards
without device PM enabled. Not built or run on hardware.

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-09-16 05:41:19 +02:00
Yuan Bian
e74c50de44 drivers: ethernet: e1000: enable broadcast accept mode
RCTL.BAM (bit 15) is required for the 8254x MAC to accept Ethernet
broadcast frames. Multicast promiscuous mode (RCTL.MPE) does not cover
broadcasts, so ARP, DHCP and other broadcast traffic is dropped in
hardware.

Set RCTL_BAM when programming RCTL at interface bring-up. With this
change, QEMU e1000 in TAP mode can complete ARP/DHCP and pass traffic.

Signed-off-by: Yuan Bian <bianyuan@kylinos.cn>
2026-09-15 14:41:30 +02:00
Han Zhao
964d93f985 wifi: nxp: increase wlcmgr_mon_task stack size when recovery enabled
When CONFIG_NXP_WIFI_RECOVERY is enabled, wlcmgr_mon_task handles
WIFI_RECOVERY_REQ by calling wlan_reset(CLI_RESET_WIFI) directly on
its stack. This performs a full WiFi disable+re-enable sequence whose
cumulative stack consumption (~4200 bytes) exceeds the default 3072
byte limit, causing a stack overflow:

  ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0
  Current thread: wlcmgr_mon_task

Increase the default stack size to 5120 bytes when NXP_WIFI_RECOVERY
is selected. Verified with kernel thread stacks: usage 4200/5120
(82%). Keep 3072 bytes for non-recovery builds to avoid wasting RAM.

Signed-off-by: Han Zhao <han.zhao@nxp.com>
2026-09-15 14:40:37 +02:00
Nate Murphy
7368650ab8 drivers: adc: ads1x4s0x: apply INPMUX defaults to correct variable
ads1x4s0x_channel_setup() applied ADS1X4S0X_REGISTER_INPMUX_SET_DEFAULTS
to `gain` instead of `input_mux`, so the INPMUX default was written to
the PGA accumulator (immediately overwritten by PGA_SET_DEFAULTS) rather
than the INPMUX byte. The behavior is unchanged because input_mux has
both MUX nibbles written unconditionally before use, but the code did
not do what it reads as doing. Fix the target variable.

Signed-off-by: Nate Murphy <nmurphy.mine@gmail.com>
2026-09-15 14:39:09 +02:00
Johann Fischer
b324a1000c drivers: udc: fix multiple instance support in UDC driver
The driver's endpoint configuration must be per instance.

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-09-15 14:39:01 +02:00
Maochen Wang
58bb0e085d drivers: wifi: nxp: use correct Kconfig symbol for 5 GHz support
The NXP Wi-Fi driver should use the Zephyr Kconfig symbol
CONFIG_NXP_WIFI_5GHz_SUPPORT instead of the internal wifi_nxp
symbol CONFIG_5GHz_SUPPORT which is only available through
an indirect macro alias.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2026-09-15 14:38:48 +02:00
Maochen Wang
1455d58383 drivers: wifi: nxp: propagate scan type for full-band scans
When a passive scan is requested without an explicit channel
list (full-band scan), the per-channel scan_type assignment
loop is skipped because band_chan[0].channel is zero. This
leaves chan_list[].scan_type at MLAN_SCAN_TYPE_UNCHANGED (0),
so the requested scan type is not propagated to the lower
layer for non-DFS channels.

Fix this by setting chan_list[0].scan_type after the channel
loop when no explicit channels are provided.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2026-09-15 14:38:48 +02:00
Ibrahim Abdalkader
96f705bdb7 drivers: wifi: esp_hosted: Walk the init event TLVs
The init event is a list of {tag, length, value} triplets, and which tags
the slave sends varies between firmware versions, so reading them at fixed
offsets logs the wrong values.

Look them up by tag, and check the event length against the frame length
before walking.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2026-09-15 14:37:12 +02:00
Ibrahim Abdalkader
ed60341ff5 drivers: wifi: esp_hosted: Set the WiFi mode at init
The slave boots in WIFI_MODE_NULL and leaves the mode to the host, but
the driver never selected one.

Set the mode to APSTA so that MAC address queries also succeed.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2026-09-15 14:37:12 +02:00
Anas Nashif
8321f2d743 drivers: serial: renesas_ra: use portable IRQ pending API
Replace direct NVIC pending-state calls with k_irq_set_pending()/
k_irq_is_pending()/k_irq_clear_pending(), dropping the dependency on
cmsis_core.h where nothing else needed it.

The NVIC_EnableIRQ()/NVIC_DisableIRQ() pair on the error interrupt
becomes irq_enable()/irq_disable().

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-09-15 14:34:03 +02:00
Anas Nashif
fe2100ba12 drivers: counter: renesas_ra_agt: use portable IRQ pending API
Replace direct NVIC pending-state calls with k_irq_set_pending()/
k_irq_is_pending()/k_irq_clear_pending(), dropping the dependency on
cmsis_core.h where nothing else needed it.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-09-15 14:34:03 +02:00
Zhaoxiang Jin
c750c0ea0a drivers: adc: mcux_lpadc: remove channel count Kconfig
Remove LPADC_CHANNEL_COUNT because the driver now obtains its logical
channel capacity directly from the HAL ADC_CMDL_COUNT value. Fixed
hardware capacity should not be exposed as an application setting.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-15 14:33:20 +02:00
Zhaoxiang Jin
07e3abd8f8 drivers: adc: mcux_lpadc: remove unused channel macro
Remove CHANNELS_PER_SIDE and its stale comment. The driver no longer
uses this macro because physical inputs are selected explicitly through
the channel configuration.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-15 14:33:20 +02:00
Zhaoxiang Jin
f1d5de1492 drivers: adc: mcux_lpadc: map logical to physical channels
Treat LPADC command slots as logical ADC channels and store each slot's
physical input configuration. Derive the logical channel count from the
HAL ADC_CMDL_COUNT value so unsupported channel IDs are rejected.

Exercise an MCXA156 logical channel mapped to physical input CH8A. The
ADC API test builds for MCXA156 in DMA and interrupt modes and for
MCXN947 with two logical channels.

Fixes #115563

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-15 14:33:20 +02:00
Johann Fischer
0afffc4c3c drivers: dap: fix sw_get_pins() for CLK and RESET
The values of the pins configured as GPIO_OUTPUT_* and GPIO_ACTIVE_LOW
would be always read as 1. And read back as 0 when configured as
GPIO_OUTPUT_* and GPIO_ACTIVE_HIGH. Means there is mismatch between the
actual state of the pins and value read back.

Example from an adapter where RESET is configured as ACTIVE_LOW:

pyocd> set pins 0x11
Pins mask = 0x10
SWCLK/TCK = 0 (mask 0x1)
SWDIO/TMS = 0 (mask 0x2)
TDI =       0 (mask 0x4)
TDO =       0 (mask 0x8)
nRESET =    1 (mask 0x10)
nTRST =     0 (mask 0x20)
pyocd> set pins 0x00
Pins mask = 0x10
SWCLK/TCK = 0 (mask 0x1)
SWDIO/TMS = 0 (mask 0x2)
TDI =       0 (mask 0x4)
TDO =       0 (mask 0x8)
nRESET =    1 (mask 0x10)
nTRST =     0 (mask 0x20)

Fix it by also configuring output pins as inputs. This commit only fixes
the CLK and RESET pins.

Now, sw_get_pins() returns correct values for CLK and RESET

pyocd> set pins 0x11
Pins mask = 0x11
SWCLK/TCK = 1 (mask 0x1)
SWDIO/TMS = 0 (mask 0x2)
TDI =       0 (mask 0x4)
TDO =       0 (mask 0x8)
nRESET =    1 (mask 0x10)
nTRST =     0 (mask 0x20)
pyocd> set pins 0x00
Pins mask = 0x0
SWCLK/TCK = 0 (mask 0x1)
SWDIO/TMS = 0 (mask 0x2)
TDI =       0 (mask 0x4)
TDO =       0 (mask 0x8)
nRESET =    0 (mask 0x10)
nTRST =     0 (mask 0x20)

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-09-15 14:33:08 +02:00
Nicolas Pitre
07727e82f8 drivers: timer: renesas_ra_ulpt: use the generic timer core
ULPT instance 1 free-runs and provides the cycle counter (its
down-counter read back inverted counts up); ULPT instance 0 is armed with
a relative delay and its underflow announces ticks. That is a RELOAD
backend whose cycle source is a genuine free-running counter, so the
driver keeps only timer_driver_cycle_get() (~INST1 counter) and
timer_driver_set_reload() (arm INST0), and the core takes over the tick
accounting and the tick-aligned deadline.

This removes the driver's open-coded "ticks - 1" adjustment and round-up
dance, the code carrying the "preserve the original behavior even though
it looks wrong; to be revisited" comment: the core computes the reload
from an absolute tick-aligned deadline. The private spinlock and the
announce baseline (cycle_announced) go with it.

The sloppy-idle sentinel branch goes as well. The core arms the longest
reload the hardware can hold instead of leaving whatever the previous arm
programmed in place.

Build-tested on ek_ra8m1 with CONFIG_PM=y, which is what selects this
driver as the system timer.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-09-15 14:32:49 +02:00
John Moore
25e8db729c drivers: gpio: mcux_rgpio: fix unprotected register writes
mcux_rgpio_port_set_masked_raw() and the pin direction update in
mcux_rgpio_configure() both perform a read-modify-write of a
port-wide register (PDOR, PDDR) without any protection. If a second
thread or an ISR touches the same port concurrently, the write can
land between the read and the write-back, and its effect is silently
lost: bits outside the caller's own mask/pin can be reverted to a
stale value.

Fix mcux_rgpio_port_set_masked_raw() by using the RGPIO peripheral's
dedicated set/clear registers (PSOR/PCOR) instead of a
read-modify-write on PDOR. These registers only ever affect bits
explicitly set in their argument, so the operation is atomic without
needing to disable interrupts.

PDDR has no equivalent set/clear alias, so protect the pin direction
update in mcux_rgpio_configure() with a per-device k_spinlock.
Convert the irq_lock()/irq_unlock() pair already guarding interrupt
configuration in mcux_rgpio_pin_interrupt_configure() to the same
spinlock, since irq_lock() only masks interrupts on the local core
and does not prevent a second core from touching the same register
concurrently on SMP platforms.

Signed-off-by: John Moore <john.moore@amulethotkey.com>
2026-09-15 14:32:22 +02:00
Mark Wang
0076172550 drivers: udc: mcux: cancel hal endpoint transfer in dequeue operation
udc_mcux_ep_dequeue() must both cancel the transfer already submitted to
the HAL controller and drop the requests still queued in the endpoint
FIFO. The HAL controller reports its cancelled transfer (with
-ECONNABORTED) from the driver thread through the complete_bufs path, so
cancelling the FIFO-queued requests from the dequeue caller's context
would deliver their callbacks out of order with respect to the
HAL-cancelled one.

Request the HAL cancellation via deviceCancel() inline, but defer the
FIFO cancellation to the driver thread so that all -ECONNABORTED
callbacks are delivered from the same context and in order. A new
UDC_MCUX_EVT_DEQUEUE event carries a per-endpoint bitmask (ep_dequeue)
of the endpoints awaiting FIFO cancellation; the thread walks the mask,
calls udc_ep_cancel_queued() for each endpoint under the UDC lock, and
signals completion through a condition variable (dequeue_cond). The
caller waits on that condvar so the operation still appears synchronous.

add k_sched_lock to avoid the meaningless context switch.

The busy-state clearing is removed, as the HAL driver's transfer
cancellation callback already handles it.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-09-15 14:30:59 +02:00
Mark Wang
a0975667e8 drivers: udc: mcux: use a driver thread and slist for completions
The NXP MCUX EHCI and IP3511 UDC drivers previously processed controller
events through a k_mem_slab event pool, a k_fifo, and the shared system
workqueue. Each notification allocated an event block, copied the HAL
message, and queued work; the slab could be exhausted under load and the
transfer buffer was only touched later in workqueue context.

Rework both drivers to use a dedicated per-instance driver thread woken
by a single k_event. Completed transfer buffers are now updated in place
in the HAL notification (ISR) context, detached from the endpoint queue,
and appended to a per-instance complete_bufs slist; the thread drains
the list and reports each buffer to the stack, then feeds the next
queued request. Multiple completions coalesce into a single
UDC_MCUX_EVT_XFER wake-up and bus reset is handled under
UDC_MCUX_EVT_RESET.

The now-unused event slab, k_fifo, and workqueue dependency are removed,
and Kconfig gains per-driver thread stack-size and priority options.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-09-15 14:30:59 +02:00
Bjarki Arge Andreasen
f9c0b7d92b drivers: regulator: nrf54l: hibernate feature
Implement driver for nrf54l regulator with hibernate (ship mode)
implemented.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2026-09-15 14:30:46 +02:00
Fin Maaß
515c0441a1 drivers: display: esp32_dsi: widen the pixel format storage
The pixel format from the devicetree was stored in a uint8_t, but
display_pixel_format values are bit flags and everything past
PIXEL_FORMAT_AL_88 (BIT(7)) was silently truncated to zero. Declaring
e.g. PIXEL_FORMAT_BGR_888 (BIT(9)) on the controller node then made
the bits-per-pixel check refuse every panel.

Signed-off-by: Fin Maaß <info@finmaass.de>
Assisted-by: Claude:claude-fable-5-1
2026-09-15 14:29:06 +02:00
Benjamin Cabé
ea5465204e drivers: sensor: bme680: fix gas resistance q31 overflow
The decoder scaled the compensated gas resistance by 2^11 and narrowed
the int64 product to int32 without saturating, so readings above
1,048,576 ohms wrapped and were decoded as negative resistances. Widen
BME680_GAS_SHIFT to 24 to cover the ~13.2 Mohm output range of the
Bosch compensation, and clamp the conversion result to int32 range.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-15 14:26:30 +02:00
Benjamin Cabé
4edc26d569 drivers: sensor: bme680: derive async measurement delay from oversampling
The RTIO chain waited for the heater duration plus a flat 25 ms, which
does not cover the TPH and gas conversion time (43 ms with the default
oversampling), so the FIELD0 read consumed the previous measurement.
Compute the wait from the configured oversampling settings instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-15 14:26:30 +02:00
Benjamin Cabé
b5dcdf29fc drivers: sensor: bme680: scale fetch timeout with heater duration
bme680_sample_fetch() polled the new-data status bit for a hard-coded
250 ms, which is far shorter than the 1943 ms heater duration selected by
CONFIG_BME680_HEATR_DUR_ULP, so every fetch returned -EAGAIN. Derive the
poll budget from BME680_HEATR_DUR_MS instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-15 14:26:30 +02:00
Benjamin Cabé
1048d9d9fe drivers: sensor: pac194x: fix swapped VBUS/VSENSE FSR config fields
The channel configuration loop accumulated vbus_mode into the byte
written as the NEG_PWR_FSR MSB (CFG_VS1..VS4) and vsense_mode into the
LSB (CFG_VB1..VB4), so both full-scale ranges were programmed into the
wrong halves of the register while the sample decoding still used the
modes as declared in devicetree, yielding silently wrong readings.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-15 14:26:08 +02:00
Benjamin Cabé
531599e096 drivers: sensor: pac194x: fix overflow check on accumulated power
The 128-bit overflow guard shifted int128_t.high, an unsigned field, so
any negative accumulated power made the discarded bits non-zero and the
read failed with -E2BIG. Compare the arithmetically shifted high word
against the sign of the reconstructed value instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-15 14:26:08 +02:00
Benjamin Cabé
9c0587c899 drivers: sensor: pac194x: enable devicetree-configured channels
pac194x_configure_channels() ended init by setting every CHn_OFF bit
and left data->channels[].enabled cleared, so sample fetch read nothing
and every channel get returned -ENODATA. Only turn off the channels the
devicetree does not describe, and mark the configured ones enabled.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-15 14:26:08 +02:00
Benjamin Cabé
bf1629ff9d drivers: input: renesas_ra_ctsu: report button release events
The button callback hardcoded value 1 and buttons_read() walked every
set bit of the FSP button status word without comparing it against the
previous sample, so a held button re-reported a press every polling
interval and a release was never reported at all. That status word is a
level bitmap, not a press event: touch_button_self_decode() sets the bit
on touch ON and clears it on touch OFF.

Keep the previous status in the group data, iterate only the bits that
changed, and pass the new state through the callback payload. The RX
CTSU driver already diffs the same FSP status word this way.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-15 14:25:48 +02:00
Benjamin Cabé
c1885e354f drivers: input: renesas_ra_ctsu: drop unreachable NULL payload check
The slider/wheel callback is only reachable through the static device_cb
table in this file, and its sole caller passes the address of a stack
variable, so the check can never fire. Drop it rather than keep a branch
that would silently swallow an event if a future caller got it wrong.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5
2026-09-15 14:25:48 +02:00
Benjamin Jurewicz
a26b120e96 drivers: uhc: max3421e: Handle multi-packet IN transfers
Use the endpoint maximum packet size when deciding whether an IN
transfer ended with a short packet. Comparing the received byte count
against the controller maximum incorrectly completes transfers on
endpoints with smaller packets.

This allows descriptor transfers from low-speed devices, whose endpoint
zero maximum packet size is eight bytes, to span multiple packets.

Signed-off-by: Benjamin Jurewicz <bjurewicz@internships.antmicro.com>
2026-09-14 15:42:17 -04:00
Benjamin Cabé
47482935d8 drivers: display: stm32_ltdc: scan out packed YUV 4:2:2
The STM32N6 controller converts YUV to RGB during scanout. Offer that as
PIXEL_FORMAT_YUYV, configured when the format is selected rather than per
frame, so pictures reach it through display_write() like any other.

Only the packed 4:2:2 order is offered: erratum ES0620, section 2.7.1,
says the planar YUV420 modes do not work. A pair of pixels shares its
chrominance, so an odd display width is rejected when the format is
selected, and a rectangle that would start or end inside a pair is
rejected when it is written.

The STM32MP13 and STM32MP2 controllers carry the same converter, but only
the STM32N6 HAL describes it. Key the code off the HAL definition of the
converter rather than an option of its own, so the format appears wherever
the HAL grows it.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-09-14 15:42:02 -04:00
Benjamin Cabé
54420d33cb drivers: audio: dmic_stm32_mdf: fix the clamp on 24-bit samples
BIT() has an unsigned type, so -BIT(23) is evaluated using unsigned
arithmetic and wraps to a large positive value instead of producing
-8388608. As a result, the bounds passed to CLAMP() are invalid. Use
explicitly signed constants for the 24-bit PCM limits instead.

Heard on an STM32N6570-DK, whose microphone produced a full-scale square
wave at pcm_width 24 and now records what is said to it.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-09-14 15:41:56 -04:00