Commit graph

25,525 commits

Author SHA1 Message Date
Lars Thiemann
03c557b004 drivers: gpio: pca-series: Cast pointer to void * in logging statements
This silences warnings created at runtime, as the %p format specifier
expects a void pointer.

Signed-off-by: Lars Thiemann <thiemann@cognid.de>
2025-05-10 13:02:12 +02:00
Lars Thiemann
13fe09c5b9 drivers: gpio: pca-series: Reset device before register access
Reset the port expander before accessing any register
or updating the cache.

Signed-off-by: Lars Thiemann <thiemann@cognid.de>
2025-05-10 13:02:12 +02:00
Liang Jiaxiang
b2c6d960cb sensor: bmi08x: Fix variable name in bmi08x_acc_trigger_mode_init
Fix undeclared variable error by changing 'config' to 'cfg' in the
data_sync condition check, matching the variable name declared at the
beginning of the function.

Signed-off-by: Liang Jiaxiang <moonbite233@gmail.com>
2025-05-09 21:09:04 +02:00
Chen Xingyu
5be38c6996 drivers: auxdisplay: Add driver for common 7-segment display
This commit introduces a new driver for a common GPIO-driven 7-segment
display. supporting both common anode and common cathode configurations.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2025-05-09 21:08:32 +02:00
Henrik Brix Andersen
81ee157876 drivers: can: common: mark unused function argument as such
Use ARG_UNUSED() to mark unused function argument.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-09 18:00:27 +02:00
Henrik Brix Andersen
b04d6f876c drivers: can: common: declare prescaler variable inside loop
Declare the prescaler variable inside the loop where it is used.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-09 18:00:27 +02:00
Henrik Brix Andersen
d5f07eb8c9 drivers: can: common: terminate if ... else if ... constructs with else
Terminate "if ... else if ..." constructs with an empty "else" clause to
indicate that consideration has been given regarding the behaviour when all
other conditions evaluate to false.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-09 18:00:27 +02:00
Henrik Brix Andersen
404d92d516 drivers: can: common: define each identifier in a dedicated statement
Define each identifier in a dedicated statement.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-09 18:00:27 +02:00
Adam Berlinger
c1a173a884 driver: uart: stm32: Add workaround for DMAT errata in low-power modes
This change adds additional workaround for following errata:
"USART does not generate DMA requests after setting/clearing DMAT bit"
Instead of keepint DMAT bit set, it sends first byte by polling
in firmware. This prevents additional power consumption in STOP mode,
caused by keeping DMAT bit set.

Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
2025-05-09 17:59:49 +02:00
Adam BERLINGER
ccf07d45b5 driver: uart: stm32: Clear buffer length only in UART TC event
The buffer_length != 0 is used to check if there is transfer ongoing
inside the uart_stm32_async_tx function. uart_stm32_dma_tx_cb clears
it to 0 when TX DMA is finished, but before the USART send all
the data from shift register.
buffer_length is also cleared in callback async_evt_tx_done,
which is called when USART finished sending all the bytes.
If the uart_stm32_async_tx would be called after
uart_stm32_async_tx, but before async_evt_tx_done there
could be race condition on buffer_length.

Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
2025-05-09 17:59:49 +02:00
Hieu Nguyen
a82a5187dd drivers: can: Initial support for RZ/G3S
Add CAN driver support for Renesas RZ/G3S

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-05-09 17:59:38 +02:00
Chen Xingyu
95996c7bbe drivers: display: Select LED_STRIP when LED_STRIP_MATRIX is enabled
The LED_STRIP driver is not enabled by default on all boards. As a result,
building the LED_STRIP_MATRIX display driver fails if LED_STRIP is not
manually enabled.

To address this, this commit changes the dependency from `depends on` to
`select`, ensuring that the required driver is automatically enabled and
build failures are avoided.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2025-05-09 15:42:50 +02:00
Krzysztof Chruściński
2f7d799c99 drivers: adc: nrfx_saadc: Add validation of channel configuration
On nrf54h20 there are additional analog pins (AIN8+). When differential
mode is used they must not be mixed with AIN0-AIN7. Add build time
validation which detects if configuration is invalid.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-05-09 15:40:53 +02:00
Chun-Chieh Li
75e7d0eeae drivers: can: support nuvoton m55m1x series
This supports Nuvoton m55m1x series can-fd controller.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-05-09 14:01:32 +02:00
Chun-Chieh Li
d1e8590b6b drivers: can: numaker: fix m2l31x core clock
This fixes canfd core clock for m2l31x soc.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-05-09 14:01:32 +02:00
Bjarki Arge Andreasen
0826996337 drivers: gpio: gpio_nrfx: store init output val for get_config
The nRF GPIO hardware does not store the initial output value
set resulting from gpio_pin_configure() and thus, when
gpio_get_config() is used, the initial value is not returned.

