Commit graph zephyr/drivers
Author SHA1 Message Date
Benjamin Cabé
bda0a8b450 drivers: sensor: bq274xx: reconfigure gauge after shutdown resume
Exiting shutdown mode causes a POR that reverts the gauge data memory
to its ROM defaults, but data->configured was never cleared, so devices
using zephyr,lazy-load kept reporting values computed from the default
design parameters. Clear the flag on resume so the next sample fetch
reprograms the gauge.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-27 21:22:49 +01:00
Benjamin Cabé
d6c660d619 drivers: sdhc: sam_hsmci: Fix inverted byte mode in manual transfers
The aligned path clears FBYTE and computes a word count but set
byte_mode to true, and the unaligned path did the opposite, so
manual transfers moved a quarter of the data or overran the buffer
fourfold. Swap the two assignments to match the FBYTE setting.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-08-27 21:22:30 +01:00
Mathieu Choplain
0bfc5c1f06 drivers: ipm: stm32_ipcc: use LL_IPCC_GetChannelNumber() on all series
The LL_IPCC_GetChannelConfig() function is Zephyr-specific and was added
via a patch to hal_stm32 when STM32CubeMP1 v1.0.0 was in use, as this
version of the package lacked a function to get the number of channels
in the IPCC...

In STM32CubeMP1 v1.1.0, function LL_IPCC_GetChannelNumber() was added
and should have replaced the custom one... but never did! Both the
custom function and its user lingered in tree since then...

Since LL_IPCC_GetChannelNumber() exists in both MP1 and MP2 packages
and is the *official* name, drop the #if series check and just use
that function unconditionally on all series. This will allow removal
of the custom LL_IPCC_GetChannelConfig() in the future.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-08-27 07:24:01 -07:00
Sylvio Alves
b5b92e8992 drivers: spi: esp32: program the clock source pre-divider
The divider was left at its reset value, so with a pll source
the peripheral input exceeds its limit and the first clocked bit
is corrupted on esp32p4. Compute an even divider that respects
the limit and program it when the device is configured.

Assisted-by: Claude:opus-4-8
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-08-27 07:22:46 -07:00
Sylvio Alves
45b80b04da drivers: spi: esp32: wait for completion in interrupt mode
The interrupt path released the context without waiting, so a
synchronous caller could read the rx buffer while the isr was
still filling it. Wait for completion before releasing.

Assisted-by: Claude:opus-4-8
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-08-27 07:22:46 -07:00
Sylvio Alves
a0f307bbcb drivers: clock_control: esp32: initialize the clock tree
Without this esp_clk_tree_enable_src() is a no-op, so the pll
reference branches keep their cold-boot state. On esp32p4 the
80 MHz branch comes up gated and the timers never tick. Run it
from the clock driver rather than early boot, where gating the
branches stalls the flash bus.

Assisted-by: Claude:opus-4-8
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-08-27 07:22:46 -07:00
Sylvio Alves
4f522033f4 drivers: adc: esp32: take the unit lock in the polling read
The polling read programmed the chip-global unit and started the
conversion unlocked, so concurrent reads could return another
caller's channel or attenuation. Take the same per-unit lock the
dma read path already uses.

Assisted-by: Claude:opus-4-8
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-08-27 07:22:46 -07:00
Sylvio Alves
cb4168ab3f drivers: crypto: esp32: program the aes key under the lock
The key registers are chip-global but the key was written once
at session start with no lock held, so two sessions with
different keys could encrypt under each other's key with no
error. Program the key inside aes_lock on every operation.

Assisted-by: Claude:opus-4-8
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-08-27 07:22:46 -07:00
Sergei Ovchinnikov
ea4ec54bbf drivers: watchdog: npm10xx: use mfd to configure GPIO usage
Centralise arbitration of GPIO usages using the MFD driver.

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2026-08-27 07:22:23 -07:00
Zhaoxiang Jin
bbb3ceab7d drivers: adc: mcux_lpadc: enable bandgap supply
Allow an LPADC channel node to reference an optional bandgap supply.
Enable the supply when channel setup selects the physical input
described by that node so continuous monitoring needs no additional
application control.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-08-27 07:21:12 -07:00
Zhaoxiang Jin
d94da57637 drivers: regulator: add NXP SPC bandgap buffer
Expose the buffered SPC bandgap output through the regulator API so
consumers can acquire it only while needed. Use the common regulator
reference counting and always-on policy instead of defining a separate
resource lifecycle.

