Commit graph

17,121 commits

Author SHA1 Message Date
Zafer SEN
9e2bdfb09c drivers: modem: hl78xx: add optional auto-baudrate detection and switching
This adds an optional auto-baudrate mechanism that improves robustness
when the modem boots with an unknown or changed UART speed.

Key additions:
* New Kconfig option MODEM_HL78XX_AUTO_BAUDRATE and related settings:
  - selectable target baud rate
  - detection baudrate list
  - detection timeout and retry count
  - option to persist AT+IPR updates
  - option to start diagnostics or boot directly with auto-baud logic
* UART status tracking added to hl78xx_data, including current and target
  baud rates
* New HL78XX_MODEM_INFO_CURRENT_BAUD_RATE info field
* New MODEM_HL78XX_STATE_SET_BAUDRATE state with detection and switching
  logic
* Chat, init, and diagnostic handlers updated to route failures into the
  auto-baudrate logic when enabled
* New helpers: hl78xx_get_uart_config(), hl78xx_try_baudrate(),
  hl78xx_detect_current_baudrate(), hl78xx_switch_baudrate()
* Startup delay increased when auto-baudrate-at-boot is enabled

These changes allow the driver to recover from unexpected modem UART rate
changes and keep the UART configuration synchronized with the modem.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-01-09 10:38:39 +01:00
Peter Mitsis
669a8d0704 kernel: O(1) search for threads among CPUs
Instead of performing a linear search to determine if a given
thread is running on another CPU, or if it is marked as being
preempted by a metaIRQ on any CPU do this in O(1) time.

On SMP systems, Zephyr already tracks the CPU on which a thread
executes (or lasted executed). This information is leveraged to
do the search in O(1) time.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2026-01-08 17:34:14 -06:00
Amneesh Singh
8b310cf824 drivers: intc: vim: fix header macros
BIT_MASK(32) cannot do (1 << 32) - 1 without causing integer overflow.
Hence, for these macros BIT64_MASK(32) is required.

Additionally, remove the unnecessary (and presently unused) macros for the
register space. All of these can be reliably derived from the present
register masks.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
2026-01-08 21:18:38 +01:00
Henrik Brix Andersen
392e816ef0 drivers: can: mcan: add support for configuring internal timestamp counter
Add support for configuring and enabling the internal timestamp counter of
the Bosch M_CAN IP core.

Frontend drivers can overwrite this configuration for using a SoC-specific,
external timestamp counter.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-01-08 19:15:29 +01:00
Thinh Le Cong
15cdf90bee include: zephyr: toolchain: suppress Go004 warning for inline functions
IAR compiler may emit Error[Go004]: Could not inline function
when handling functions marked as always_inline or inline=forced,
especially in complex kernel code

Signed-off-by: Thinh Le Cong <thinh.le.xr@bp.renesas.com>
2026-01-08 12:00:29 +00:00
Guillaume Gautier
d81dee74c9 include: dt-bindings: adc: remove all stm32*_adc.h
Now that the STM32 ADC resolution property do not use special macros
anymore, these include files can be removed.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-01-08 11:55:35 +00:00
Tom Burdick
c11ae6b6b2 mctp: I3C bindings and samples
Adds bindings for communicating with the MCTP protocol over I3C with IBI
for signaling.

Notably I3C currently requires devices on the bus be struct device's the
way the Nuvoton driver is written and the API is written. So we create a
little glue driver (mctp_i3c_endpoint) to allow us to later bind a aptly
named mctp_i3c_controller MCTP binding.

On the target side the only usable driver for target mode is Nuvoton's.
Nuvoton's driver only implements the optional buffer read/write
callbacks rather than the read/write byte at a time callbacks. This is
actually probably for the better but it does mean this binding requires
those optional target mode functions.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2026-01-08 09:35:25 +01:00
Nicholas Braaten
d426f153ae doc: clarified description of k_uptime_delta
Description added in docs.
Header updated to clarify that the function modifies the argument.

