Commit graph zephyr/drivers
Author SHA1 Message Date
Benjamin Cabé
02949841e7 drivers: sensor: grow_r502a: fix RX packet length bound
The wire length field counts the payload plus the 2-byte checksum, but
the receive validator compared it against the payload-only package size,
so every full-size data packet was rejected with -EINVAL. Bound the
length by the receive buffer's body capacity instead, and widen the
checksum offset so a 256-byte package length cannot truncate it.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-02 17:37:42 -05:00
Benjamin Cabé
2a6607a554 drivers: sensor: grow_r502a: serialize LED API with the driver mutex
grow_r502a_led_on()/grow_r502a_led_off() called fps_led_control()
without holding drv_data->lock, so a concurrent LED request could
overwrite the shared UART tx/rx buffers of an in-flight sensor
transaction. Take the per-device mutex around the transport call, as
every other entry point does.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-02 17:37:42 -05:00
Jonathan Elliot Peace
9d4d87dd88 drivers: pinctrl: bcm2711: map registers once
device_map() hands out a new virtual mapping on every call and nothing
unmaps it, so reconfiguring pins at runtime leaks virtual address space
until k_mem_map() fails and the kernel panics.

Signed-off-by: Jonathan Elliot Peace <jep@alphabetiq.com>
2026-10-02 17:25:16 -05:00
Josuah Demangeon
a90cd40a5f drivers: wifi: bflb/wifi6: ignore RX-only key
In the hostap repo, since commit 13a30f10ce523ed341d907796d8dabcf382dd78f,
it now presents a key to the driver to avoid a race condition:

To avoid a race condition, wpa_supplicant now sends the key at step 3/4
instead of 4/4 to load the key before encrypted traffic abunds, but
requires to complete the TX message (4/4) unencrypted, so hardware has to
support setting the key for RX path only, not supported there, skipping,
waiting the key to be presented again in step 4/4.

This is explained in detail in the hostap commit.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-10-02 08:43:39 -05:00
Josuah Demangeon
98b420e0b3 drivers: wifi: bflb/wifi6: Allocate memory for hostap to free
modules/hostap/src/supp_main.c is calling os_free() on everything filled
in events, so the values passed need to be os_malloc()'ed.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-10-02 08:43:39 -05:00
Benjamin Cabé
841e840de6 drivers: display: ssd16xx: fix gate window for 180 degree rotation
With DISPLAY_ORIENTATION_ROTATED_180, the gate window was set to the
requested x range in reverse order instead of to the mirrored range, so
buffers narrower than the display were drawn at the horizontally
mirrored position. Mirror the gate window as the ROTATED_90 case does.

Tested on reel_board@2.

Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-10-02 08:42:30 -05:00
JiaXiang Liang
5b2953bef2 drivers: serial: esp32: fix async RX DMA accounting
The RX completion combined the EOF descriptor length with rx_offset,
which double-reported bytes after a finite idle timeout. The GDMA
driver also invokes the RX callback for non-EOF descriptor blocks.
Ignore block callbacks, derive an absolute buffer position from the
EOF descriptor, and protect callbacks and timeout work when RX is
rearmed.

Retain FIFO interrupt counting for RX disable before the open DMA
descriptor has written back its received length. Clamp the count to
the buffer and report only bytes beyond rx_offset. Clear a pending FIFO
interrupt when EOF has already consumed its bytes, so it cannot increment
the next buffer's counter.

Validate initial and successor RX buffer lengths against the UHCI
packet threshold, and clear RX state when DMA setup fails.

Signed-off-by: JiaXiang Liang <moonbite233@gmail.com>
Assisted-by: Codex:gpt-6
2026-10-02 08:32:18 -05:00
JiaXiang Liang
ad57e7b86f drivers: serial: esp32: disarm async RX interrupts when RX stops
An async RX buffer can be released without a successor while RXFIFO
level interrupts remain enabled. A byte left in the FIFO then keeps
the UART ISR running and starves the system timer.

Use the shared RX disable helper to mask interrupts at both async stop
points. Keep the PM lock release in the async paths, as interrupt-driven
RX does not hold that lock. Drop completion and timeout work after the
RX buffer has been released.

