Replace the hardcoded MSPI_XFER_LITTLE_ENDIAN value in
MSPI_DEVICE_CONFIG_INIT() with DT_ENUM_IDX_OR(), so the
init_cfg endian field is driven by the mspi-endian property
of the device node when present, falling back to big-endian
when the property is absent.
Signed-off-by: Dhanoo Surasarang <dhanoo.surasarang@nordicsemi.no>
adxl345_submit_fetch() requests sizeof(struct adxl345_dev_data) bytes
from the RTIO buffer pool, but only writes sizeof(struct adxl345_sample)
into it. The decoder also casts the buffer to struct adxl345_sample *.
This over-allocation wastes memory and prevents callers from using
reasonably-sized read buffers (e.g. 128 bytes) since adxl345_dev_data
can exceed 200 bytes when triggers or streaming are enabled.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
The period calculation bailed out when the clock rate was
non-zero, i.e. on every successful clock query, so the computed
period was always zero and install_timeout() always failed with
-EINVAL. Bail out on a zero rate instead.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The shared memory region is split in half between the two
directions, but the size check and max_data_size_get() used the
full region size, so a maximum-sized message overflowed the region
by half its size. Use the per-direction capacity.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
EVENTS_IDX_MAX is an inclusive maximum index, as used by the RX
sibling and both VEVIF task drivers, but the TX channel validation
used a strict comparison and rejected the last valid channel.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The fixed I2C command buffers in the work handler, IC verify and PM
suspend paths are already const and never modified, so make them static
const to move them out of the stack into read-only memory.
Assisted-by: Claude:opus-4.8
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
z_vrfy_tgpio_pin_read_ts_ec() was missing K_SYSCALL_MEMORY_WRITE checks
on the timestamp and event_count output pointers before passing them to
the kernel driver. A userspace thread with TGPIO device access could
supply supervisor-mode addresses and cause the driver to write into
arbitrary supervisor memory (write-what-where primitive).
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
smbus_smbalert_remove_cb() and smbus_host_notify_remove_cb() were
exposed as syscalls, allowing userspace to pass a struct smbus_callback
pointer directly to kernel mode. Since struct smbus_callback contains a
function pointer (smbus_callback_handler_t), an application
could craft a callback struct to redirect kernel execution to an
arbitrary address.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
uart_cfg_sbus is only referenced within this file, so mark it static to
give it internal linkage.
Assisted-by: Claude:opus-4.8
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Validate the payload length encoded in the incoming doorbell before
reading the IPC message buffer.
If the reported length exceeds IPC_DATA_LEN_MAX, log the malformed
message and acknowledge it immediately instead of reading past
incoming_data_buf or leaving the peer waiting for completion.
This keeps the valid receive path unchanged while safely discarding
oversized inbound messages.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
Use flag_access_32bit from device data to select
MXC_SPIXF_Set4ByteAddr() or MXC_SPIXF_Set3ByteAddr() accordingly.
Signed-off-by: Benjamin Santon <benjamin.santon@analog.com>
Every send failure returned -EIO, hiding whether the packet
could be retried. Return -ENOBUFS when the TX buffers do not
free up in time and -EMSGSIZE when the frame does not fit.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Frames were dropped as soon as the low-level TX buffers ran
out, losing data from bursty senders. Wait for an in-flight
frame to complete and retry, bounded by a timeout.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The init macro read the property with DT_INST_PROP_OR(index, ...)
instead of the _num macro parameter, so devicetree flow control was
always ignored.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
api_rx_enable() configured the RX channel as MEMORY_TO_PERIPHERAL,
copied from the TX path. Use PERIPHERAL_TO_MEMORY.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add initial driver support for the Quectel BC66 and BC660K NB-IoT
cellular modems. The driver implements the standard Zephyr
cellular modem APIs and features network offloading via BSD sockets,
specifically supporting TCP and UDP clients. Device Power Management
(PM) support is also included.
Assisted-by: Claude:claude-sonnet-4.6
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Giovanni Piccari <giopiccari@outlook.com>