Make DNS reconfigure path report errors and allow retries instead of
silently continuing after failures.
- Change dns_work_cb() to return int and propagate error conditions
- Reschedule DNS work on -EAGAIN in carrier-on timeout handler
- Log DNS update failures from +CGCONTRDP parsing
Improve socket receive robustness and concurrency.
- Move RX ring buffer from global to per-device instance storage
- Replace parser state booleans with atomic bit flags
- Reset parser flags at init and after completed transfers
- Add clearer error logs and propagate specific receive failures
- Use compact initializer style for crafted net_msghdr
- Raise parent mismatch log from warning to error
No functional behavior change expected on success paths, but failures
now surface and recovery can be retried.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Remove CONFIG_PM_DEVICE guards around the HL78xx PM handler so it is
always compiled. Register the driver PM action with
pm_device_driver_init() during init and return its result. Drop the
manual resume path and pm_device_init_suspended() branch.
This aligns the driver with the Zephyr PM framework and lets the PM core
manage suspend/resume consistently.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Introduce CONFIG_MODEM_HL78XX_COMMAND_BUFFER_SIZE to control the AT
command buffer size. Add cmd_buffer and cmd_len to modem_buffers and
dynamic_script/dynamic_chat to hl78xx_data to support dynamic scripts.
Add modem_dynamic_cmd_send_async() to send commands asynchronously with
response matching and a user callback. This complements the existing
synchronous path and improves flexibility for non-blocking operations.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
The MODEM_CHAT_SCRIPT_DEFINE timeout parameter was mistakenly treated as
milliseconds, but the API expects the value in seconds. Update the
timeout from CONFIG_MODEM_AT_SHELL_RESPONSE_TIMEOUT_MS to a fixed value
of 5 to reflect the correct unit.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Add the `DEVICE_API` wrapper to the remaining `spi_driver_api` instances,
ensuring that each driver API is placed in its respective linker section.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
The MSPM0 clock control code sets clk0 as the MCLK source without
checking if clk0 is enabled. This seems to cause the CPU to not run.
The changes in this commit will set clk0 as the MCLK source only if the
clk0 is enabled. The clk0 is considered enabled if a user defines the
the clk0-div property for the syspll node in the devicetree.
The mspm0g.dtsi defines the clk2x-div property for the syspll node in
the devicetree. The clock control code as is only allows either the
clk2x-div or the clk0-div property to be set but not both. This
essentially means the syspllclk2x was enabled, but clk0 was set as the
MCLK source.
The fix would also allow users to continue using the syspll node as it
is defined in the mspm0g.dtsi without having to override the node for each
board.
Signed-off-by: Lay Desai <lay.desai@he360.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize the extended configuration and set p_reg using the devicetree
register base address.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Add MAX42500 watchdog driver, including ability to configure voltage
monitors that can also generate reset conditions.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
The nRF91 Serial Modem application restarts the PPP automatically,
which breaks our re-dialing attempts if network already recovered.
Instead, request to CFUN=4 and PPP to stop, so that rest of dial
script can assume correct ordering of events.
The sequence of
AT#XPPP=1
AT+CFUN=1
AT#XCMUX=2
is very timing sensitive, as the last command switches CMUX channels,
but cannot anymore do it if PPP already started on DLC channel 2.
This is a bad design of AT#XPPP command which we workaround.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
If we stay in DORMANT state long enough, the CMUX channel might enter
power saving mode which will then block URC messages unless we deal
with RING event.
Also, change RING log level to DBG. It is too verbose otherwise.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
If we receive PPP_DEAD event before receiving the DEREGISTERED, we
could directly try to recover connection without waiting in the
dormant state.
If we would stay in the DORMANT state, the PPP_DEAD event is not
going to happen againt, and it would deadblock.
Depends on the modem, which is received first.
There is no guarantee of ordering.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When packet domain events are requested with AT+CGEREP=1 we receive
these +CGEV events that indicate the state of data connection.
This might not always be the same as being "registered".
The information could also be used if we want to use the default CID
in the future.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Configure all nRF70 GPIO pins (BUCKEN, VDDIO_CTRL, SR RF switch) to
OUTPUT_INACTIVE state during driver initialization to prevent floating
pins from accidentally powering the module or affecting RF switch
before the interface is brought up.
This addresses an issue where GPIO configuration was delayed until
the interface was brought up for the first time, leaving voltage control
pins floating which could result in unintended power supply.
Fixes#100993.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Make cc13xx_cc26xx_irq_tx_ready check that the TX Ready interrupt
occurred, instead of checking whether there is some free space in
the UART TX FIFO. This prevents a race condition from occurring in
OpenThread Spinel protocol implementation, when a UART RX interrupt
is received right after otPlatUartSend was called, between the
assignement of 1 to ot_uart.tx_busy and the initialization of
write_length.
Signed-off-by: Pascal Bodin <pbodin@baylibre.com>
Use internal buffer pointers for I2C read and write paths instead of
advancing i2c_msg->buf directly. This avoids unintended pointer side
effects while keeping the read and write data flow unchanged.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Use internal buffer pointers for I2C read and write paths instead of
advancing i2c_msg->buf directly. This avoids unintended pointer side
effects while keeping the read and write data flow unchanged.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Use internal buffer pointers for I2C read and write paths instead of
advancing i2c_msg->buf directly. This avoids unintended pointer side
effects while keeping the read and write data flow unchanged.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Initial implementation of an adc driver for the ads79xx series of
spi-adc chips.
This driver sets the device in auto-1 mode, and supports devices
in the series, with different resolutions (12/10/8-bit),
and number of channels.
Signed-off-by: James Walmsley <james@fullfat-fs.co.uk>
make the rxtx size a define, as this driver
does not support any other value and it's
also not configureable in litex.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Fix race condition between DMA ISR and work queue that caused RX
length underflow when calculating len = counter - offset.
Both mcux_lpuart_async_rx_timeout (work queue) and dma_callback
(ISR) modified rx_dma_params without locking, causing the ISR to
update counter/offset mid-calculation, resulting in integer
underflow and system crash.
Solution: Add irq_lock() protection around all rx_dma_params
accesses in async_evt_rx_rdy(), mcux_lpuart_async_rx_flush(),
and async_evt_rx_buf_release().
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Split error handling in mcux_lpuart_rx_enable() to distinguish
between DMA status query failures (error) and busy status (debug).
- Use LOG_ERR for get_status failures with specific error code
- Use LOG_DBG for busy status (expected condition, valid -EBUSY)
- Improves debuggability by providing clearer diagnostic messages
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Different flash parts have different requirements on the number of dummy
bytes to send when issued a RDID request, so allow configuring the read ID
dummy byte count in devicetree for the MAX32 SPIXF flash driver.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Pass the selected channel and bandwidth to WHD, so the AP
enables on the requested channel/width.
Signed-off-by: Liu Gavin (CSS ICW ENG WFS SW WFSW 1) <Gavin.Liu@infineon.com>
Fix redundant initialization of vif_ctx_zep where the variable was
initialized at declaration and immediately overwritten before being
read.
Remove the redundant initialization to improve code clarity.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The Xen events channel driver consume 72K of RAM, but may not be
required in all use cases.
Added a XEN_EVENTS Kconfig option so that Xen events can be gracefully
disabled if not required. Updated the relevant CMakeLists.txt and
Kconfig files to guard the inclusion of the Xen events driver and its
source files by this option.
Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
pwm_mcux_sctimer driver doesn't support power management actions.
PM Actions added, as well support to save/restore for pwm channels
configurations after exitig from PM3.
Signed-off-by: Missael Maciel <davidmissael.maciel@nxp.com>
When an async transfer finished quickly, the internal state of
the driver could come out of sync with the hardware. The tx/rx
enabled flag and PM lock was taken after starting the DMA
transaction, which caused issues if the DMA complete callback
was called before the flags were updated. Set the flag and take
the PM lock prior to starting the DMA transaction to avoid this.
Also release the PM rx lock upon successful completion of a
transfer. The lock was previously only released when the user
manually called `uart_rx_disable()`.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add a device tree property to request connecting an instance to stdin/out
(on top of the command line option, and the kconfig option).
And clarify that the kconfig option applies to whichever is the
first instance in whatever order the DT logic happens to order them.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
PLL mode on MSIK/MSIS should be enabled only if property `msi-pll-mode` is
present on the generator's DT node. However, the STM32U3 clock driver did
not check this property and unconditionally enabled PLL mode. This is an
issue because PLL mode requires an LSE generator to be provided, which was
asserted at build time, preventing usage of MSIS/MSIK without an LSE even
if the target application did not need the accuracy provided by PLL mode.
Fix by enabling PLL mode for each MSIx generator only if the `msi-pll-mode`
property is enabled on the corresponding DT node.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Harmonize the variable names frame_size, bytes_per_frame or word_size_bytes
by replacing them all with dfs, which is already used in the Zephyr SPI
driver.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Replace the direct read from the registers by dedicated LL functions
since that they are now available.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>