Signed-off-by: JiaXiang Liang <moonbite233@gmail.com>
Assisted-by: Codex:gpt-6
2026-10-02 08:32:18 -05:00
Benjamin Cabé
084daaa11d drivers: serial: sf32lb: fix uninitialized irq key on busy exit
uart_async_sf32lb_rx_disable() and uart_async_sf32lb_tx_abort() jump to
their shared unlock label when the DMA channel is busy, which is before
irq_lock() has run, so irq_unlock() writes an uninitialized value to
PRIMASK. Return -EBUSY directly, as the other async entry points
already do on the same check.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5
2026-10-02 08:22:17 -05:00
Benjamin Cabé
7567491a4f drivers: flash: cc23x0: pick the flash node by instance again
commit 7acfb6145f ("drivers: flash: unify SOC_NV_FLASH_NODE logic")
switched this driver to SOC_NV_FLASH_CHILD_NODE(), which only handles a
controller with one soc-nv-flash child. cc23x0 has two, the main sector
and the CCFG sector whose compatible list also carries soc-nv-flash, so
the macro expands to two juxtaposed node ids and nothing with flash
enabled compiles.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5
2026-10-02 08:21:54 -05:00
Shawn Yang
208541dc0c drivers: input: ft6146: register callback before enabling IRQ
An interrupt can arrive immediately after the GPIO interrupt is
enabled. Register the initialized callback first so that the first
touch edge is not lost during initialization.

Assisted-by: Codex:GPT-6
Signed-off-by: Shawn Yang <y810004@gmail.com>
2026-10-02 08:11:48 -05:00
Benjamin Cabé
3777ab9126 drivers: pinctrl: emsdp: Fix UART_B mux selection for PMOD B
The PMOD_B UARTB case OR-ed PM_A_CFG0_UART1b, which shifts into the
PMOD A mux field, so PMOD B was left unprogrammed and PMOD A's
setting was corrupted. Use PM_B_CFG0_UART2b, the otherwise unused
constant defined for this case.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-10-02 07:56:43 -05:00
Benjamin Cabé
44d35bc581 drivers: ipm: add missing verifier for ipm_complete
ipm_handlers.c covers the other four IPM syscalls but not ipm_complete,
so it was not dispatched.

