Return error code in "mid" namespace, to be consistent across all
nsos_adapt_sendmsg() return values.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Add addrinfo mapping between host and Zephyr. This fixes issues for example
when AF_INET had to be mapped between host (value 2 in glibc on Linux) and
Zephyr (value 1).
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
There was a copy-paste error, resulting in conversion to AF_UNIX.
Additionally sll_family needs to be converted to from "mid" to "host"
value.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
We don't need to save the MAC address in the data
struct, therfore use a local var in the iface init for it.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
move dev init into iface init. By registering the
uart pipe at the end of the iface init, we also no longer
need to check in the callback if the iface init was done.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Added support for the MDINT interrupt pin, through which the PHY signals
the MCU when certain link events occur.
Signed-off-by: Robert Khanafiev <robert.khanafiev@fischer-electronic.com>
The link was monitored in a separate thread that was initialized with
an incorrectly defined stack. This caused an exception on some systems.
The thread has been replaced with a dedicated workqueue.
Signed-off-by: Robert Khanafiev <robert.khanafiev@fischer-electronic.com>
Add rtc node on stm32n6 DT.
Enable backup domain access before RTC clock configuration and not after.
Add rtc to the supported tags
Signed-off-by: Basile GRUNER <basile.gruner@smile.fr>
This reverts commit 6685c3028b
in order to refactor the handling of indexed 4 bit pixel formats
We can handle indexed 4 bit pixel formats in a generic way without having
to resort to "private" pixel format definitions. This introduces a new
pixel format, PIXEL_FORMAT_I_4, for (up-to) 16-color palette displays.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add a Kconfig CONFIG_DAI_MAX_BESPOKE_CFG_SIZE to configure the maximum
blob size for dai_config_set. This only affects user-space usage via
syscalls when the blob needs to be copied to kernel memory before
validation.
The default is increased to 1024 to make tests pass with upstream
SOF project configurations.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add driver support for TI MSPM0 ADC module.
Add a configurable reference voltage support with vref.
Add this driver in shell.
Signed-off-by: Jackson Farley <j-farley@ti.com>
Signed-off-by: Alexpandi Muniyandi <alexpandi@linumiz.com>
Unify all "device not ready" error messages across sensor drivers with
the LOG_ERR_DEVICE_NOT_READY macro, following the pattern established
for input drivers in commit 31b5866.
This improves consistency and makes device readiness errors easier to
grep across the codebase. Using the standardized macro ensures device
names are properly formatted with null-safety checks.
Image size impact (tests/drivers/build_all/sensor on native_sim,
building 211 sensor drivers):
- Before: 1,033 KB (text: 961 KB)
- After: 1,036 KB (text: 964 KB)
- Change: +2.5 KB (+0.25%), text: +2.5 KB
The small size increase is due to the macros adding null-safety checks
and dynamic device name formatting, which generates slightly more code
than some of the simpler static log strings used by drivers previously.
Assisted-by: Claude:claude-sonnet-4.5
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Several sensor drivers were logging device readiness failures as LOG_DBG
rather than LOG_ERR, making initialization failures harder to diagnose.
These readiness checks occur during device initialization and return error
codes, so they should be logged as errors rather than debug messages.
This change affects drivers that check for bus or GPIO device readiness
and ensures consistent error reporting across the sensor subsystem.
Assisted-by: Claude:claude-sonnet-4.5
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
There is no reason to not have DMIC be a proper driver class, so make
the appropriate change so that DMIC drivers actually populate a
driver_api struct.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Resuming the device involves hardware accesses including register
writes, so we need to acquire the semaphore lock first to avoid
interference with other cores also using the RNG.
Signed-off-by: Sarah Renkhoff <sarah.renkhoff@gmail.com>
Wire up the i2c_api.transfer_cb endpoint so I2C transfers routed through
an I3C controller can use the asynchronous completion callback when
CONFIG_I2C_CALLBACK is enabled. The async path mirrors the existing
CONFIG_I3C_CALLBACK implementation and shares the same async_sem,
timeout timer, cb/userdata state, serialized through async_sem.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Implement i3c_transfer_cb and i3c_do_ccc_cb in the Cadence I3C
controller driver. The existing transfer functions are refactored
with an async flag that skips waiting for completion and instead
starts a kernel timer for timeout handling. A semaphore serializes
async operations, and the user callback is invoked from the
transfer completion ISR or the timeout handler.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add an asynchronous callback API for I3C, similar to the existing
i2c_transfer_cb interface. This introduces i3c_transfer_cb and
i3c_do_ccc_cb, which start a transfer and return immediately,
invoking a user-provided callback upon completion or timeout.
A new CONFIG_I3C_CALLBACK Kconfig option gates the feature. The
driver API struct is extended with do_ccc_cb and i3c_xfers_cb
function pointers under CONFIG_I3C_CALLBACK.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
When writing to the SSD1322 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.
However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.
Add a missing desc->width alignment check to prevent invalid writes.
Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
When writing to the SSD1363 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.
However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.
Add a missing desc->width alignment check (multiple of 4) to prevent
invalid writes.
Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
When writing to the SSD1327 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.
However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.
Add a missing desc->width alignment check to prevent invalid writes.
Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
When writing to the SSD1320 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.
However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.
Add a missing desc->width alignment check to prevent invalid writes.
Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
When writing to the SH1122 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.
However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.
Add a missing desc->width alignment check to prevent invalid writes.
Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
While other lines of the STM32 family have their flash controllers with
option bytes driver support, the STM32F1 line was missing it.
(Which might have something to do with the rather complex handling that
it needs to program them.) This patch adds support for modifying the
option bytes as they are represented in FLASH/OBR, which involves erasing
all option bytes (including the write protection bytes), then writing
back the new values for each (restoring the write protection to its
previous value).
Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
Add support for Silergy SY6974B 3A single-cell Li-Ion switching battery
charger with I2C control, USB BC1.2 detection, OTG boost and power-path
management.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-4.7
Fix below warnings on 64bit platforms:
drivers/usb/udc/udc_dwc2.c: In function 'dwc2_tx_fifo_write':
rivers/usb/udc/udc_dwc2.c:454:29: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
454 | sys_write32((uint32_t)buf->data,
| ^
drivers/usb/udc/udc_dwc2.c: In function 'dwc2_prep_rx':
drivers/usb/udc/udc_dwc2.c:651:29: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
651 | sys_write32((uint32_t)data,
| ^
drivers/usb/udc/udc_dwc2.c: In function 'dwc2_read_fifo_setup':
drivers/usb/udc/udc_dwc2.c:2324:25: warning: format '%d' expects argument
of type 'int', but argument 2 has type 'size_t' {aka 'long unsigned int'}
2324 | LOG_ERR("%d bytes SETUP", size);
| ^~~~~~~~~~~~~~~~ ~~~~
| |
| size_t {aka long unsigned int}
include/zephyr/logging/log_core.h:336:50: note: in definition of macro
'Z_LOG2'
336 | z_log_printf_arg_checker(__VA_ARGS__);
| ^~~~~~~~~~~
include/zephyr/logging/log.h:62:22: note: in expansion of macro 'Z_LOG'
62 | #define LOG_ERR(...) Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
| ^~~~~
drivers/usb/udc/udc_dwc2.c:2324:17: note: in expansion of macro 'LOG_ERR'
2324 | LOG_ERR("%d bytes SETUP", size);
| ^~~~~~~
drivers/usb/udc/udc_dwc2.c:2324:27: note: format string is defined here
2324 | LOG_ERR("%d bytes SETUP", size);
| ~^
| |
| int
| %ld
drivers/usb/udc/udc_dwc2.c: In function 'dwc2_handle_oepint':
drivers/usb/udc/udc_dwc2.c:2615:51: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
2615 | sys_cache_data_invd_range((void *)(addr - 8), 8);
| ^
drivers/usb/udc/udc_dwc2.c:2616:45: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
2616 | memcpy(priv->setup, (void *)(addr - 8), sizeof(priv->setup));
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
When switching ETHA operating modes, the transition may fail to
complete if the PHY-derived clock is unexpectedly stopped, leaving
RMAC in an indeterminate state.
If the requested mode is not reached within the timeout, enable
RMAC emergency clock recovery (MIOC0) to flush internal RMAC state
and temporarily switch to a free‑running clock. Wait for the ETHA
mode transition to complete, then restore normal PHY clocking.
This improves robustness of RMAC/ETHA mode transitions without
requiring a full device reset.
Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.13.2
Requires https://github.com/zephyrproject-rtos/hal_st/pull/35
Signed-off-by: Armando Visconti <armando.visconti@st.com>
SF32LB DMA cleared its software busy bit on half-complete.
The QSPI NOR write path polled that bit while holding the flash lock.
Clear the DMA status bit only on completion or error.
Derive busy from the active state plus pending_length.
Poll pending_length until the flash DMA transfer reaches zero.
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
The SF32LB MPI QSPI NOR erase path issued WREN only once before
entering the erase loop. On SPI NOR devices the write-enable latch
is typically cleared after each erase command, so a multi-block erase
can fail after the first block.
Move WREN into the loop and issue it while holding the driver lock,
immediately before the selected erase command. This matches the write
path and aligns the driver with Zephyr's generic SPI NOR erase flow.
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>