The output has a fixed voltage and supports enable and disable operations.
Device PM restores the hardware state when an active regulator resumes.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-08-27 07:21:12 -07:00
Stephan Linz
7e710dae72 drivers: sensor: qst: qmi8658a: use Kconfig trigger template
Following the standard pattern for sensor Kconfig files and
allows access to the named choice symbol QMI8658A_TRIGGER_MODE
from out-of-tree Kconfig files. Also add conditional GPIO select
when any binded DTS node expose a int-gpios property.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2026-08-27 07:21:02 -07:00
Benjamin Cabé
b00b688668 drivers: dma: dw_axi: Fix resume register manipulation
CH_RESUME_WE() and CH_RESUME() expand to bit masks, but resume
passed them to WRITE_BIT(), which expects bit positions, shifting
by the mask value and leaving the suspend bit untouched. Operate
on the masks directly.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-08-27 07:20:03 -07:00
Måns Ansgariusson
839c682963 sys: __assert: migrate users away from __ASSERT_ON
Remove remaining uses of the internal __ASSERT_ON macro. Let __ASSERT()
handle disabled assertions, mark assert-only values as unused where needed,
and use CONFIG_ASSERT for assertion-only state.

Signed-off-by: Måns Ansgariusson <mansgariusson@gmail.com>
2026-08-27 12:12:11 +01:00
Måns Ansgariusson
33d6c54cbe sys: __assert: stop calling __ASSERT_MSG_INFO()
__ASSERT_MSG_INFO() is an internal helper of <zephyr/sys/__assert.h>, not a
public API. A handful of drivers and inline helpers called it directly to
emit a message without an accompanying assertion.

Replace those direct uses with the appropriate mechanism: LOG_ERR() for the
recoverable runtime error paths in the display, RTC, SPI and CRC code, and
__ASSERT(false, ...) for the out-of-range programming errors in the ADC and
DAC inline helpers.

Signed-off-by: Måns Ansgariusson <mansgariusson@gmail.com>
2026-08-27 12:12:11 +01:00
Jordan Yates
12d57bd872 net: invert ETH_DRIVER and NET_L2_ETHERNET
Invert the in-tree ethernet driver configuration logic.

The current logic is boards enabling `NET_L2_ETHERNET`, which then
unconditionally defaults `ETH_DRIVER` to enabled. This means that
`ETH_DRIVER` end up set for boards that use the L2 Ethernet layer but
don't have an ethernet device (see some WiFi drivers).

This commit:
 * Removes the `default y if NET_L2_ETHERNET` from `ETH_DRIVER`
 * Adds `default y if ETH_DRIVER` to `NET_L2_ETHERNET`
 * Adds `imply ETH_DRIVER` to `NET_QEMU_ETHERNET`
 * Updates in-tree ethernet boards to default `ETH_DRIVER` instead of
   `NET_L2_ETHERNET`

The outcome of this PR is that Kconfig can now use `ETH_DRIVER` to
reasonably assume that an actual ethernet driver is enabled.

Conversion of in-tree boards/samples performed by GPT-5.5.

Assisted-by: GPT-5.5
Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-08-27 12:11:50 +01:00
Benjamin Cabé
f1a0c6a9cf drivers: i2c: smartbond: use inclusive terminology
Update comments, log messages, Kconfig prose, and driver-local
identifiers to use the controller/target terminology ratified by
coding guideline A.2 and already used by the Zephyr I2C API.

Identifiers mirroring the Renesas Smartbond datasheet
(e.g. I2C_I2C_CON_REG_I2C_MASTER_MODE_Msk,
I2C_I2C_CON_REG_I2C_SLAVE_DISABLE_Msk,
I2C_I2C_CON_REG_I2C_10BITADDR_MASTER_Msk) are kept unchanged.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-27 12:11:43 +01:00
Farsin Nasar V A
074846699a drivers: watchdog: microchip: Update WDT G1 driver for PIC32CZ_CA
Update WDT G1 driver implementation to support PIC32CZ_CA

Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
2026-08-27 12:11:34 +01:00
Chang Jianpeng
ffbbb6f71e drivers: intc_gicv3_its: fix ITT size for non-power-of-2 vector counts
The MAPD command's size field declares ITT capacity as 2^(size+1).
The size was computed from nr_ites via fls_z(nr_ites) - 2, which is
only correct when nr_ites is a power of 2.