Add the verifier. The object check is used rather than the driver-op
form because complete is optional and the struct member is absent
entirely when CONFIG_IPM_CALLBACK_ASYNC=n.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5
2026-10-01 21:43:21 -05:00
Benjamin Cabé
0f1b1edca7 drivers: sensor: tad2144: fix fractional part scaling in channel_get
The three converters produce an intermediate value in hundredths of a
unit but scaled the remainder by 1000, while sensor_value::val2 is
expressed in micro-units. Scale by 10000 instead so the reported
fraction is no longer ten times too small.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:37:56 -05:00
Benjamin Cabé
2a4deb7d71 drivers: sensor: tad2144: propagate bus and sample fetch errors
tad214x_sample_fetch() discarded the TAD214x_GetData() result and always
returned 0, and the I2C helpers ignored the i2c_write()/i2c_read()/
i2c_transfer() return codes, so transport failures were reported as
successful reads of stale or never-measured data. Check and propagate
those return codes instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:37:56 -05:00
Benjamin Cabé
f74b82178f drivers: sensor: tad2144: honour trigger handler in encoder mode
In encoder mode tad214x_trigger_set() installed the internal quadrature
decoder into drdy_handler, so the application callback was never stored
nor invoked, and it armed the ENCA/ENCB/ENCZ interrupts even when called
with a NULL handler to disable the trigger. The decoder is now a plain
internal step run from tad214x_thread_cb(), the caller's handler is
stored as in the non-encoder branch, and a NULL handler leaves the
encoder interrupts disabled.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:37:56 -05:00
Benjamin Cabé
837d06a3f0 drivers: sensor: tad2144: don't fail init without int-gpios
int-gpios is optional in the binding, but tad214x_init() unconditionally
called tad214x_trigger_init(), which returns -ENODEV for a bus instance
with no interrupt line, leaving the device not ready even for polled use.
Only initialize the trigger when an interrupt GPIO is present, drop the
redundant "default y" so TAD2144_TRIGGER_NONE works, and reject
trigger_set() on interrupt-less instances.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:37:56 -05:00
Benjamin Cabé
6d793f73e5 drivers: sensor: tdk: fix APEX pedometer cadence conversion
The cadence value is in u6.2 format, so the number of samples between
two steps is raw_val / 4, but the conversion divided by
raw_val + (raw_val & 0x03), double-counting the fractional bits and
dividing by zero when no cadence had been reported yet. Divide by
raw_val alone and report 0 steps/s when raw_val is 0.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:36:53 -05:00
Benjamin Cabé
d168e3956b drivers: sensor: icm42x70: fix FIFO frame stride on gyro-less parts
The FIFO packet size was hard-coded to include 6 gyroscope bytes, which
the ICM42370P never puts in a frame, so every frame after the first was
decoded at the wrong offset. Size the read from the actual FIFO
configuration and advance the decode index by the size the frame header
says the frame occupies.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:36:53 -05:00
Benjamin Cabé
78ee7a90f1 drivers: sensor: icm42x70: fix mutex leak on unsupported trigger
icm42x70_trigger_set() took the mutex and disabled the INT1 GPIO
interrupt before validating the trigger type, so returning -ENOTSUP left
the mutex held and the interrupt masked forever. Validate the trigger
type before acquiring anything so the error path has nothing to undo.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:36:53 -05:00
Benjamin Cabé
6b3500459e drivers: sensor: icm42x70: propagate attr_set configuration errors
icm42x70_attr_set() dropped the return value of every configuration
helper and always returned 0, so a rejected ODR, full-scale or APEX
setting looked applied to the caller, and a failed bus write still
updated the cached rate/range used to scale samples. Capture the helper
and HAL status codes, only commit the cached values once the register
write succeeded, and return the result from attr_set.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:36:53 -05:00
Benjamin Cabé
98f0e5cdf8 drivers: sensor: icm42605: enable tap when sensor already started
icm42605_trigger_set() relied on icm42605_turn_on_sensor() to push the
tap_en flag to the chip, but that helper returns -EALREADY once the
sensor is running, so a tap trigger registered after a data-ready
trigger never enabled APEX tap detection. Re-apply the FIFO/APEX
configuration in that case, and only re-enable the interrupt once the
registers have been written.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:35:54 -05:00
Benjamin Cabé
900853acd3 drivers: sensor: icm42605: clear sensor_started on power-down
icm42605_turn_off_sensor() powered down the accel/gyro and bypassed the
FIFO but left drv_data->sensor_started set, so a later re-arm made
icm42605_turn_on_sensor() bail out with -EALREADY and the device stayed
powered off forever. Clear the flag once the sensor is turned off.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:35:54 -05:00
Benjamin Cabé
ff66ff359f drivers: sensor: icm42605: sign-extend FIFO temperature byte
The 8-bit FIFO temperature field is two's complement, but the driver
cast the uint8_t FIFO byte directly to int16_t, zero-extending it and
turning every reading below 25 degC into a bogus 87..148 degC value.
Cast through int8_t so the sign bit is preserved.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:35:54 -05:00
Benjamin Cabé
9ddd67a49f drivers: sensor: icm42605: apply full-scale selector to FS_SEL field
icm42605_set_fs() ORed the raw full-scale index into ACCEL_CONFIG0 and
GYRO_CONFIG0 without shifting it into the FS_SEL field (bits 7:5), so
the range was always left at 000 (+/-16 g / +/-2000 dps) and both the
devicetree accel-fs/gyro-fs properties and SENSOR_ATTR_FULL_SCALE were
silently ignored. Shift the selector into place and derive the
sensitivity constants from the configured range instead of hard-coding
them, so reported values match the range actually programmed.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:35:54 -05:00
Benjamin Cabé
121dc066e4 drivers: sensor: bmi270: only cache range after successful write
set_accel_range() and set_gyro_range() updated the cached full-scale
range before writing the ACC_RANGE/GYR_RANGE register, so a failed
write left the cache disagreeing with the hardware and silently scaled
every subsequent sample. Commit the new range only once the register
write succeeds.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:33:46 -05:00
Benjamin Cabé
cfa54f59e4 drivers: sensor: bmi270: fix any-motion threshold full-scale
The anymo_2 threshold field spans bits [10:0] (1 LSB = 1/2048 g), but
the driver scaled the requested value with BIT_MASK(10), programming
half the requested threshold and capping the maximum at 0.5 g. Use the
correct 11-bit full scale and mask the field before shifting.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:33:46 -05:00
Benjamin Cabé
3d73d6b610 drivers: sensor: bmi270: abort config upload on first write error
The config-file upload loop reassigned ret on every iteration, so a
failed chunk write was overwritten by the next successful one and
write_config_file() returned 0 despite a corrupted upload. Stop the
loop as soon as a chunk write fails so the first bus error is
returned to bmi270_init().

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:33:46 -05:00
Benjamin Cabé
ba6ba6aba3 drivers: sensor: bmi270: clamp final config file upload chunk
write_config_file() always wrote BMI270_WR_LEN (32) bytes per chunk,
reading past the end of config files whose size is not a multiple of 32
(the default max_fifo image is 328 bytes, so the last chunk over-read 24
bytes). Clamp each chunk to the number of bytes actually remaining.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 21:33:46 -05:00
Benjamin Cabé
16d9d2b77c drivers: sensor: max32664c: fix motion config value truncation
The runtime data structure stored motion_time and motion_threshold as
uint8_t while the config structure and devicetree properties use
uint16_t, truncating the binding's default 500 milli-g threshold to 244
and rejecting motion times above 255 ms. Widen both fields to uint16_t.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 17:23:37 -05:00
Benjamin Cabé
4527be44e2 drivers: sensor: max32664c: fix skin contact channel data source
SENSOR_CHAN_MAX32664C_SKIN_CONTACT always read report.scd_state, which
is never populated in SCD only mode or in extended report builds, so it
returned a stale or zero state. Read the SCD classifier in SCD only mode
and the extended report field when extended reports are enabled.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 17:23:37 -05:00
Benjamin Cabé
7ec07a7453 drivers: sensor: max32664c: drain the FIFO in SCD only mode
The worker thread had no case for MAX32664C_OP_MODE_SCD, so the hub
FIFO was never read, the SCD report queue never filled and the status
byte was evaluated uninitialized. Add the SCD read/parse path, clear
the status byte before the switch and report the SCD classifier on the
skin contact channel when running in SCD only mode.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-01 17:23:37 -05:00
John Batch
3b083c6366 drivers: i2c: infineon_pdl: correct I2C recovery GPIO configuration
The GPIO configuration used for I2C recovery previously omitted the
GPIO_INPUT flag.  Due to a recent change in the behavior of the GPIO
driver, this caused the input buffer to not be enabled, and the GPIO was
always being read back as 0, and the bus was being reported as stuck.