Signed-off-by: Nicholas Braaten <git@nicbra.no>
2026-01-08 09:28:20 +01:00
Dharun krithik k
7f644b104f dt-bindings: clock: add Infineon PSoC4 clock source bindings
Add clock source definitions for the Infineon PSoC4 series.
This introduces the \`ifx_clock_source_psoc4xx.h\` header with
HFCLK divider macros and integrates it into the board clock
source selection.

Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2026-01-08 09:27:24 +01:00
Tahsin Mutlugun
87ce02b011 drivers: i3c: Move i3c_bus_mode() to common layer
i3c_bus_mode() is duplicated across several drivers. Move it into
i3c_common.c to eliminate that.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-01-07 19:40:18 +01:00
Hubert Guan
0b57af0c94 lib: multi-heap: Add shared_multi_heap_realloc
Add the function shared_multi_heap_realloc to reallocate memory blocks
in shared multi-heaps.

Signed-off-by: Hubert Guan <hubertyguan@gmail.com>
2026-01-07 14:07:52 +01:00
Chris Friedt
de62eb23eb net: compat: remove conflicting declaration of ARPHRD_ETHER
Without removing this line, I would get a warning (promoted to error) that
the symbol was being redefined in either `net_ip.h` or
`posix/net/if_arp.h`. Actually, `posix/net/if_arp.h` probably should not
exist, but that is part of a separate PR.

Signed-off-by: Chris Friedt <chris@fr4.co>
2026-01-07 10:22:34 +01:00
Scott Worley
99ce899c22 drivers: pinctrl: microchip: mec: One PINCTRL driver for all MEC parts
GPIO hardware in Microchip MEC parts is the same except for the MUX
field (number of alternate functions). We modify the old XEC PINCTRL
driver to work on all MEC parts and also be independent of HAL and
CMSIS register structures. During development we found a DT issue
with DT_ENUM_IDX_OR always inserting the default value. Worked around
by converting slew rate and drive strength to YAML integer type and
created defines for the values in the dt-bindings header.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2026-01-07 07:50:18 +01:00
Afonso Oliveira
81e28ca12f arch: riscv: avoid GNU statement-expr CSR write macros
csr_write(), csr_set(), and csr_clear() use GNU C statement expressions,
which triggers SonarQube/clang warnings like:

  use of GNU statement expression extension from macro expansion

Rewrite these write-only macros as do { ... } while (0) statement macros.
No functional change expected.

Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
2026-01-07 07:44:13 +01:00
Sebastian Panceac
9af59a6e23 doc: Fix reference to generated event when calling uart_tx_abort()
This commit replaces in the documentation of uart_tx_abort()
function, the generated event type `UART_TX_DONE` with the
correct one: `UART_TX_ABORTED`.

Signed-off-by: Sebastian Panceac <spanceac@gmail.com>
2026-01-06 16:07:26 -06:00
Tanguy Raufflet
b1a35c1df9 dt-bindings: reset: stm32mp2: add reset for I3C peripherals
Add reset bindings for I3C peripherals for the STM32MP2 series.

Co-authored-by: Charles Wenger <charles.wenger@savoirfairelinux.com>
Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
2026-01-06 19:14:41 +00:00
Tanguy Raufflet
f88f3637ff dt-bindings: clock: stm32mp2: add clocks for I3C peripherals
Add clock bindings for I3C peripherals for the STM32MP2 series.

Co-authored-by: Charles Wenger <charles.wenger@savoirfairelinux.com>
Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
2026-01-06 19:14:41 +00:00
Emil Gydesen
6345dab3de Bluetooth: Audio: Use BT_CONN_ROLE over BT_HCI_ROLE
Use the host defined roles, rather than the HCI defined ones.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-01-06 19:14:19 +00:00
Peter Korsgaard
54eda2761a i2c: target: target_eeprom: make legacy functions wrappers
Implement eeprom_target_program() using eeprom_target_write_data() and
eeprom_target_read() using eeprom_target_read_data() to limit redundant
code.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2026-01-06 19:14:03 +00:00
Peter Korsgaard
5aaa013351 i2c: target: target_eeprom: mark eeprom_target_program as deprecated
It does not provide an offset argument, so suggest
eeprom_target_write_data() instead.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2026-01-06 19:14:03 +00:00
Peter Korsgaard
7362cd6f45 i2c: target: eeprom_target: add {read,write}_data()
The current functions to access the EEPROM data are not ideal, E.G.:

- eeprom_target_program() is hard coded to write to the beginning of the
  EEPROM data

- eeprom_target_read() reads a single byte, so large overhead to read all
  data

So as an alternative, add an interface similar to what is provided by
zephyr/drivers/eeprom.h, E.G.  functions taking an offset and and length.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2026-01-06 19:14:03 +00:00
Peter Korsgaard
71f25d88a9 i2c: target: eeprom_target: add _get_size()
For some use cases it can be interesting to know how big the EEPROM is, so
add a getter for it.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2026-01-06 19:14:03 +00:00
Peter Korsgaard
0e24da356a i2c: target: eeprom_target: add changed callback
For some use cases it can be interesting to know when the eeprom has been
written to by the I2C host (E.G.  once a stop has been received after a
write transaction), so add a "changed" callback.

Multiple EEPROM instances are supported, so pass the device and user data
as arguments to the callback.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2026-01-06 19:14:03 +00:00
Michele Sardo
1ce6a26f70 debug: stack: include kernel.h for k_thread API usage
The debug/stack.h header uses k_thread types and APIs such as
struct k_thread, k_thread_stack_space_get(), and k_thread_name_get(),
but does not include <zephyr/kernel.h>.

This makes the header rely on transitive includes, which can lead to
build failures depending on include order.

Add an explicit include of <zephyr/kernel.h> to make the header
self-contained.

Signed-off-by: Michele Sardo <msmttchr@gmail.com>
2026-01-06 16:04:15 +00:00
Lyle Zhu
0c3239f0c9 bluetooth: Classic: hfp_hf: make at_get_string() return const char *
Change at_get_string() return type to 'const char *'. Correspondingly,
change string parameters in HFP HF callbacks and related functions
from 'char *' to 'const char *' to reflect that these strings are
read-only data returned from AT command parsing.

- Update bt_hfp_hf_cb callback signatures for clip, operator,
  call_waiting, and textual_representation
- Update at_get_string() return type to 'const char *'
- Update local variables in hfp_hf.c handlers to use 'const char *'
- Update shell callback implementations to match new signatures
- Change NULL check style from '!text' to 'text == NULL' for consistency
- Remove unnecessary initialization of 'number' variable in clcc_handle

This improves const-correctness and prevents accidental modification
of AT command response strings.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-01-06 10:35:28 +01:00
Emil Gydesen
59a1c6e0de Bluetooth: BAP: Add bt_bap_ep_get_conn
Add a new function, bt_bap_ep_get_conn, which returns
the ACL connection for the endpoint. This works because
endpoints are specific to an ACL in BAP. The function
returns a pointer with a new reference similar to the
lookup functions from conn.h

The conn pointer was not added to the bt_bap_ep_info
struct, as doing so would be more likely to cause
reference leaks if the caller did not care about the
conn pointer when using bt_bap_ep_get_info. It can be
added later if that is requested.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-01-06 10:29:40 +01:00
Emil Gydesen
f3b63a1bd6 Bluetooth: CCP: Server: Add support for get UCI
Add support for getting the UCI.
For now the UCI will be duplicated by the TBS
implementation, but will be optimizied in the future
so only one copy of the UCI exists.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-01-06 10:28:23 +01:00
Liam Ogletree
bb8381d2bf drivers: haptics: Add support for CS40L5x haptic driver
CS40L5x is a family (CS40L50/51/52/53) of haptics drivers designed
for trackpads, tablets, and automotive applications.

This PR provides basic functionality for ROM features and serves
as a starting point for the upstream driver. Notably, RAM firmware,
SPI,  and certain CS40L51/52 features (e.g., diagnostics,
closed-loop algorithms) are excluded from this PR.

Tested with internal/external boost configurations. Tested I2C.
Tested all ROM features with each device variant (50/51/52/53),
including ROM playback, "buzz" playback and configuration, custom
haptics playback and configuration, trigger playback and configuration,
runtime haptics logging, and gain configuration.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-01-05 23:38:24 +01:00
Christoffer Gjedsted Brask
f8dba1baee doc: zbus: clarify observer priority, fixed spelling and grammar
Changed the parameter description for _observers in ZBUS_CHAN_DEFINE and
ZBUS_CHAN_DEFINE_WITH_ID. The original description was hard to interpret
and appeared to be split by "@see struct zbus_channel".

Fixed several spelling and grammar issues.

Signed-off-by: Christoffer Gjedsted Brask <cgb@develco.dk>
2026-01-05 16:07:31 +01:00
Benjamin Cabé
f9fdd9fc50 include: dac: add doxygen docs for dac161s997 extended API
Adds doxygen documentation for the extended API of the TI DAC161S997
driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-01-05 11:38:41 +01:00
Benjamin Cabé
213c0cd98c include: dac: add doxygen group for device-specific DAC API extensions
Similar to how it's done for other driver classes, create a new doxygen
group to put all device-specific DAC API extensions under.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-01-05 11:38:41 +01:00
Johnny Chuang
6f0e2acf1e dt-bindings: elan em32f967 – clock, gpio, pinctrl, pwm
Add minimal DT binding headers and matching YAML files for the
Elan em32f967 SoC. The new definitions are required to build the
sample board and follow the upstream style.

Signed-off-by: Johnny Chuang <johnny.chuang@emc.com.tw>
2026-01-05 09:18:40 +01:00
Muhammad Waleed Badar
9d0a229461 drivers: sensor: add adxl345 range attribute setter
Add adxl345_attr_set_range() to allow runtime config.
of the accelerometer's measurement range via the
SENSOR_ATTR_FULL_SCALE attribute.

The function maps the requested range to the nearest supported
ADXL345 range (±2g, ±4g, ±8g, or ±16g) and updates the device
configuration accordingly.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-01-01 21:26:42 +01:00
Zhaoxiang Jin
f110ef9c0a drivers: clock_control: nxp_mc_cgm: enable tempsense clock
Enable clock for tempsense module in NXP MC CGM driver to
support temperature sensing functionality.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-12-31 10:58:50 +00:00
Zhaoxiang Jin
1f977a9220 include: hwspinlock.h: Optimize hw_spin_trylock function
If api->trylock(dev, id) fails (typically because a cross-core
HW lock is held by another core and returns -EBUSY, or returns
-EINVAL, etc.), the function will immediately return the error
code, but the local ctx->lock is not released, and interrupts
also remain in the locked state from the trylock. This may cause
IRQ lock state leakage. If there's no opportunity in the call path
to reach k_spin_unlock(), the system may exhibit unpredictable
"freeze-like" behavior.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-12-28 18:13:37 +00:00
Benjamin Cabé
540edab373 include: tracing: fix FIFO slist tracing hook naming mismatch
The macro names sys_port_trace_k_fifo_put_slist_enter/exit in
tracing.h were incorrectly named and did not match the corresponding
definitions in backend implementations.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-12-28 18:13:26 +00:00
Andreas Ålgård
98746a172c net: lib: dhcpv4_server: Add client hardware ID to client_id
This is useful if you specifically need the hardware address
 and not the client_id option.

Signed-off-by: Andreas Ålgård <aal@ixys.no>
2025-12-27 21:00:32 +00:00
Benjamin Cabé
62edae7d75 include: led_strip: tlc5971:: add doxygen docs for tlc5971 extended API
Adds doxygen documentation for the extended API of the Texas Instruments
TLC5971 LED strip controller driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-12-26 10:14:42 -06:00
Benjamin Cabé
d686aa732f include: led_strip: add doxygen group for LED strip API extensions
Similar to how it's done for other driver classes, create a new doxygen
group to put all device-specific LED strip API extensions under.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-12-26 10:14:42 -06:00
Arunprasath P
1cdde74b35 dts: arm: microchip: Introduce ADC G1 dts binding
Add the device tree node and the binding file for
microchip adc G1 Peripheral.

Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
2025-12-26 10:13:30 -06:00
Martin Hoff
e357c96d4a dt-bindings: adc: add new header file for Silabs SIWX91X ADC bindings
This patch introduces a new header file regarding ADC binding with
SiWx91x SoC. It allows a more friendly definition of ADC channel input.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-12-24 12:46:48 -05:00
Dat Nguyen Duy
377922dfcf drivers: add initial support for NXP S32K566
Initial support for NXP S32K566 M7 & R52: Clock,
Pin control, GPIO and Uart

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2025-12-23 15:18:17 +01:00
Chun-Chieh Li
50409c7385 drivers: clock_control: numaker: support get_rate/set_rate
This adds support for clock_control_get_rate/clock_control_set_rate
API, so that module clock rate can fetch or modify via them in Hz.
Note only CANFD support is added as an reference example and other
module support will be added as-needed.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-12-23 15:15:13 +01:00
Haoran Jiang
e5ce6869ff dt-bindings: pinctrl: sf32lb52: Generate pinctrl header file for sf32lb
Previously, the pinctrl macro definitions on the sf32lb platform relied on
manual maintenance, which led to some errors.
We will now use scripts to
generate the metadata, ensuring accuracy

Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
2025-12-23 15:13:56 +01:00
Benjamin Cabé
4f2ee86cd4 include: adc: add doxygen docs for lmp90xxx extended API
Adds doxygen documentation for the extended API of the LMP90xxx ADC
driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-12-23 09:33:06 +01:00
Benjamin Cabé
cecfb5b9a3 include: adc: add doxygen docs for current_sense_amplifier extended API
Adds doxygen documentation for the extended API of the current sense
amplifier driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-12-23 09:33:06 +01:00
Benjamin Cabé
3aec059e0a include: adc: add doxygen docs for current_sense_shunt extended API
Adds doxygen documentation for the extended API of the current sense
shunt driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-12-23 09:33:06 +01:00
Benjamin Cabé
327969d5ae include: adc: add doxygen docs for voltage_divider extended API
Adds doxygen documentation for the extended API of the voltage divider ADC
driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-12-23 09:33:06 +01:00
Benjamin Cabé
fb62a29b58 include: adc: add doxygen docs for ads131m02 extended API
Adds doxygen documentation for the extended API of the ADS131M02 ADC
driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-12-23 09:33:06 +01:00
Benjamin Cabé
3aa2651680 include: adc: add doxygen docs for ads1x4s0x extended API
Adds doxygen documentation for the extended API of the ADS1x4s0x ADC
driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-12-23 09:33:06 +01:00