For non-power-of-2 values (e.g. 5), the resulting ITT is too small,
causing MAPTI commands for higher event IDs to be rejected by
hardware and the ITS command queue to time out.

Fix by rounding nr_ites up to the next power of 2 before computing
size and allocating ITT memory.

Signed-off-by: Chang Jianpeng <changjianpeng@kylinos.cn>
2026-08-27 12:10:57 +01:00
Johann Fischer
71a921f31a drivers: dp: fix uninitialized value use in sw_get_pins()
The bitbang driver does not initialize the state value in sw_get_pins()
before using it.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-08-26 18:13:45 -07:00
Benjamin Cabé
516c226318 drivers: i2c: esp32: use inclusive terminology
Update comments, log messages, Kconfig prose, and driver-local
identifiers to use the controller/target terminology ratified by
coding guideline A.2 and already used by the Zephyr I2C API.

Identifiers mirroring the ESP-IDF HAL
(e.g. i2c_ll_master_*, i2c_hal_master_*, i2c_hal_slave_init) are kept
unchanged.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-26 18:12:30 -07:00
Benjamin Cabé
43c202d2d5 drivers: i2c: ameba: use inclusive terminology
Update comments, log messages, Kconfig prose, and driver-local
identifiers to use the controller/target terminology ratified by
coding guideline A.2 and already used by the Zephyr I2C API.

Identifiers mirroring the Realtek Ameba HAL
(e.g. I2CMaster, I2C_MASTER_MODE, I2C_SLAVE_MODE) are kept unchanged.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-26 18:11:52 -07:00
Mark Geiger
5f1f1f3c6f drivers: modem: add Quectel BG770 support
Initial support for Quectel BG770 cellular modem.

Signed-off-by: Mark Geiger <MarkGeiger@posteo.de>
2026-08-26 18:10:44 -07:00
Mark Geiger
d903fe78de drivers: modem: add Quectel BG770 support
Initial support for Quectel BG770 cellular modem.

Signed-off-by: Mark Geiger <MarkGeiger@posteo.de>
2026-08-26 18:10:44 -07:00
Bill Waters
7e255fecc4 drivers: gpio: infineon: implement pin_get_config callback
Implement the optional gpio_pin_get_config callback for the CAT1
(gpio_infineon) and PSoC 6 (gpio_psoc6) drivers. The PDL drive mode read
back with Cy_GPIO_GetDrivemode(), together with the HSIOM selection and
the output data register, is translated into the corresponding
gpio_flags_t so a configured pin round-trips through pin_get_config().

Assisted-by: AI (GitHub Copilot)
Signed-off-by: Bill Waters <bill.waters@infineon.com>
2026-08-26 18:09:24 -07:00
Bill Waters
4bca4776c9 drivers: gpio: psoc6: honor GPIO_OUTPUT_INIT_* for single-ended outputs
A single-ended output ignored GPIO_OUTPUT_INIT_HIGH/LOW and always came
up at the released level. Select the initial level from the requested
init flag and fall back to the released level only when neither is set.

Assisted-by: AI (GitHub Copilot)
Signed-off-by: Bill Waters <bill.waters@infineon.com>
2026-08-26 18:09:24 -07:00
Bill Waters
4ce2179187 drivers: gpio: psoc6: bound pin index before forming BIT(pin)
gpio_psoc6_config() formed BIT(pin) without validating pin, so an
out-of-range or absent pin could shift past the port-pin mask. Reject
pin >= the mask width and pins not present in port_pin_mask with
-EINVAL before the mask is used.

Assisted-by: AI (GitHub Copilot)
Signed-off-by: Bill Waters <bill.waters@infineon.com>
2026-08-26 18:09:24 -07:00
Bill Waters
8f58829f20 drivers: gpio: infineon: use input-buffer-off PDL drive modes
Program the CY_GPIO_DM_*_IN_OFF drive-mode variants and enable the input
buffer only when GPIO_INPUT is requested. The input-buffer control bit
(bit 3) is set on CAT1 and cleared on CAT2/PSoC4, so a pure output now
reads back without GPIO_INPUT and configure() stays consistent with the
pin_get_config() readback.

Apply the same input-buffer-off single-ended drive modes in gpio_psoc6,
rejecting the pull-up/pull-down combinations the open-drain and
open-source modes cannot represent.