This commit adds the GPIO_INPUT flag to the GPIO configuration for I2C
recovery so the GPIO can be read correctly.

Assisted-by: Copilot:claude-opus-5.5
Signed-off-by: John Batch <john.batch@infineon.com>
2026-09-30 20:09:55 +02:00
Bill Waters
118157466f drivers: serial: uart_infineon_pdl: cache uart_config only on success
ifx_cat1_uart_configure() stored the requested uart_config into
data->cfg at the top of the function, before ifx_cat1_uart_set_baud()
ran. When the requested rate is unachievable -- for example 9600 baud on
an SCB clocked from an 8-bit peripheral divider group, where the divider
needed overflows the register -- set_baud() fails and configure()
returns -ENOTSUP, but data->cfg has already been overwritten with the
rejected configuration.

Every subsequent uart_config_get() then returns the bad config, and each
per-test re-init re-applies and re-fails it, cascading a single rejected
reconfigure across an entire suite (observed as drivers.uart.async_api
failing on kit_psc3m5_evk after test_read_abort switches to 9600 baud).

Cache data->cfg only after set_baud() succeeds, so a rejected
reconfigure leaves the previously-applied configuration intact.

Verified on kit_psc3m5_evk/psc3m5fds2afq1 with an SCB on an 8-bit divider
group: uart_configure(9600) is rejected (-ENOTSUP) and uart_config_get()
now returns the prior 115200 config instead of the rejected 9600.

Assisted-by: AI (GitHub Copilot)
Signed-off-by: Bill Waters <bill.waters@infineon.com>
2026-09-30 20:09:13 +02:00
Merin George
acf1f9c489 drivers: uart: infineon: Fix IRQ-driven API hang and zero-length assert
The PDL asserts on zero-length FIFO reads and writes, which the UART
API allows; return 0 for them.

uart_irq_is_pending() and uart_irq_tx_ready() read the latched
interrupt status, which the PDL clears only after the callback
returns, so a callback looping on uart_irq_is_pending() never
returned. Use the RX and TX FIFO levels instead.

