Commit graph zephyr/drivers
Author SHA1 Message Date
Stan Verschuuren
19031fcc4b drivers: gpio: max14916: fix ow_on_en written to wrong register
gpio_max14916_config_diag() writes ow_on_en to wrong register
(OW_OFF_EN_REG instead of OW_ON_EN_REG).

Fixed by writing to correct register.

Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
2026-03-21 00:48:23 +00:00
Stan Verschuuren
7bcb55f1f0 drivers: gpio: max149x6: harmonize diagnostic helper error handling
MAX14906/916 diagnostic helpers handle error propagation differently
across diag_chan_get(), pars_spi_diag(), and reg_trans_spi_diag(). This
creates asymmetry in parser/wrapper flows.

Additionally, the parser overwrites transport errors, obfuscating their
source.

Fixed by aligning helpers to standard errno-style return semantics and
failing fast consistently, propagating nested transport errors.

Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
2026-03-21 00:48:23 +00:00
Stan Verschuuren
6734317755 drivers: gpio: max149x6: clear stale diagnostic channel caches
Both MAX14906/916 diag_chan_get paths keep previously cached channel fault
values when the corresponding interrupt bits are not set in later calls.
This leaves stale fault data such that diag_chan_get keeps reporting faults
after they have cleared.

Fixed by clearing fault caches before updating them from current interrupt
status.

Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
2026-03-21 00:48:23 +00:00
Stan Verschuuren
91e76ab2b9 drivers: gpio: max149x6: preserve parser fault status
Both MAX14906/916 pars_spi_diag paths can lose an captured FAULT1 error
when diag_chan_get() returns 0.

Fixed by only updating the parser return status when diag_chan_get()
returns nonzero.

Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
2026-03-21 00:48:23 +00:00
Stan Verschuuren
a82ebd31ed drivers: gpio: max149x6: propagate config path errors
max14906_ch_func(), gpio_max14906_config(), and gpio_max14916_config()
ignore return values from lower level register update/write helpers.

This leads to reports of successful pin configuration even when SPI
transactions fail.

Fixed by propagating the first error (effectively forwarding SPI errors)
to the caller, with no behaviour change in success path.

Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
2026-03-21 00:48:23 +00:00
Stan Verschuuren
4e9285c496 drivers: gpio: max149x6: propagate SPI write errors
Several MAX14906/916/915 SPI write paths ignore MAX149xx_REG_WRITE()
return values and proceed silently after SPI write failures.

Fixed by propagating SPI write errors in the affected paths.

Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
2026-03-21 00:48:23 +00:00
Stan Verschuuren
373d45f554 drivers: gpio: max149x6: propagate SPI read errors
Several MAX14906/916/915 Read/ReadModifyWrite update paths use
MAX149xx_REG_READ() return values directly without validating SPI read
errors first. This leaves SPI read errors unnoticed and corrupts registers
by writing return values unconditionally.

Fixed by early returning on SPI read errors.

Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
2026-03-21 00:48:23 +00:00
Stan Verschuuren
de8640db7f drivers: gpio: max149x6: fix spurious error return on write
When max149x6_reg_transceive is called with rw=WRITE and rx_diag_buff=NULL,
the SPI diagnostic response byte is returned instead of 0, even though the
write was proper and successful.

Fixed by restricting the offending branch to READ only.

Signed-off-by: Stan Verschuuren <stverschuuren@gmail.com>
2026-03-21 00:48:23 +00:00
Benjamin Cabé
a03eccb1ef drivers: usb_c: remove unused alert_handler_cb field from driver struct
This field is not used anywhere and was probably added in error.
Callback registration is done via tcpc_set_alert_handler_cb().

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-03-21 00:48:09 +00:00
Nicholas Cadieux
f0ccc4d07e usb_c: fix clang-format issues
Resolve clang-format issues in usb_c.

Signed-off-by: Nicholas Cadieux <ncadieux@qti.qualcomm.com>
2026-03-21 00:48:09 +00:00
Nicholas Cadieux
cf8197b7d1 usbc: tcpc: fix memory corruption in vconn_en and vconn_discharge callbacks
The vconn_en and vconn_discharge callbacks were invoked with the TCPC
device as the first argument. Application callbacks then called
usbc_get_dpm_data(dev) with the TCPC device, causing dev->data (which
is struct tcpc_data *) to be misinterpreted as struct usbc_port_data *.
This resulted in dpm_data->vconn_pol being written to an incorrect
memory offset, silently corrupting TCPC driver state.

Fix by adding a const struct device *usbc_dev parameter to
tcpc_vconn_control_cb_t and tcpc_vconn_discharge_cb_t, and propagating
it through set_vconn_cb and set_vconn_discharge_cb in the driver API.