Assisted-by: AI (GitHub Copilot)
Signed-off-by: Bill Waters <bill.waters@infineon.com>
2026-08-26 18:09:24 -07:00
Anas Nashif
80aa9b7783 drivers: intc: nxp_irqsteer: namespace the driver API
The IRQSTEER driver defines the z_soc_irq_* SoC multi-level
interrupt hooks directly, claiming the SoC's contract from a driver:
z_soc_irq_enable(), z_soc_irq_disable(), z_soc_irq_is_enabled() and
z_soc_irq_priority_set(), plus an internal helper that also sat in
the global z_soc namespace. Interrupt controller drivers should only
expose their own namespaced API; providing the SoC hooks is platform
glue and does not belong in a driver.

Rename the control functions to nxp_irqstr_irq_* following the
driver's existing internal prefix, declare them in a driver header,
make the internal enable/disable helper static, and provide the
z_soc_irq_* mapping from one shared platform file wired at the i.MX
family level, covering every SoC with an IRQSTEER devicetree node
(i.MX8/8M/8X ADSP on Xtensa, i.MX93/94/95 M cores on ARM).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-26 15:15:54 -04:00
Jordan Yates
36d5f4998b modem: cellular: move carrier state to modem_ppp
Move the interface carrier state out of `modem_cellular` into
`modem_ppp`, as the PPP module is the true "carrier" for the PPP
networking interface.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-08-26 15:15:26 -04:00
Benjamin Cabé
7252d109f5 drivers: i2c: max32: use inclusive terminology
Update comments, log messages, Kconfig prose, and driver-local
identifiers to use the controller/target terminology ratified by
coding guideline A.2 and already used by the Zephyr I2C API.

Identifiers mirroring the ADI MAX32 SDK and datasheet
(e.g. MXC_I2C_SlaveTransactionAsync, mxc_i2c_slave_event_t,
MXC_I2C_EVT_MASTER_WR) are kept unchanged.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-26 15:15:20 -04:00
Benjamin Cabé
b8fb77958f drivers: i2c: sf32lb: use inclusive terminology
Update comments, log messages, Kconfig prose, and driver-local
identifiers to use the controller/target terminology ratified by
coding guideline A.2 and already used by the Zephyr I2C API.

Identifiers mirroring the SiFli datasheet
(e.g. I2C_SR_MSD/I2C_IER_MSDIE/I2C_CR_MSDE, I2C_SAR, I2C_TypeDef
register map) are kept unchanged.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-26 15:15:13 -04:00
Benjamin Cabé
2ef509ff9e drivers: i2c: infineon: use inclusive terminology
Update comments, log messages, Kconfig prose, and driver-local
identifiers to use the controller/target terminology ratified by
coding guideline A.2 and already used by the Zephyr I2C API.

Identifiers mirroring the Cypress/Infineon PDL and HAL
(e.g. CYHAL_I2C_MASTER_*/CYHAL_I2C_SLAVE_* event macros,
cyhal_i2c_master_transfer_async, cyhal_i2c_slave_config_write_buffer)
are kept unchanged.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-26 15:15:00 -04:00
Benjamin Cabé
c1f282d4cd drivers: i2c: renesas_rz: use inclusive terminology
Update comments, log messages, Kconfig prose, and driver-local
identifiers to use the controller/target terminology ratified by
coding guideline A.2 and already used by the Zephyr I2C API.

Identifiers mirroring the Renesas FSP
(e.g. r_riic_master.h / r_iic_master.h, riic_master_extended_cfg_t /
iic_master_extended_cfg_t, i2c_master_* FSP types) are kept unchanged.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-26 15:14:54 -04:00
Benjamin Cabé
b0d3aa6c46 drivers: i2c: renesas_ra_sci: use inclusive terminology
Update comments, log messages, Kconfig prose, and driver-local
identifiers to use the controller/target terminology ratified by
coding guideline A.2 and already used by the Zephyr I2C API.

Identifiers mirroring the Renesas FSP
(e.g. i2c_master_cfg_t, i2c_master_event_t, i2c_master_addr_mode_t) are
kept unchanged.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-26 15:14:49 -04:00
Benjamin Cabé
364df59080 drivers: i2c: renesas_ra_iic: use inclusive terminology
Update comments, log messages, Kconfig prose, and driver-local
identifiers to use the controller/target terminology ratified by
coding guideline A.2 and already used by the Zephyr I2C API.