Tested with hci_uart on cyw920829m2evk_02/cyw20829b0lkml.

Assisted-by: Copilot:claude-opus-5.5

Signed-off-by: Merin George <merin.george@infineon.com>
2026-09-30 20:08:22 +02:00
Nahuel Mesa
4f22202a21 drivers: sensor: silabs: add EMU_TEMP internal die sensor for EFR32
Add a sensor driver for the EMU internal die temperature sensor on
Silicon Labs Series 2 (EFR32) SoCs, exposed via SENSOR_CHAN_DIE_TEMP.
Reads use sl_hal_emu_get_temperature() so the driver also works
unchanged on Series 3.

The devicetree models the EMU as a container node (silabs,emu) with
temp as a child, leaving room to represent other EMU functions later.

Enable the sensor and its die-temp0 alias directly in the
kg100s_rb4332a board devicetree, since it is an internal peripheral
with no board-specific wiring.

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Nahuel Mesa <nahuel.mesa@focus.uy>
2026-09-30 20:04:41 +02:00
Jinming Zhao
d060186b77 llext: export IRQ locking and cycle counter symbols
Export the SMP IRQ lock helpers used by irq_lock()/irq_unlock() and
the 32-bit counter used by k_cycle_get_32() and spinlock time limits.
These existing inline APIs leave imports in loadable extensions that
cannot resolve them without entries in the built-in symbol table.

Signed-off-by: Jinming Zhao <jinmzhao@qti.qualcomm.com>
2026-09-30 20:02:33 +02:00
Manimaran A
638022ee48 drivers: espi: xec: fix ACPI_EC1 host-io check
init_acpi_ec1() checked xec_acpi_ec2_cfg.host_io_addr before programming
the ACPI_EC1 I/O BAR from xec_acpi_ec1_cfg.host_io_addr. Check the
ACPI_EC1 configuration instead.

The branch is only compiled when neither ESPI_PERIPHERAL_EC_HOST_CMD
nor ESPI_PERIPHERAL_HOST_IO_PVT is enabled, while the enclosing block
requires one of them, so the code is currently unreachable and this has
no functional effect.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2026-09-30 19:46:47 +02:00
Manimaran A
65d80b8ac6 drivers: espi: xec: fix build without eSPI UART
hd_init_tbl[] references INIT_UART, which is only defined when
CONFIG_ESPI_PERIPHERAL_UART is enabled. The NULL defaults were named
INIT_UART0 and INIT_UART1 and were never used, so disabling the eSPI
UART failed to build with 'INIT_UART' undeclared.

Replace the unused defaults with an INIT_UART NULL default and note
that the driver exposes a single eSPI UART although the hardware
implements several UART logical devices.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2026-09-30 19:46:47 +02:00
Benjamin Cabé
4889cd3695 drivers: display: ssd16xx: update red RAM after SSD1675A partial refresh
The SSD1675A does not swap its black and red RAM after a partial
refresh, so the red RAM, which holds the previous image, went stale
and garbled later partial updates. Write the new image to the red RAM
on this controller.

Tested on reel_board@2.

Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-09-30 19:46:20 +02:00
Benjamin Cabé
b315009567 drivers: display: ssd16xx: report MONO01 pixel format
The controller RAM uses a set bit for a white pixel, but the driver
reported PIXEL_FORMAT_MONO10, so LVGL and the character framebuffer
rendered inverted images. Report PIXEL_FORMAT_MONO01.

Tested on reel_board@2.

Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-09-30 19:46:20 +02:00
Andrey Dodonov
4fb675be79 drivers: wifi: simplelink: fix errno sign in sendmsg
errno values are positive. Set ENOTSUP instead of -ENOTSUP so that
callers returning -errno report the failure.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
2026-09-30 19:43:53 +02:00
Michele Sardo
d4039f369d drivers: bluetooth: hci_stm32wba: report busy only on buffer exhaustion
Make BLECB_Indication() set ll_state_busy and return 1 only when packet
handling fails with -ENOMEM.

Previously, all receive errors were treated as a busy condition, including
malformed packets and other parsing failures. This could incorrectly signal
that the host was unable to accept data and trigger unnecessary
flow-control behavior.

