Send STOP or RESTART after a message only if they are enabled in message
flags. For reads, however, controller sends a NACK after last byte so a
restart is required even if I2C_MSG_RESTART flag is not set.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Ensure the corresponding bus enables RTIO (I2C, I3C or SPI) before
instantiating rtio-dependent elements. Otherwise, enabling it for
another bus (e.g: SPI_RTIO when the LSM6DS is also on I3C with no
I3C_RTIO) will cause a build-time failure.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
udc_skeleton incorrectly logs "Enable device" in the function
"udc_skeleton_disable", and some UDC drivers inherited this mistake.
Fix this by correcting the log message in all affected drivers.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Add a check for interrupt configuration: if the interrupt line for the
pin is already enabled but for the same port that the user asked, it
should not return EBUSY.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
The scd4x_channel_get function converts raw word values to
struct sensor_value's per the datasheet. The calculation for val2 of a
struct sensor_value `val->val2 = ((tmp_val % 0xFFFF) * 1000000) / 0xFFFF;`
can overflow the max of int32_t, resulting in an incorrect
sensor_value.
Fix it by changing the type of tmp_val to int64_t.
Signed-off-by: Zach Thomas <zach.thomas1.zt@gmail.com>
These two sensors do not build with asserts enabled as they're
referencing a non-existent variable `pkt_size`.
Replaced for what (AFAIK) is the intended variable.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
There are two bugs that caused regression for S32:
First there is a silicon errata specifically for the mask version on
this board that causes FIFO flush to not work as expected. The
workaround is to do a module reset before each transfer.
Second there was a division error for word size > 1 byte. The division
should be rounded up, not down, otherwise there will be an infinite
interrupt loop because the TX fifo will not be written to but the TDR
interrupt enabled causes interrupt when TX fifo is empty.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
These two fields were not being used and were a relic of some
intermediate implementation, and forgot to be removed.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The Kconfig description is wrong, this driver can be used with or
without RTIO. Also, rename the kconfig to be less confusing, as _NORMAL
is meaningless, this is the CPU/interrupt based driver.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Change the driver behavior so that if the provided RX buffer set is
bigger than the TX buffer, we will read all the RX buffer and fill the
TX with NOPs. The SPI driver API does not say to do this, and my
original interpretation of the API was that the TX length controls the
entire transfer length, but this behavior might fit better with some de
facto expectations of in tree consumers.
Also add some robustness to the calculation of how many extra bytes to fill
when tx should be nops.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This patch fixes transaction op items not performed within a single
SPI transfer. This is common for Write + Read commands, that depend on
the CS kept asserted until the end, otherwise the context will be lost.
A similar fix was applied to i2c_rtio_default on #79890.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
The logic for setting the src_inc and dst_inc would improperly set
these to zero when gatter/scatter was enabled but the respective
gatther_interval/scatter_interval was zero (which would imply
continuous operation).
Fixes: #85403
Signed-off-by: David Leach <david.leach@nxp.com>
-Prefixed Zephyr driver functions with 'siwx917_dma' for consistency
-Added 'siwx917_' prefix to local functions
-Removed inline declaration for param validation functions
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Resolved an issue where application callbacks were not being properly
registered in the DMA driver.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Add a new Kconfig symbol (UART_SILABS_USART_ASYNC) to enable the async
API for the Silabs USART driver.
It is needed because the symbol (UART_ASYNC_API) is shared between uart
driver. In the case that you have multiple UART drivers enabled,
condition to enable async API for different uart driver may differ.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
- Updated Wi-Fi security configuration to use default, allowing
the device to select the best available encryption.
- Removed unsupported security features.
- Replaced `WIFI_SECURITY_TYPE_SAE` with `WIFI_SECURITY_TYPE_SAE_AUTO`
to enable automatic selection between SAE-HNP and SAE-H2E,
as the device supports both modes by default.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
There were some driver bindings issues for the davicom dm8806 driver:
- Missing type for reg-switch binding
- Missing required: true for int/reset gpios
- Fix macro for reg-switch
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Don't try to dereference line_names if the index is beyond
line_names_len, this can happen if there's less line names than the
total amount of supported gpios specified.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Move SHELL_DYNAMIC_CMD_CREATE after the function, then the forward
declaration is unnecessary.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add workaround to HFCLK start and stop in nrf54l. In future workaround
will be in nrfx driver.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Calculate the EBO properly, so the total frame written to TX FIFO
does not exceed maximum Ethernet frame length.
Makes the TCP stack to work properly, otherwise packets > 1472 are dopped,
as they would be padded by 64 more bytes
and hence exceed maximum Ethernet frame size.
Signed-off-by: Maciej Panek <panekmaciej@outlook.com>
Refactors the code in adin2111_offload_thread
to improve its readability. Adds code to read RX FIFO
in OA mode until it is empty.
Signed-off-by: Maciej Panek <panekmaciej@outlook.com>
Since the callback can be executed from either software or a hardware
interrupt, it's possible for multiple instances of the callback function
to run concurrently. That should not happen and can be particularly
problematic on SMP systems. This commit adds a spinlock to prevent
concurrent execution.
This addresses a Twister CI failure discovered in #85539.
Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
Fix the scenario where a pinctrl node intends to deallocate a pin
from a peripheral. If the GPIO mode is disabled the DBUS route
should be cleared, not set. This allows reuse of a pin for other
purposes when a driver is suspended and the pinctrl sleep state is
applied, as GPIOs are typically disabled in the sleep state.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Wi-Fi AP-STA mode fails on ESP32 due to incorrect interface
initialization. In AP-STA mode, esp32_wifi_init first sets the driver's AP
interface, followed by the STA interface. However, the driver initializes
them in reverse order, causing both to read incorrect device data and
resulting in a "Wi-Fi not in station mode" error.
This fix handles STA and AP initialization in separate functions and
checks for correct mode in esp32_wifi_status.
Tested on a custom ESP32-S3-WROOM-1-N4R2 board, where both STA and AP
can connect, send, and receive data.
Signed-off-by: Oskari Seppä <seppaoskari@gmail.com>
The dts define for the ibi threshold (watermark) was be written to the
ibi response threshold. Fix it to write to the correct spot.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
deftgts could be a different length the second time around. Also, be
more efficient rather than just allocaing the max_devs each time.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>