Signed-off-by: Nicholas Cadieux <ncadieux@qti.qualcomm.com>
2026-03-21 00:48:09 +00:00
Terry Geng
9d5cc50cc9 drivers: sensor: hx711_spi: Define trigger variables if pinctrl is set
All trigger related variables will be defined only if pinctrl has name
`trigger`. This can save some RAM when having multiple hx711 configured
but only using trigger for some of them.

Signed-off-by: Terry Geng <terry@terriex.com>
2026-03-21 00:47:57 +00:00
Terry Geng
fba78a3b73 drivers: sensor: hx711_spi: Add data ready trigger to HX711 driver
HX711 pulls DOUT low when data is ready. This commit enabled pin config
to switch from SPI to GPIO and set up GPIIO interrupts for the falling
edge.

The implementation is similar to the `infineon,airoc-wifi` driver, by
using pinctrl.

Signed-off-by: Terry Geng <terry@terriex.com>
2026-03-21 00:47:57 +00:00
Terry Geng
1fec903653 drivers: sensor: hx711_spi: Add spi driver for HX711
HX711 is a specialized 24-bit ADC for load cell and strain gauge sensors.
It uses a two-wire (PD_SCK and DOUT) serial protocol that
 - first 24 clock cycles reads out the sample
 - last 1 to 3 clock cycles set the PGA gain for the next sample

 The requirement of control the exact number of clock cycles makes the
 SCK for SPI unsuitable for clocking HX711. Instead, in this commit, the
 clock is implemented as a series of 0xAA on the MOSI.

Signed-off-by: Terry Geng <terry@terriex.com>
2026-03-21 00:47:57 +00:00
Tomasz Moń
1525950cd6 usb: device_next: remove udc_buf_get_all()
Function udc_buf_get_all() was intended to be a helper to remove all
requests from endpoint FIFO. While for just freeing all queue the
it may be argued that there may be some doubtful simplicity argument,
merging multiple submitted transfers into one is just enforcing
unnecessary complexity on class implementations.

At general level, every submitted (enqueued) request should get
corresponding completion (request callback) call. UDC drivers were
violating this sensible behavior when dequeuing (cancelling) requests by
merging all submitted requests into one.

Remove udc_buf_get_all() and replace all uses with simple loops. For
most classes (that submit just one request for an endpoint at a time)
this has no functional difference. For classes that implement double
buffering this simplifies completion handling.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-03-21 00:47:16 +00:00
Fin Maaß
5286027c85 drivers: firmware: qemu: don't enable QEMU_FWCFG by default
don't enable QEMU_FWCFG by default

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-20 12:40:17 -05:00
Sylvio Alves
7dca2c4813 drivers: usb: udc_dwc2: use gpio_ll for USB PHY drive capability
Update gpio_set_drive_capability() to new gpio_ll_set_drive_capability()
as part of the hal_espressif updates.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-03-20 12:38:43 -05:00
Fabrice DJIATSA
52fcd6c2de drivers: i2c: update i2c driver for stm32 hal2
There are different naming conventions between
HAL versions.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2026-03-20 12:38:22 -05:00
Marek Matej
e0aab61c36 drivers: wifi: eswifi: add heap request
Samples using this wifi adapter is missing heap. Adding heap request
into eswifi driver.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2026-03-20 12:37:39 -05:00
Lubos Koudelka
0147f357c6 drivers: regulator: add VREFBUF support on STM32WB
Extend the STM32 VREFBUF regulator driver to support STM32WB devices.
Update the st,stm32-vrefbuf devicetree binding and add the VREFBUF
node to the STM32WB SoC dtsi so that applications can enable the
internal reference buffer on STM32WB.

Signed-off-by: Lubos Koudelka <lubos.koudelka@st.com>
2026-03-20 12:34:56 -05:00
Pete Johanson
050748c8ba drivers: mbox: Add ADI MAX32 mbox driver.
Implement a MAX32 mbox driver with the semaphore peripheral.

Tweak the mbox test to allow testing with only one TX/RX channel pair
available.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2026-03-20 12:34:01 -05:00
William Markezana
7f71420004 drivers: usb: add Bouffalo Lab BL70x USB device controller driver
Add a USB 2.0 Full-Speed device controller driver (udc_bflb) for the
Bouffalo Lab BL70x SoC family. The driver supports up to 8 bidirectional
endpoints with interrupt-driven operation.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-03-20 12:33:43 -05:00
Valerio Setti
8372f0939f drivers: esp32: bt|wifi: adjust Kconfigs for TF-PSA-Crypto 1.x
- replace legacy Kconfigs with corresponding PSA_WANT ones.
- extend Mbed TLS' CMake file in order to include these legacy ecdh module
  that was removed from TF-PSA-Crypto when ESP32 BT and WiFi drivers are
  built.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-03-20 12:32:52 -05:00
