Replace usage of atoi() with strtol() when parsing numeric values
from ES-WIFI AT command responses.
strtol() provides well-defined behavior and allows proper error
handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
In Slave Half-Duplex TX mode, the driver disables SPE immediately
after loading data into DR, before the Master provides clock.
Since the Slave depends on the Master for clock, data is never
actually shifted out.
Fix by treating Slave Half-Duplex TX like SPI_HOLD_ON_CS: keep SPE
enabled after spi_write() returns, and let the application call
spi_release() once the Master has clocked out the data.
Tested on NUCLEO-F439ZI with SPI1 (master) and SPI3 (slave) in
half-duplex configuration.
Signed-off-by: PyoJin Yoon <volphin310@gmail.com>
When calling `gpio_pin_configure` with GPIO_OUTPUT_INIT_LOW or
GPIO_OUTPUT_INIT_HIGH, it is expected from the driver to set initial
output state. The current driver implementation does not set this
user provided initial state.
This commit sets requested output state before changing channel mode
to output.
Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
MAX14906 implementation of GPIO function `port_toggle_bits` writes
back old register value instead of inverted new value.
This commit XOR's current output state with requested pins (as expected)
and writes new value to register.
Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
The MAX149x6 drivers do not implement the generic GPIO function
port_set_masked_raw. The current implementation therefore hard faults due
to dereferencing NULL ptr on calls to gpio_port_set_masked_raw.
This commit adds port_set_masked_raw for both MAX14906 and MAX14916.
Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
The MAX14906 SetOUT register packs direction bits in [7:4] and output
state in [3:0]. The existing implementation clears all output bits
regardless of pin mask, as the mask is ANDed with 0xf0 before inversion.
This commit fixes that by masking before inverting.
Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
The MAX14906 can be operated compliantly without directly controlling
EN/FAULT/SYNCH/READY ports. The MAX14906 DTS files already reflect this
optional nature.
This commit makes the driver treat these ports as optional without changing
the business logic of the driver. If these ports are not defined,
certain diagnostic logging calls are simply skipped over.
Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
The MAX14906 (p36), MAX14915 (p26), and MAX14916 (p28) datasheets state
that the device includes A0,A1,ThrErr bits in CRC calculation. The existing
solution doesnt handle these bits.
This commit passes the 3 top bits of the SDO check byte to the CRC
function, making the CRC calculation datasheet compliant
Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
Some implementations of the DesginWare I2C controller do not support the
system suspending to idle during an I2C transaction. Add a Kconfig
option to allow locking of the power management policy state during
I2C transactions.
Signed-off-by: Keith Short <keithshort@google.com>
Add pin control driver for Alif SoCs. The driver manages
pin muxing (alternate function selection) and pad configuration
for Alif SoCs.
Signed-off-by: Silesh C V <silesh@alifsemi.com>
Add clock control driver for Alif Semiconductor SoCs. The driver
manages peripheral clocks in the device by operating on multiple
discontiguous register regions (called modules in this driver).
In this initial version, the driver supports on, off, get_rate and
get_status API.
Co-authored-by: Manoj A Murudi <manoj.murudi@alifsemi.com>
Signed-off-by: Silesh C V <silesh@alifsemi.com>
Change the initialization level of retained_mem RAM driver to
PRE_KERNEL_1.
It allows using the drivers in the pre-kernel stage, which can be a case
for some applications.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
SOC_COMPATIBLE_NRF7120_ENGA was erroneously being used in
KConfig filter and therefore not being applied, since soc configs are
generated at compile time. Created SOC_COMPATIBLE_NRF71 to be used at
KConfig build stage.
Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
Add clock control driver
Implement bootup clock initialization, on, off, configure and get_rate API
Signed-off-by: Sunil Abraham <sunil.abraham@microchip.com>
Added register bitmask description with low-level abstraction
Signed-off-by: Roman Leonov <jam_roma@yahoo.com>
Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The final call in the driver init should be pm_device_driver_init.
This ensures the device transitions to active when the driver starts.
Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
This offloaded wifi driver is deprecated and will be removed
in a future release. It is currently scheduled to be removed in
Zephyr 4.6. The reason for deprecation is that there is no
maintainer for this driver.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This offloaded wifi driver is deprecated and will be removed
in a future release. It is currently scheduled to be removed in
Zephyr 4.6. The reason for deprecation is that there is no
maintainer for this driver.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Previously, the PHY driver always invoked the link state callback on
every check, even when the link state had not changed, and did not
properly synchronize access to the link state (issue #103826). This could
lead to spurious notifications and potential race conditions.
This patch:
- Calls the registered callback only when the link state actually changes.
- Logs link-up and link-down events correctly.
- Introduces a semaphore to protect the PHY link state.
- Updates link state in phy_mc_t1s_update_link_state() with proper
synchronization.
This ensures that both link state updates and callbacks reflect actual
changes, preventing unnecessary notifications and improving driver
correctness.
Fixes: #103826
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
In ataes132a_aes_ecb_block(), error paths could return after
k_sem_take() without releasing device_sem, leading to a potential
deadlock on subsequent calls.
Ensure k_sem_give() is called on all early-return paths after the
semaphore is taken.
This fixes a potential deadlock when invalid buffer sizes are
detected after acquiring the device semaphore.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
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>