Use int return type for command results to avoid truncating negative
errno values and ensure proper error propagation.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The SPI_CTRLR0 register is intended for enhanced SPI modes, however some
implementations continue to process the INST_L and ADDR_L fields in
standard mode. On those platforms the controller to sends its own
instruction/address phase in addition to what the driver sends. This
results in a malformed SPI transaction with extra bytes on the wire.
Explicitly mask these fields in standard mode and only set them otherwise
in enhanced mode.
Signed-off-by: Lee Trager <lee@trager.us>
Add support for the Infineon PSoC 4 family to the SPI driver,
Kconfig options, and polling-based transfer completion for slave
mode as PSoC 4 slave hardware does not control transaction start.
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Implement ifx_get_hw_block_num to retrieve the hardware block number
for a given SCB base address. This replaces the dependency on the
UART-specific lookup function ifx_cat1_uart_get_hw_block_num, making
the SPI driver more self-contained and ensuring correct resource
identification for SCB blocks.
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Rename Kconfig options and internal macros to remove "CAT1" specificity,
making the driver more generic for the Infineon family. This is a
non-functional change to prepare for PSoC 4 support.
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
- Adds the g1 driver for eic for microchip devices
- Uses the APIs of the eic driver from gpio driver
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
Whenever the driver would fail initialization (return a non-zero value),
add an assertion to ease debugging/troubleshooting.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Fix "Violation to rule 21.2 (Should not use a reserved identifier) - clock"
in the aforementioned driver by renaming a local variable.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
If the clock device (i.e., RCC) failed to initialize, we have bigger
problems than trying to call clock_control_{off,on,configure} on it.
Don't bother checking to save some footprint.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Clear the TX and RX FIFOs to ensure a clean state.
Without this reset, residual data or incomplete
characters from a previous session or the bootloader could remain
in the hardware buffers.
Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
Update the stm32wba 802.15.4 driver to integrate the new SoC-level
radio power management.
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
Update the stm32wbax ble hci driver to integrate the new SoC-level
radio power management hook.
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
Add missing modem_cmd_handler.h include in modem_shell.c to resolve
implicit function declaration warning for modem_cmd_send_data_nolock.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Apply code formatting to the TMAG5170 driver sources.
No functional changes intended.
Signed-off-by: Bernhard Reiter <bernhard.reiter@swarovskioptik.com>
Allow the application to enable power-saving features of the ESP32 wifi
radio using the normal networking APIs.
Signed-off-by: Mandus Börjesson <borjessonmandus@gmail.com>
The ESP32 mbox driver was effectively signalling-only: mbox_send()
ignored the msg parameter (ARG_UNUSED) and never copied data into
shared memory.
This adds proper data transfer support.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Preprocess endif should be before return so that uarte_periph_enable
returns always when asynchronous API is used. It leads to faulty
behavior in certain configurations.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Modify the STM32 UDC driver to support multiple instances.
While at it, align the device initialization callback name with other
UDC drivers: `udc_stm32_driver_init0` becomes `udc_stm32_driver_preinit`.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
i3c_dev_list_daa_addr_helper() may return success while setting the
target descriptor to NULL when descriptor allocation fails.
Handle this case explicitly to avoid NULL pointer dereference during
dynamic address assignment.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Unify the drivers/*/Kconfig menuconfig title strings to the format "<class>
[(acronym)] [bus] drivers".
Including both the full name of the driver class and an acronym makes
menuconfig more user friendly as some of the acronyms are less well-known
than others. It also improves Kconfig search, both via menuconfig and via
the generated Kconfig documentation.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add FSL_FEATURE_SOC_*_COUNT preprocessor guards to protect peripheral
clock instances that may not exist in all MCXE device derivatives.
Some MCXE device variants have fewer peripheral instances than others:
- MCXE316/315 have 3 FlexCAN vs 6 in MCXE317
- MCXE316/315 have 4 LPUART vs 8 in MCXE317
- MCXE316/315 have 1 LPCMP vs 2 in MCXE317
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
This change renames the Infineon BT-HCI UART driver source
and binding file to allow reuse across all Infineon AIROC
connectivity chips that use HCI UART transport.
No functional changes
Signed-off-by: Merin George <merin.george@infineon.com>
Format registers are intended for the display but are also
required to format the data when the data transfer
doesn't align with 4 bytes. A follow-up PR will come later
for display support with configuration in devicetree.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Replace remaining ll_func_* by ll_* for LL function redefinitions in the
STM32 SPI driver.
Fixes: 938fe74aae
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
menuconfig ETH_PHY_DRIVER is already inside a
`if ETH_DRIVER`, meaning it already depends on it,
therefore the condition for the default y is not needed.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Use the DEVICE_API_GET() macro for obtaining a pointer to the
can_driver_api struct from the device struct.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add GPIO_PULL_UP and GPIO_PULL_DOWN handling in pin_configure
and enable LP_IO wakeup source in pin_interrupt_configure via
rtcio_ll_wakeup_enable(). Both rtcio_ll_intr_enable() and
rtcio_ll_wakeup_enable() are required for LP_IO wakeup to
function, as clk_en must be set for the interrupt status
register to update.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
codec_configure_filters () never reports errors and always returns
0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
codec_configure_filters () never reports errors and always returns
0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Use the DEVICE_API macro to make sure the device API is in the respective
API linker section.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Some of the peripherals might be used in the bootloader
and not cleaned up properly for the next image in the boot chain.
Ensure that affected registers are always cleaned up before use.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
As the TDTxR registers reset value is undefined they must be fully
initialized when used.
Without full initialization, the TGT bit might be inadvertently set,
causing the 16-bit timestamp to be sent as the last two data bytes
when CONFIG_CAN_RX_TIMESTAMP is enabled.
Fixes: #98768
Signed-off-by: Giuseppe Iellamo <giellamo@gmail.com>
For wifi embedded supplicant, use params->sae_password and
params->sae_password_length for SAE/SAE-H2E/SAE-AUTO in nxp_wifi_connect
and nxp_wifi_start_ap, as psk is NUll and psk_length is 0.
This resolves WPA3-SAE auth failures.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Rename internal variables, helpers and logs from "master" to
"controller" in STM32 I2C drivers.
No functional changes.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Rename internal variables, helpers and logs from "slave" to "target"
in STM32 I2C drivers.
No functional changes.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Call HAL_ETH_SetMDIOClockRange to set back the MDIO clock range
as it is set to 0 during the software reset.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>