Identifiers mirroring the Renesas FSP
(e.g. r_iic_master.h / r_iic_slave.h include paths, iic_master_* /
iic_slave_* FSP types, i2c_master_* / i2c_slave_* FSP types) are kept
unchanged.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-26 15:14:49 -04:00
Filip Stojanovic
803db8bdea drivers: mspi: stm32: skip address phase - qspi
Same as on XSPI and OSPI, address phase of transaction
on QSPI was only skipped on WREN command. This commit applies
the same fix as on XSPI and OSPI - removes address phase on
every transfer that has addr_lenght = 0.

Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
2026-08-26 15:14:38 -04:00
Filip Stojanovic
4a69cbb7b5 drivers: mspi: stm32: skip address phase - ospi
Same as on XSPI, address phase of transaction on OSPI
was only skipped on WREN command. This commit applies
the same fix as on XSPI - removes address phase on
every transfer that has addr_lenght = 0.

Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
2026-08-26 15:14:38 -04:00
Filip Stojanovic
09ad0b9005 drivers: mspi: stm32: skip address phase when there is none
The MSPI XSPI driver enabled the address phase for every command
except for Write Enable, which induced to fail on reading JEDEC
ID. mspi_stm32_xspi_hal_address_size maps an address length of 0
to 24-bit address instead of reporting there is no address at all.
Read JEDEC ID failed because the command went out as a 0x9F opcode
followed by three address bytes, while the memory starts shifting
its ID right after the opcode (By the time the controller reached
the data phase the answer had already passed).
This fix skips the address mode whenever the transfer requests
no address. Verified on nucleo_u3c5zi_q + b_m2mem_pack1
(mb1928-33lb Winbond W25Q16JVSNIQ).

Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
2026-08-26 15:14:38 -04:00
Matheus T. dos Santos
60f7d7ca9c modem: cellular: dial the data call on demand via net_if admin state
Add CONFIG_MODEM_CELLULAR_ON_DEMAND_CONNECT (default n). When enabled, the
driver no longer dials the PPP data call during power-up; instead it parks
in a new AWAIT_DIAL state and dials only when a consumer admits the PPP
interface (net_if_up()), hanging the call up again on net_if_down(). This
lets a connectivity layer map connect / disconnect onto a real dial /
hang-up, so a connect after a disconnect re-dials.

The admin state is observed with a dedicated net_mgmt callback that
delegates two new events, DIAL and HANGUP. AWAIT_DIAL re-derives the
admin level on entry and self-delivers DIAL, so an ADMIN_UP edge that
arrived early is not lost; HANGUP tears the call down and returns to
AWAIT_DIAL.

When disabled (the default) behavior is unchanged: the data call is dialled
unprompted as part of power-up.

Signed-off-by: Matheus T. dos Santos <matheuswhite1@protonmail.com>
2026-08-26 15:14:25 -04:00
Anas Nashif
837578d953 bluetooth: name the parameters in function declarations
MISRA C:2012 Rule 8.2 requires every parameter in a function type to be
named, including the parameters of function pointer parameters.
The LLCP remote request helper, the LLL test and scan helpers and the
PSoC 6 BLESS receive thread left parameters unnamed. The BLESS thread
gets ARG_UNUSED() for the arguments it deliberately ignores.

Name them after the arguments the documentation or the
definitions already use. No functional change.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-26 15:14:19 -04:00
Jacob Wienecke
fc9e4177aa drivers: timer: mcux_os_timer: fix PM3 exit drift
The deep-sleep counter (1kHz RTC) used on platform RW61x stops at
zero and does not track PM3 exit recovery time. This causes two
issues:

1. After PM3 exit, the kernel sees unaccounted time remaining
   and enters a parasitic PM2 to fill the gap. Fix by adding
   the exit-latency back to the compensated sleep time in the
   OS timer driver (mcux_os_timer.c).

2. On counter overflow re-entry into PM3, the PM policy
   exit-latency subtraction is not applied since re-entry
   bypasses the PM framework. Fix by adjusting the RTC wakeup
   count in the SoC power re-arm loop (soc/nxp/rw/power.c).

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
2026-08-26 15:14:09 -04:00
Benjamin Cabé
fb999ffaae drivers: i2c: numaker: use inclusive terminology
Update comments, log messages, Kconfig prose, and driver-local
identifiers to use the controller/target terminology ratified by
coding guideline A.2 and already used by the Zephyr I2C API.