Refactor treat_evt(), treat_acl(), and treat_iso() to return explicit error
codes and pass the received net_buf through an output parameter so the
caller can distinguish buffer exhaustion from other receive failures.

treat_evt() ignores discardable events on memory allocation failure without
returning an error

Fixes #118805

Signed-off-by: Michele Sardo <msmttchr@gmail.com>
2026-09-30 19:43:37 +02:00
YunHung Hua
daffd3aecf drivers: usb: common: stm32_pwr: fix build on STM32H503
Since commit 3cb68a9fc4 ("drivers: usb: common: stm32_pwr: add
support for STM32H5E/F line"), stm32_usb_pwr_enable() and
stm32_usb_pwr_disable() call LL_PWR_EnableVddUSB() and
LL_PWR_DisableVddUSB() on every STM32H5. STM32H503 has no PWR_USBSCR
register, as its USB transceiver is supplied from VDD (RM0492 Rev 3
section 9.4.5), and the HAL does not define these functions for it, so
any build that enables the USB device controller on it fails.

Call them only when PWR_USBSCR_USB33SV is defined, which is how this
file selected them on STM32H5 before that commit.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: YunHung Hua <oliverhua.us@gmail.com>
2026-09-30 19:43:23 +02:00
Pisit Sawangvonganan
885363d738 drivers: serial: infineon: use local pointers for async state
The async API, its DMA callbacks and event helpers repeat the full
data->async.dma_rx.<member> and data->async.dma_tx.<member> chains on
every access. The long, repetitive statements make the code hard to
read.

Take a local pointer to the stream (dma_tx, dma_rx) and to the async
context (async) at the top of each function that uses them, and rejoin
the statements that now fit on one line.

No functional change.

Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-09-30 19:42:56 +02:00
Pisit Sawangvonganan
bb6aac85a1 drivers: serial: infineon: make UART lookup tables static
data_bits_lut and stop_bits_lut are only used inside
uart_infineon_pdl.c. Give them internal linkage so they are no longer
exported as global symbols.

Also remove parity_lut. It was never referenced, because the parity
conversion already uses a switch statement.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-09-30 19:42:56 +02:00
Tim Pambor
fda20f6b31 drivers: ethernet: dwc_mac: ptp: support binary rollover mode
The PTP clock always selected digital rollover, where the sub-second
field counts nanoseconds. The 3.x core in STM32F1 predates that option:
its timestamp control register has no rollover select and its
sub-second field always counts in units of 2^-31 s, so the increment
was applied in the wrong unit and the values handed to the network
stack were off by a factor of about 2.15 and exceeded one second.

Digital rollover remains the default through the hidden KConfig option
PTP_CLOCK_DWC_MAC_DIGITAL_ROLLOVER, where the conversions are the
identity. The option is not offered on STM32F1, which therefore runs
in binary rollover mode.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-09-30 19:42:31 +02:00
Aric Radzin
a1e8d6f97c mgmt: mcumgr: transport: Deprecate UART and shell MTU Kconfigs
CONFIG_MCUMGR_TRANSPORT_UART_MTU and CONFIG_MCUMGR_TRANSPORT_SHELL_MTU
only set the value returned by the get_mtu callbacks of the UART and
shell transports, which the SMP layer does not use. Serial frames are
limited to MCUMGR_SERIAL_MAX_FRAME (127) bytes and the reassembled
packet size is limited by CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE.

Deprecate them along with the callback. They keep their default and
keep working until removal, and emit a deprecation warning when changed
from the default (on a separate symbol, due to Kconfig limitations).

Also fix the UART_MCUMGR_RX_BUF_COUNT help text, which related the
buffer count to the UART MTU. Each receive buffer holds one line until
it is decoded into the packet buffer, so the count only limits how many
fragments can be queued.

Fixes #54106

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Aric Radzin <aric.radzin@gmail.com>
2026-09-30 19:42:14 +02:00
Krzysztof Chruściński
9a3d3b19ff drivers: mbox: nrfx_ipc: Move initialization to PRE_KERNEL_1
Driver is not dependent on kernel and can be initialized very
early.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-09-30 19:41:51 +02:00
Marek Matej
04b67fa25a drivers: ieee802154: ESP32 rx timestamp and get_time
Add the frame timestamp upon reception.
Add get_time API call required for OpenThread.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2026-09-30 19:41:27 +02:00