Jan Carlo Roleda
d6eeab9600 drivers: sensor: adt7420: add support for ADT7410 and ADT7422
Add configuration to support ADT7410 and ADT7422
hardware specifications.

Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
2026-03-20 10:00:42 -05:00
Jan Carlo Roleda
ac44c8b550 drivers: sensor: adt7420: add power management support
Add Power Management Subsystem to ADT7420 driver for
suspending and resuming device operations.

Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
2026-03-20 10:00:42 -05:00
Jan Carlo Roleda
d07b8a20f6 drivers: sensor: adt7420: Extend ADT7420 Driver Support
Extended ADT7420 driver to support:
- extend dtbindings for comprehensive configuration control
- Support 13-bit and 16-bit ADC resolution
- extend Sensor API support
- extend interrupt support to include CT pin

Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
2026-03-20 10:00:42 -05:00
Armando Visconti
4d42b179e9 drivers/sensor: st: fix i2c transfer len
Fix I2C transaction len using the correct size of the data to be sent
and not the returned length of the allocated buffer. This change is
applied to iis3dwb, lis2dux12 and lsm6dsv16x drivers, and mimic what
is also done for lsm6dsvxxx driver.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-03-20 09:58:05 -05:00
Mathieu Choplain
3e9e139565 drivers: pinctrl: stm32: move iosync configuration to common code
Perform iosync configuration in the common stm32_gpioport_configure_pin()
function instead of doing it from the pinctrl driver. This simplifies the
pinctrl driver and also opens the door to iosync configuration using the
GPIO API (via vendor-specific extensions) in the future.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-20 09:57:51 -05:00
Alain Volmat
5a27dc2b25 drivers: video: check parameters of video_closest_frmival_*
Add parameter checking of in functions video_closest_frmival
and video_closest_frmival_stepwise and return an error in
case of invalid parameter.
Previously ASSERT were used, but thoses are not always enabled,
leading to possibility to have invalid parameter being used.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-03-20 09:57:20 -05:00
Alain Volmat
055a9c29bf drivers: video: return an error instead of ASSERT
ASSERT are not always enabled, leading to not catching
invalid arguments in situation where it is not enabled.
Replace all ASSERT statement with argument check, properly
returning error instead of accessing invalid addresses.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-03-20 09:57:20 -05:00
Alain Volmat
7559b5102b drivers: video: avoid ASSERT in video_(auto_)cluster_ctrl
ASSERT aren't always enabled hence add return value in
video_auto_cluster_ctrl and video_cluster_ctrl functions
in order to avoid accessing invalid parameter and return
an error.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-03-20 09:57:20 -05:00
Sergei Ovchinnikov
9ecbe311d4 drivers: sensor: nPM10xx sensor bindings and driver
Nordic's nPM10 Series PMIC Sensor Devicetree bindings and minimal driver
supporting only battery current, voltage and temperature measurements.

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2026-03-20 09:55:57 -05:00
Karthikeyan Krishnasamy
8279343c92 drivers: can: add Infineon CAN driver
Adds CAN driver for Infineon devices using the Bosch M_CAN IP core.  The
driver is structured using a parent-child architecture to match the
Infineon hardware implementation:
- Parent (infineon,canfd-controller): Manages Shared MRAM
  initialization, enables controller level timestamp-counter and ECC.
- Child (infineon,can): Individual CAN channel initialization.
  Configures pinctrl, peripheral clock assignment, MRAM configuration,
  and interrupts.  Remaining initialization is handled by can_mcan.

This driver was originally written by Karthikeyan Krishnasamy
<karthikeyan@linumiz.com> in PR#101930.  Clocking updates and CAN
controller wrapper were added by John Batch.

Co-authored-by: John Batch <john.batch@infineon.com>
Assisted-by: GitHub Copilot:claude-opus-4.6
Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
Signed-off-by: John Batch <john.batch@infineon.com>
2026-03-20 09:55:43 -05:00
John Batch
ef5877aaa0 drivers: spi: infineon: use shared HF clock utility
Remove the duplicated ifx_cat1_get_hfclk_for_peri_group() function and
replace with the version from the clock_control header.

Assisted-by: GitHub Copilot:claude-opus-4.6
Signed-off-by: John Batch <john.batch@infineon.com>
2026-03-20 09:55:43 -05:00
John Batch
02d10281ee drivers: serial: infineon: use shared HF clock utility
Remove the duplicated ifx_cat1_get_hfclk_for_peri_group() function and
use version from shared header file.