This commit just reads the output value and sets the INIT
value to match in gpio_get_config().

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-05-09 12:55:45 +02:00
Titouan Christophe
25b326bc1f flash: stm32h7x: fix implicit declaration for LL_GetFlashSize
Since https://github.com/zephyrproject-rtos/zephyr/pull/83114 was merged,
I get twister errors unrelated to my pull requests for the STM32H7S78-DK
(for example https://github.com/zephyrproject-rtos/zephyr/actions/runs/14900504138/job/41851537049#step:12:1369)

This is because the function LL_GetFlashSize() was removed from hal_stm32
on the STM32H7RS series in
e5eba65b76

I am unsure if the removal from hal_stm32 is intentional. If yes, then this
commit should be merged into Zephyr to fix compilation for that target.
Otherwise, hal_stm32 must be patched, Zephyr's west manifest updated, and
this commit can be discarded.

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-05-09 12:52:12 +02:00
Neil Chen
9a58c44544 drivers: syscon: support mcxa153 lpi2c clock
MCXA153 only have one I2C, support its clock in syscon driver.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-05-09 12:51:20 +02:00
Nhut Nguyen
bc429da9fb drivers: gpio: rz: Mass renaming
Mass renaming is carried out to unify some prefixes and shorten some
macros, making the code easier to maintain and support new devices.

- Rename `int_dev` to `gpio_int_dev` for gpio interrupt
- Rename `eirq` to `ext_irq` for external interrupt
- Rename `gpio_rz_hw_config` to `gpio_rz_flags`
- Rename `p_pm` to `gpio_flags`
- Rename `pre_flags` to `rz_flags`
- Remove `_IOPORT` and `_PIN_CONFIGURE` in some macros
- Rename `GPIO_RZ_PIN_CONFIGURE_GET_FILTER`,
  `GPIO_RZ_PIN_CONFIGURE_GET`, `GPIO_RZ_PIN_SPECIAL_FLAG_GET` to
  `GPIO_RZ_FLAG_GET_FILTER`, `GPIO_RZ_FLAG_GET_CONFIG`,
  `GPIO_RZ_FLAG_GET_SPECIFIC` respectively

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-05-09 12:51:11 +02:00
Jianxiong Gu
31d65aac5d drivers: pinctrl: wch_20x_30x_afio: fix afio remap
- Enable AFIO clock prior to remap configuration
- Consolidate remap logic in a single conditional block
- Correct USART1 remap detection by checking pcfr_id
- Apply changes to pinctrl_wch_afio.c

Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
2025-05-09 08:22:40 +02:00
Robert Hancock
35b843b52e drivers: serial: serial_test: Support irq_update call
This driver doesn't need to do anything in its irq_update
implementation, but add a dummy one so that calls to uart_irq_update
don't fail with -ENOSYS.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-05-09 01:40:57 +02:00
Robert Hancock
c3f9e6d1ba drivers: serial: serial_test: support IRQ callback user data
This driver previously caused an assertion error if non-NULL user_data
was passed to uart_irq_callback_set. Add support for this by storing the
user data and passing it back to the IRQ callback function.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-05-09 01:40:57 +02:00
Martin Stumpf
acfd958f4b drivers: fpga: ice40: Fix log level
All FPGA driver implementations should respect `CONFIG_FPGA_LOG_LEVEL`.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2025-05-09 01:40:35 +02:00
e039b8d59c drivers: clock_control: set the flash wait state to match the RM
The flash latency needs to be configured before switching to the high
speed clock. Set the latency based on the CH32V003 and CH32V00x
reference manual.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-09 01:40:22 +02:00
3dbf080698 hal: wch: widen the checks to include the CH32V family
Expand the current systick compatibility to include the CH32V00x
series. Change the HAL compatibility to include all of the CH32V
family.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-09 01:40:22 +02:00
f4b1544bec drivers: pinctrl: add a driver for the CH32V00x series
The CH32V006 and others in the CH32V00x series are an evolution of the
CH32V003 and use different remap offsets for the various peripherals.

In the same way as the CH32V20x, fork the CH32V003 driver and add
CH32V00x support.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-09 01:40:22 +02:00
Emilio Benavente
5fd6715917 drivers: watchdog: Added Driver for the EWM
Added a driver for the External Watchdog Driver

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-05-09 01:39:56 +02:00
Joel Guittet
54b826336b drivers: counter: counter_reset api support to stm32 timer
Add support to reset counter value.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2025-05-08 19:53:12 +02:00
Dhruv Menon
6b363634d8 drivers: gpio: update GPIO register addresses for TI davinci
This commit adds a padding of 0x10 bytes at the beginning of the
`gpio_davinci_regs` structure to correctly align the register
definitions with the actual register layout.

Previously, the DTS had to manually offset the base address by
0x10, introducing a special case in Zephyr's Davinci GPIO driver.
This change eliminates the need for that workaround
Adding the paddingi also help to maintain a similarly with also
to the linux counterpart.

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
2025-05-08 19:50:31 +02:00
Seppo Takalo
673853ae5a drivers: eth: native_tap: Init MAC properly
Set static or random MAC before calling net_linkaddr_set().

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-05-08 15:56:27 +02:00
Swift Tian
389103dfec drivers: ambiq: rework ambiq spi and i2c drivers cache handling
1. rework IOM cmdq buffer instantiation
2. rework spi and i2c cache handling as it is incorrect.
3. buffers need to be aligned with DCACHE on

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2025-05-08 14:00:52 +02:00
Martin Jäger
81cd7cacc4 drivers: input: input_adc_keys: add debouncing to avoid false events
The previous implementation already reported a key-press event after
reading an ADC value close to the threshold for the first time.

This may lead to false events if the ADC takes a reading just during
the transition from one button state to another (especially if a
somewhat large capacitor is used to avoid noise).

A key-press state must be same for at least two samples in order to
avoid such issues, which is what this commit implements.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-05-08 12:25:48 +02:00
Jeremy Dick
a167c2d895 drivers: input: cap12xx Add properties for sensitivity and guard signal
The Microchip CAP12xx series has a configurable sensitivity and
can drive an optional guard signal to reduce noise sensitivity.

Signed-off-by: Jeremy Dick <jdick@pivotint.com>
2025-05-08 12:25:18 +02:00
Michał Stasiak
16b9f60432 drivers: audio: dmic_nrfx: add support for audio clocks on nRF54
Added support for audio clock for nRF54L20 and AudioPLL
for nRF54H20 in DMIC PDM driver.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-05-08 12:24:31 +02:00
Pisit Sawangvonganan
77bb19c2a9 drivers: sensor: shell_battery: use shell_print where applicable
To improve code clarity, use `shell_print` in place of `shell_fprintf`
with `SHELL_NORMAL` where appropriate.
For partial-line outputs, use `shell_fprintf_normal` to preserve output
formatting.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-05-07 17:45:39 +02:00
Pisit Sawangvonganan
f74d2a79de drivers: sensor: shell: make channel and attribute name tables as const
Make `sensor_channel_name` and `sensor_attribute_name arrays` to use
`const char *const`. This ensures full immutability of the tables,
placing them entirely in the `.rodata` section and reducing usage
of the `.data` segment.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-05-07 17:45:39 +02:00
Pisit Sawangvonganan
6014ff392a drivers: sensor: shell: align struct shell * name to sh
Aligned the `struct shell *` argument name from `shell_ptr` to `sh`
for consistency with other drivers' usage of `sh`, and to match
the `shell_cmd_handler` argument name.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-05-07 17:45:39 +02:00
Pisit Sawangvonganan
e02e532272 drivers: sensor: shell_stream: align struct shell * name to sh
Aligned the `struct shell *` argument name from `shell_ptr` to `sh`
for consistency with other drivers' usage of `sh`, and to match
the `shell_cmd_handler` argument name.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-05-07 17:45:39 +02:00
Tom Chang
98678cabd4 drivers: clock: npcx: correct the setting for module power-down
The PWDWN_CTLx have been adjusted to support for NPCK chips. This
commit updates powe-down control initialization for NPCXN and NPCKN chips.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2025-05-07 15:13:29 +01:00
Dipak Shetty
418d2e6baa drivers: stepper: adi_tmc: diag0 interrupt support for tmc51xx
Add support for using the diag0 pin as an interrupt source. This
allows event detection via diag0 interrupts instead of polling rampstat.
The driver now:
- Configures diag0 when the GPIO is available
- Sets up GPIO interrupt handling for rising edge transitions for
rampstat reading
- Falls back to polling only when diag0 is not available

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-07 13:34:02 +02:00
Dipak Shetty
e5026d4a96 drivers: stepper: simplify event detection config
Simplified by removing redundant options and
enabled automatic fallback to ramp status polling when
diag0 pin is unavailable for event detection.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-07 13:34:02 +02:00
Camille BAUD
3f3b04ee5b drivers: serial: Fix litex driver
This fixes several ways to hang the driver, such as:
- typing too fast
- going over the read buffer capacity
- pasting anything
- using arrow keys (sending 2 chars at once)
etc

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-05-07 13:33:56 +02:00
Tim Lin
b4936c587a dts: ite: it51xxx: Change the base address of voltage selection
Change the base address of GPIO and pinctrl voltage selection
The new base address enables more pins to support voltage selection.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-05-07 13:33:14 +02:00
Johan Hedberg
4cce7b6987 Bluetooth: drivers: Add names to Silabs EFR32 threads
This makes thread analysis output nicer, e.g.:

uart:~$ kernel thread list
Scheduler: 25953 since last call
Threads:
 0x20002380 EFR32 HCI RX
        options: 0x0, priority: -10 timeout: 0
        state: pending, entry: 0x80228fd
        stack size 512, unused 216, usage 296 / 512 (57 %)

 0x20002478 EFR32 LL
        options: 0x0, priority: -16 timeout: 0
        state: pending, entry: 0x8022921
        stack size 1024, unused 296, usage 728 / 1024 (71 %)

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-05-07 13:32:28 +02:00
Arunmani Alagarsamy
dd1bfa4eb9 drivers: wifi: siwx91x: Fix default scan time handling
The commit `1f73ca3` clarified that a scan time of 0 should be used to
apply the default scan timeout, as opposed to using
SL_WIFI_DEFAULT_ACTIVE_CHANNEL_SCAN_TIME, which incorrectly results in
a 65-second timeout.

However, this fix was unintentionally omitted in commit `bf22b61`
when the `sl_si91x_configure_timeout()` function was relocated.

This commit restores the behavior.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-05-07 13:32:04 +02:00
Arunmani Alagarsamy
89d6068504 drivers: wifi: siwx91x: Add param change handling for STA and AP modes
Implemented logic to detect changes in key Wi-Fi parameters (SSID, PSK,
security, channel) and disable the interface accordingly. For STA mode,
the driver disconnects before reconnecting with updated parameters. For
AP mode, it disables and re-enables the AP if changes are detected.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-05-07 13:32:04 +02:00
Arunmani Alagarsamy
98e72e9ed6 drivers: wifi: siwx91x: Relocate driver functions
Relocate the functions siwx91x_status(), siwx91x_disconnect(), and
siwx91x_ap_disable() to improve code structure and accessibility. This
reorganization prepares the codebase for upcoming integration of
connection and AP enable logic that handles parameter differences.

No functional changes are introduced in this commit.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-05-07 13:32:04 +02:00
David Schneider
9455b412d2 drivers: sensor: maxim,ds3231: fix config dependency
Make the config which is specific for DS3231 depend on
the driver for it being enabled.

Signed-off-by: David Schneider <schneidav81@gmail.com>
2025-05-07 11:45:32 +02:00
Krzysztof Chruściński
aa8b25850f drivers: serial: nrfx_uarte: Add support for direct interrupts
Add option to use direct ISR.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-05-07 11:45:18 +02:00
Dean Sellers
be894849f1 drivers: ethernet: enc28j60: Add set config for runtime macaddr
Allow runtime setting of the MAC address for this driver.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2025-05-07 11:44:50 +02:00