PM_DEVICE_DT_INST_DEFINE() references dw_i3c_pm_action, but the
callback is named dw_i3c_pm_ctrl. The symbol does not exist anywhere
in the tree, so building with CONFIG_PM_DEVICE=y fails with
'dw_i3c_pm_action' undeclared. Reference the actual name at both
instantiation sites, snps,designware-i3c and microchip,xec-i3c.
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
adxl345_decoder_decode() routes on is_fifo at byte offset 0 to decide
whether to call adxl345_decode_stream(). adxl345_submit_fetch() passes
adxl345_read_sample() a raw RTIO mempool buffer, which is not zeroed,
and adxl345_read_sample() never sets is_fifo, so the flag is whatever
the previous user of that block left behind.
With CONFIG_ADXL345_STREAM=y, a one-shot sensor_read() can therefore be
misrouted into adxl345_decode_stream(), which reads a 12-byte struct
adxl345_fifo_data header out of a buffer sized for the 10-byte struct
adxl345_sample and then iterates on an out-of-bounds fifo_byte_count.
Clear is_fifo explicitly, as adxl362, adxl367 and adxl372 already do.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Added pm_action suspend/resume/turn_on routine for Counter
Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
Update comments, log messages, Kconfig prose, and driver-local
identifiers to use the controller/target terminology ratified by
coding guideline A.2 and already used by the Zephyr I2C API.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
intc_system_apic.c is not an interrupt controller driver: it is the
x86 platform glue that implements arch_irq_enable(),
arch_irq_disable() and the vector programming hook by dispatching
between the IOAPIC and LOAPIC drivers, which expose their own APIs.
Interrupt controller drivers should only expose their own namespaced
API, so move the file to arch/x86/core where the glue belongs,
unchanged apart from a comment stating its role.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The streaming decoder divided the raw temperature code by a rounded,
decoder-local 15 LSB/degC before applying the q31 scale, quantising the
result to whole degrees and disagreeing with adxl362_temp_convert().
Scale with the shared ADXL362_TEMP_MC_PER_LSB first and divide last, so
both paths report the same 0.065 degC resolution.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
adxl362_process_fifo_samples_cb() never set the accel_odr field of the
FIFO header, leaving it with stale RTIO pool contents that the decoder
uses to index accel_period_ns[], yielding wrong sample periods or an
out-of-bounds table read. Set it from the cached output data rate.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
Without CONFIG_PM the Wi-Fi SLP IRAM optimization path calls
esp_wifi_internal_update_modem_sleep_default_params(), which is
only provided by the Wi-Fi blobs. Builds on Wi-Fi 6 SoCs with
CONFIG_BUILD_ONLY_NO_BLOBS=y fail to link, so keep the option
default off there until a stub is available.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Neither the link initialization nor the values programmed for a stream are
visible at runtime, which makes any mismatch between the host, the gateway
configuration and the link hard to narrow down.
Log both at debug level.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The link initialization - programming the target BDF and aligning the UAOL
frame counter to the xHCI micro-frame counter - runs only once, guarded by
is_initialized, but the flag is never cleared. The link power domain
retains neither of the two, so on the first runtime PM cycle both are lost
while the driver still believes the link is initialized.
The link then runs with a frame counter that no longer matches the xHCI
one, placing the isochronous data in the wrong micro-frame. The device
receives or produces nothing and no error is reported anywhere.
Clear the flag when the link is powered down, so that the next config()
initializes the link again.
Fixes: b50fcbd6ee ("drivers: uaol: add a driver for Intel UAOL IP")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The RTIO submit path forces a single measurement via CNTL2 but never
updated the cached mode, so after the device automatically returned to
power-down the blocking fetch path skipped its CNTL2 write and failed
with -EBUSY forever. Update the cached mode to power-down accordingly.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
The wake-up threshold was only validated against full scale, but WK_THS
is a 6-bit field, so thresholds just below full scale computed a register
value of 64 that the HAL masked down to an almost-zero threshold. Clamp
the computed value to 63 LSBs instead.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
LIS2DW12_ODR_TO_REG() had no encoding for the power off state, so a
cached ODR of 0 was mapped to 1.6 Hz and PM_DEVICE_ACTION_RESUME
restarted conversions on a sensor configured with odr = <0>. Add an OFF
arm to the macro and keep the cached ODR in sync when a runtime power
off succeeds.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
The ODR map was copied from the LSM6DSO driver and listed 1.66/3.33/
6.66 kHz, but the IIS2ICLX ODR_XL field only encodes 0..7 (up to
833 Hz), so requesting a higher rate programmed a reserved code and
reported success. Truncate the map so such requests return -EINVAL.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
iis2iclx_channel_get() accepted SENSOR_CHAN_ACCEL_Z on this 2-axis
part and discarded the -ENOTSUP returned by its helpers, so callers
got success with an untouched sensor_value. Drop the Z case, return
the helper status, and fill the third slot of ACCEL_XYZ with zero.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
iis2iclx_lps22hh_conf() passed an undeclared identifier 'data' to
iis2iclx_lps22hh_odr_set(), breaking any build with
CONFIG_IIS2ICLX_EXT_LPS22HH enabled. Pass the function's 'dev'
parameter instead, matching the callee signature and the sibling
ST sensor-hub drivers.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
Report the station IPv4 address to the Wi-Fi stack from the interface
address events, and from the station connect handler for an address
configured before the association, so that a static address and a DHCP
lease behave the same.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Enabling the rp1 pinctrl also requires the bcm2712 pinctrl,
so add a minimal stub.
This does not perform any processing, but preserves the register
settings at reset.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
The drdy work loop only exited once every STATUS_REG data-ready bit
was clear, but those bits are only cleared by a registered handler
fetching the corresponding output registers, so an enabled source
without a handler spun the loop forever. Exit as soon as no pending
source has a registered handler.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
Fold the SENSOR_G/SENSOR_PI micro-unit divisor into a per-buffer scale
computed once in bmi270_decoder_decode(), instead of recomputing it on
every frame and dividing again per axis. decode_accel_frame() and
decode_gyro_frame() now convert each axis with a single multiply.
Also group the plain field/macro assignments in bmi270_decoder_decode()
separately from the ones requiring a function call, for readability.
Signed-off-by: Bartosz Meus <bartosz.meus@nordicsemi.no>
(cherry picked from commit bd1806ba4ed023fd961f76865be5a9853e29ddf4)
Guard #if CONFIG_BMI270_BUS_SPI/I2C checks with defined(), since the
bare macro form silently evaluates false when the bus is unselected.
Mask the register address in bmi270_spi_prep_reg_write_async() before
using it in the SQE.
Gate the one-time FIFO config/INT-map/flush setup in
bmi270_submit_stream() behind a fifo_configured flag so it does not
re-run every RTIO_SQE_MULTISHOT cycle, but keep the GPIO interrupt
re-arm unconditional since bmi270_try_submit_fifo_irq() disables it on
every IRQ. Also make the FIFO poll fallback always reschedule itself,
since returning early while streaming_sqe is momentarily NULL used to
stop it permanently.
Signed-off-by: Bartosz Meus <bartosz.meus@nordicsemi.no>
(cherry picked from commit a817f78137a160f65f213e006b5b5d618eaad89a)
Rework the RTIO data path to use fully asynchronous execution with
SQE chaining, removing the dependency on the work queue.
This simplifies the flow and aligns the implementation with RTIO
design expectations by:
Executing transactions directly via SQEs
Eliminating intermediate work queue handling
Improving consistency of async behavior
FIFO handling is updated to support streaming use cases, with
draining performed via an MPSC lock-free queue to ensure safe
handoff between ISR and processing context.
Note: Stream behavior, FIFO handling, and drain logic using the
MPSC queue require further validation under concurrent and
high-throughput scenarios.
The new approach reduces latency and avoids context switching
overhead introduced by the previous work queue based model.
Signed-off-by: Sudarshan Iyengar <sudarshan.iyengar@alifsemi.com>
Signed-off-by: Bartosz Meus <bartosz.meus@nordicsemi.no>
Assisted-by: OpenAI:codex-5.5
Add sensor_stream()/RTIO support so the BMI270 collects
accelerometer and gyroscope samples in its hardware FIFO and
raises an interrupt only at the watermark threshold. The host
SoC stays in sleep between batches instead of waking per sample,
reducing power consumption proportionally to the batch size.
Implementation adds three new files:
- bmi270_stream.c: FIFO configuration, watermark/full trigger
mapping, INT pin management, and optional poll fallback
- bmi270_decoder.c/h: sensor_decoder_api converting raw FIFO
batches (header and headerless modes) to Q31
Trigger handling in bmi270_trigger.c is extended to route FIFO
interrupts to a dedicated work queue with permanent-latched mode
for reliable GPIO edge detection.
New Kconfig options control streaming (BMI270_STREAM), FIFO mode
(BMI270_FIFO_HEADERLESS), watermark depth, INT pin routing
(BMI270_FIFO_ON_INT2), poll fallback, and buffer sizing.
Additional Kconfig BMI270_LOW_POWER_MODE forces power-optimized
filter at all ODRs, trading noise for lower current draw.
Also fixed in existing code:
- BMI270_CMD_FIFO_FLUSH typo.
- write_config_file() return type narrowed to int8_t; now int.
- Init path lacked LOG_ERR on most failure branches.
Signed-off-by: Bartosz Meus <bartosz.meus@nordicsemi.no>
Add RCC driver for the STM32WL3x series with CLK_SYS
sources (HSI, RC64MPLL PLL and HSE), peripheral clock gates
and the reset controller, together with the st,stm32wl3-rcc binding.
Signed-off-by: Anders Frandsen <anfran@anfran.dk>
The if/elseif block that selects the per-series clock control source
file sits inside if(CONFIG_CLOCK_CONTROL_STM32_CUBE) but was never
indented, so the CMakeStyle compliance check fails.
Re-indent the block to 2 spaces per level. No functional change.
Signed-off-by: Anders Frandsen <anfran@anfran.dk>
This commit updates the usage of ring_buf to utilize the new
put_ptr/commit/get_ptr/consume pattern instead of the traditional
claim/finish approach. This change is part of a larger refactor aimed at
streamlining the ring_buf API and improving its efficiency.
Signed-off-by: Måns Ansgariusson <mansgariusson@gmail.com>
Add an EEPROM child driver for the Micro Crystal RV-3028 RTC.
The driver provides EEPROM read and write access through the
RV3028 MFD parent driver.
Signed-off-by: Janez Ugovsek <janez@ugovsek.info>
Add a bitmap to track which gpioint values are already assigned
to a tint, and reject connect requests that would either remap an
already-assigned tint or reuse a gpioint that's already in use.
Initialize data->gpioint to 0xFF (unassigned) at device init so the
new checks work correctly on first connect.
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Only RZ/V2H supports both GIC interrupt types level/edge for TINT, while
other RZ series keep GIC interrupt type unchanged regardless of TINT
trigger type.
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Fix intc_rz_tint_clear_irq_status() to only clear the TINT status
flag when it is actually set, since writing to it otherwise has no
effect per the register spec.
Add explanatory comments describing the V2H/V2N vs other SoC register
differences and the interrupt-setting precautions from the user's
manual.
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Introduce a spinlock to protect the shared TSCR/TITSR/TSSR registers
in intc_rz_tint_set_type() and intc_rz_tint_connect(), which can be
called concurrently from different tint instances.
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Deactive tx checksum offloading on the
esp32, while it has a big enough fifo,
the tx checksum is not correctly calculated
on every second packet.
Signed-off-by: Fin Maaß <info@finmaass.de>
Add support for configuring ERFO in/out capacitance
through device tree on MAX32657.
Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Anu Biradar <anu.biradar@analog.com>
Add RTIO (Real-Time I/O) asynchronous API support to the ENS210
temperature and humidity sensor driver, covering both single-shot
and continuous measurement modes.
- Add ens210_rtio.c with RTIO submit handler and completion callbacks
- Add single-shot async flow using k_work_delayable for conversion delay
- Add continuous mode async flow with direct RTIO chaining
- Add sensor decoder API for frame decoding (temperature/humidity)
- Integrate MPSC lock-free queue for I/O scheduling
- Define RTIO context and I2C IO device per driver instance
- Update Kconfig to select RTIO-related options when async API is enabled
Signed-off-by: Sudarshan Iyengar <sudarshan.iyengar@alifsemi.com>
Assisted-by: Claude:claude-opus-4.7
i2c_dw_probe_hw() still stores the MMIO base returned by
DEVICE_MMIO_GET() in a uint32_t, truncating addresses above 4 GiB on
64-bit systems. Use mm_reg_t for the remaining MMIO base address.
Signed-off-by: Liwen Wu <liwen.wu@spacemit.com>
The GPU2D driver initializes during POST_KERNEL
and emits an INFO log message for successful initialization
that interferes with logging tests that expect an empty queue.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
Add a register-level BMI323 emulator for I2C and SPI. Model word
transactions, bus-specific dummy bytes, power-on defaults, invalid
sample markers, and soft reset.
Expose raw accelerometer, gyroscope, and temperature setters. Add
native_sim coverage for initialization, attributes, invalid samples,
and converted sensor data on both buses.
Assisted-by: Codex:GPT-5
Signed-off-by: Chaogui Deng <dengchaogui1@gmail.com>
Fix CONFIG_ADC_HAS_SEQUENCE_PRIORITY select by CONFIG_ADC_STM32.
Since st,adc-has-injected-support DT property is of boolean type, use of
dt_compat_any_has_prop(..., st,adc-has-injected-support) always returns
true. Set function argument value to True to get the expected behavior.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
bt_hci_stm32wba_send() calls BleStack_Request() while holding hci_sem.
If the controller indicates an event from within that call, the
resulting BLECB_Indication() takes the same semaphore from the same
thread and blocks forever, since a semaphore has no notion of an owner.
Use a mutex instead, which the owning thread is allowed to lock
recursively.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The accelerometer scale factor was derived mechanically as
full-scale * g, assuming a sensitivity of FS/32767 for every range.
That holds for 2/4/8g but not for 16g, whose datasheet sensitivity is
0.732 mg/LSB, causing readings ~1.5x too small in that mode.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
lis2du12_enable_delta_int() called lis2du12_interrupt_mode_set() for
the read step of a read-modify-write, pushing an uninitialised struct
into the INTERRUPT_CFG and CTRL1 registers and randomly corrupting
interrupt polarity and latching. Use lis2du12_interrupt_mode_get()
instead.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
On SoCs that route the DesignWare GPIO signals through a pin
controller, the pins must be muxed to their GPIO function before
the controller can drive them. Add an optional "default" pinctrl
state to the binding and apply it during initialization. Everything
is conditional on at least one enabled instance having a pinctrl-0
property, so existing users that do not describe pin muxing are
unaffected.
Signed-off-by: Aravind Krishnan <aravind.krishnan@alifsemi.com>
Signed-off-by: Silesh C V <silesh@alifsemi.com>
adxl345_init() programmed the devicetree ODR but never stored it in
the driver data, so the cached value stayed 0 and the streaming header
carried an invalid rate index. The decoder then derived a zero sample
period, collapsing every timestamp in a FIFO batch to the same instant.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
The one-shot fetch path filled a recycled RTIO buffer without ever
initializing struct adxl345_sample::is_fifo, so a stale bit left by a
previous streaming transaction made the decoder take the FIFO path and
misread the sample. Clear the flag before reading the sample, matching
the other ADI accelerometer drivers.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5