Assisted-by: GitHub Copilot:claude-opus-4.6
Signed-off-by: John Batch <john.batch@infineon.com>
2026-03-20 09:55:43 -05:00
Jamie McCrae
cdc480afb6 dts: nordic: nrf54h20/nrf9280: Update to use zephyr,mapped-partitions
Updates the dts nodes switch partitions to use the new
zephyr,mapped-partition compatible.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-20 09:54:59 -05:00
Sylvio Alves
0906867d9a drivers: regulator: espressif: add LDO driver
Add a regulator driver for the internal general-purpose LDO channels
found in some Espressif SoCs. These LDO channels can supply power to
internal and external peripherals such as SPI flash and PSRAM.

The driver supports:
- Enable/disable LDO output channels
- Continuously adjustable voltage from 500mV to 2700mV
- Rail bypass mode at 3300mV
- Standard regulator device tree properties (boot-on, always-on, etc.)

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-03-20 09:54:12 -05:00
Fin Maaß
911ce665c9 drivers: ethernet: w5500: only start thread in iface init
start rx and link status thread in iface init,
as only then the iface pointer in the data
struct is set.

ALso simplify link status update logic.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-20 09:52:48 -05:00
Erwan Gouriou
fec56d3076 soc: stm32: common: Add xspi manager
Implement a device driver for XSPI manager.
This allows to define the xspi controllers configuration that should
be applied towards the xspi IO ports:
- Muxed
- Swapped
- ...

Since its configuration has impact on final application location and
implies the deactivation of xspi clocks, it should be run only at fsbl
stage and not later.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-03-20 20:46:57 +09:00
Erwan Gouriou
7df2d0e20b drivers: flash: stm32_xspi: Fix XPIM presence conditional check
There is no such thing as XSPIM1/XSPIM2 and not all XSPIM compatible
devices declare HAL_XSPIM_IOPORT_1/2.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-03-20 20:46:57 +09:00
Gang Li
83f0cd4a59 driver: wifi: nxp: add support for network frequency band selection
If user selects a band, then we should restrict scanning channels to
that band. This can be used to speed up scanning by limiting scans
to specific channels when the network is known to not use all possible
channels.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2026-03-20 20:46:29 +09:00
Jackson Farley
ea88bf7cf6 drivers: uart: added rx timeout for MSPM0
The low RX FIFO threshold of 1 could lead to issues during higher baud
rates, thus the threshold is increased and the RX Timeout feature on the
MSPM0 is introduced.

Signed-off-by: Jackson Farley <j-farley@ti.com>
2026-03-20 20:45:39 +09:00
Jackson Farley
5384bd0b5f drivers: serial: uart bugfix for interrupt ISR
The isr implementation would clear pending interrupts that had fired
since the first check for pending interrupts, leading to missed events.
This PR amends that issue and fixes typos in comparing IIDX types rather
than bitmasks to explicit comparisons

Signed-off-by: Jackson Farley <j-farley@ti.com>
2026-03-20 20:45:39 +09:00
Sergei Ovchinnikov
16f6618d4f drivers: regulator: nPM10xx regulator driver
Nordic's nPM10 Series PMIC regulator Devicetree bindings, helpers and
driver.

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2026-03-20 20:45:16 +09:00
Sergei Ovchinnikov
ff6328b23f drivers: charger: nPM10xx charger driver
Nordic's nPM10 Series PMIC charger Devicetree bindings and driver

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2026-03-20 20:45:04 +09:00
Francois Ramu
1f4ad5d7d2 drivers: dma: stm32: update driver for stm32 hal2
The LL driver has a different access to the dmax_Channely,
and some macros have been renamed.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2026-03-20 20:44:12 +09:00
Guillaume Gautier
1ed9563804 drivers: counter: stm32: rtc: adapt rtc driver for stm32 hal2
STM32 HAL2 adopts some new syntaxes so the Counter RTC driver needs to be
updated.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-03-20 20:43:57 +09:00
Guillaume Gautier
1b540adcde drivers: rtc: stm32: adapt rtc driver for stm32 hal2
STM32 HAL2 adopts some new syntaxes so the RTC driver needs to be updated.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-03-20 20:43:57 +09:00
Laurentiu Mihalcea
1654a34817 drivers: pinctrl: Kconfig.imx: fix missing dependency for PINCTRL_IMX_SCMI
Currently, PINCTRL_IMX_SCMI depends on the SCMI stack being enabled and
the existence of the pinctrl protocol node. This, by itself, is not enough
since this condition can be met by any vendor wanting to use the pinctrl
protocol. Thus, the IMX SCMI pinctrl driver will end up being selected for
other vendors as well, which is not correct.

Fix this by adding a dependency on the IMX-specific pinctrl child being
present. By doing this, the driver will remain auto-selected.

Fixes #105673.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-03-20 20:43:36 +09:00
Fin Maaß
65860193cf drivers: serial: test: implement missing irq_is_pending
implement missing irq_is_pending.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-20 20:43:25 +09:00