Identifiers mirroring the Nuvoton NuMaker BSP
(e.g. I2C_SetSlaveAddr, M_* status macros, S_* status macros) are kept
unchanged.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-26 16:07:39 +01:00
Jordan Yates
5fde24c35b modem: cellular: CELLULAR_EVENT_MODEM_SUSPENDED
Add a modem event that is output when the modem transitions back to the
idle state. This can be used by higher level application code to monitor
unexpected transitions from the `modem_cellular` state machine.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-08-26 16:01:30 +01:00
Jordan Yates
136f4bc66e modem: cellular: reject SUSPEND from system workqueue
Reject attempts to suspend modem cellular drivers from the system
workqueue. Suspending from the system workqueue cannot work for several
reasons:
  * `modem_cellular_delegate_event` handling runs on the workqueue
  * `modem_chat` relies on workqueue for executing any shutdown commands

Output the error to make it clear to users what is happening, and how to
avoid it (don't call `pm_device_runtime_put` from the system workqueue).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-08-26 15:58:17 +01:00
Jordan Yates
fe2be458a4 modem: cellular: select PM_DEVICE_DRIVER_NEEDS_DEDICATED_WQ
The `PM_DEVICE_ACTION_SUSPEND` implementation can block for excessive
durations, see:
```
ret = k_sem_take(&data->suspended_sem, K_SECONDS(30));
````
Blocking the system workqueue for this long is a very bad idea even if
it did work, and it doesn't, because the modem libraries also depend
on the system workqueue to operate correctly.

This is the exact situation the dedicated workqueue was added for, use
it.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-08-26 15:58:17 +01:00
Tahsin Mutlugun
3b99a1be28 drivers: i3c: max32: Add device power management support
Implements power management interface for MAX32 I3C driver.

To restore the peripheral after resuming from a suspend-to-ram state,
use the controller-mode enable bit to detect whether the I3C controller
has lost its state.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-08-26 15:57:40 +01:00
Tahsin Mutlugun
e42ce27317 drivers: i3c: max32: Defer IBI rules setup until ENEC succeeds
Previously, `max32_i3c_ibi_enable()` updated IBI data and programmed the
IBI rules before enabling target interrupts by sending CCC ENEC to the
target. If ENEC failed, the driver ended up with IBI rules configured
for a target that did not enable interrupts.

Reorder the operations so that IBI rules are setup only if ENEC
succeeds.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-08-26 15:57:40 +01:00
Fin Maaß
0d5e2d2bea drivers: ethernet: nxp: s32: align devicetree with other snps,dwmac
align devicetree with other snps,dwmac controllers.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-08-26 15:57:24 +01:00
Arkadiusz Grzelka
a9f4198488 drivers: i2c: microchip: sercom g1: Reject an unreachable bitrate
i2c_baudrate_calc() clamps BAUD to its maximum when the requested bitrate
cannot be reached and reports success. On this board with a 72 MHz SERCOM
core clock, a node asking for 100 kHz got 137.1 kHz, measured with a logic
analyzer. The same branch catches the unsigned subtraction wrapping, which
it does for any reference clock below roughly 12 times the bitrate: a 1 MHz
reference asked for 400 kHz produces 1.9 kHz. Both directions are now an
error rather than a silent substitution. Clamping downwards is left alone -
a slower bus is always within spec.

The subtraction is guarded instead of being checked after the fact, so the
two directions are told apart before BAUD is computed. Every bitrate the
reference clock is too slow to reach now fails in one place, the clamped
ones included, and a bitrate too slow for the register keeps failing as
before. Both speed ranges run the same two tests with their own limits.
Reachable bitrates keep the BAUD values they had; the clamps are no loss
either, since each produced exactly the registers that the smallest valid
BAUD of its range produces.

The refusal reaches the caller as -EINVAL rather than -EIO: a configuration
that cannot be satisfied is not a transfer failure, and a caller that
retries on -EIO would otherwise retry forever. The other -EIO in the
function is left alone - a reference clock that reads back as zero really
is a failure to talk to the hardware.

Signed-off-by: Arkadiusz Grzelka <devitwise@gmail.com>
2026-08-26 15:52:08 +01:00