HAL_PCD_ISOOUTIncompleteCallback() and HAL_PCD_ISOINIncompleteCallback()
sat below HAL_PCD_DataOutStageCallback(), but the file only keeps the
Setup/DataIn/DataOut callbacks next to their worker-thread handlers.
Move them up with the other HAL callbacks. No functional change.
Assisted-by: Claude:opus-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The SAM0 USB device controller never enabled the SOF interrupt, so
UAC2 SOF callbacks never ran and audio capture stayed silent. Round
PCKSIZE.SIZE up to the next supported hardware value so isochronous
MPS such as 192 bytes (48 kHz 16-bit stereo) can be programmed.
Assisted-by: Cursor:grok-4.6
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The PM policy lock was tracked by a single controller-wide flag, so when
two channel pairs ran memory-to-memory transfers at the same time, the
first one to finish released the lock while the other was still
streaming and the SoC could enter light sleep mid-transfer.
Track the lock with the per-pair flag that already exists, renamed to
pm_lock_held since it now only tells whether the pair holds the lock,
and let the PM subsystem count the nested requests, since its policy
locks are already reference counted. Taking the flag in the same helper
that takes the lock also prevents dma_esp32_start() from acquiring it
twice when both channels of a pair are started, and keeps the
test-and-clear atomic against a concurrent dma_esp32_stop() and RX EOF
interrupt.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Add a driver for the Plantower PMSA003I laser particulate matter sensor.
The sensor exposes PM1.0/PM2.5/PM10 mass concentrations (both CF=1
standard particle and atmospheric environment) and 0.3/0.5/1.0/2.5/5.0/10
um particle counts over I2C, read as a 32-byte fixed frame from register
0x00 with a start-byte, frame-length and checksum validation.
The optional reset and set pins are internally pulled up on the sensor,
so they are handled only when wired in the devicetree.
Signed-off-by: JaeHwan Jin <jaehwan.jin@rakwireless.com>
Group the Plantower PMS7003 driver under a dedicated plantower/ vendor
directory, matching the per-vendor layout used elsewhere in
drivers/sensor. No functional change.
Signed-off-by: JaeHwan Jin <jaehwan.jin@rakwireless.com>
- Add support for Zephyr I2C target API, which allows device to act as
I2C slave device.
- Tested using greybus-i2c transport [0].
[0]: https://github.com/beagleboard/greybus-zephyr/pull/95
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Like the other ethernet drivers, enable NVMEM by default when a MAC
node reads its address from an NVMEM cell, so the board only has to
enable the provider of the cell.
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Some options from mcux_edma driver were enabled when other unrelated
drivers were enabled. Add a conditional to prevent that.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some options from xilinx driver were enabled when other unrelated
drivers were enabled. Add a conditional to prevent that.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Today, only UART4 is implemented in this driver.
Modify it to also support other instances of U(S)ART present on
STM32MP13 SoC.
Signed-off-by: Erwan SZYMANSKI <erwan.szymanski@st.com>
Rename the ESP32_SOC_* capability symbols to SOC_ESP32_* so
that symbols defined under the soc folder follow the Zephyr
Kconfig naming policy. Update all references in the common
soc code and in the counter and bluetooth drivers.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
mbedtls_cbc() and mbedtls_aead() returned directly from every failure
after psa_cipher_*_setup()/psa_aead_*_setup() had succeeded. A PSA
multipart operation that fails enters an error state and has to be
aborted to release what setup reserved, which for these two includes the
key slot the operation holds. Leaking a key slot per failed operation
eventually exhausts them.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
mbedtls_hash_session_free() returned early when psa_hash_abort() failed,
skipping mbedtls_free_session(). The slot stayed marked in_use for the
rest of the boot, so a driver that keeps failing to abort permanently
consumes CRYPTO_MBEDTLS_SHIM_MAX_SESSION slots and later sessions get
-ENOSPC.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
mbedtls_ecb() stored out_len into pkt->out_len before testing the PSA
status. psa_cipher_encrypt() and psa_cipher_decrypt() only guarantee
that the output length is written on success, so a failing call left the
uninitialized local exposed to the caller as an output length.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
mbedtls_sessions and mbedtls_cbc were the only two definitions in the
shim without static, exporting a generic `mbedtls_`-prefixed array and
function from a translation unit that is linked alongside Mbed TLS
itself. Everything else in the file, mbedtls_ecb() and mbedtls_aead()
included, is already static.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
STM32WL33 LL driver do not implement a 96-bit UID, matching
the behavior of STM32WB0 devices. Although LL_GetUID_WordN()
is present, it exposes the 64-bit UID and does not provide a
third UID word.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
The macro IS_TIM_32B_COUNTER_INSTANCE doesn't exist on STM32L0 and WB0.
These series don't have any 32 bits counter.
Add an ifdef to make the driver compatible with these series.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
In net_stack_buffer_alloc_rx(), the first fragment reserves headroom
with net_buf_pull(offset), but alloc_len is decremented by p->len only,
omitting the pulled offset. alloc_len stays larger than the space left,
so a multi-fragment packet gets over-filled and its buffer ends up
longer than requested, corrupting the SDIO scatter-gather RX path.
Decrement alloc_len by p->size, the full space this fragment consumes,
so the accounting stays correct regardless of the reserved headroom.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
drivers/bbram/CMakeLists.txt never passed include/zephyr/drivers/bbram.h
to zephyr_syscall_header(), so the six bbram syscalls were parsed but not
emitted and no marshaller was generated for the verifiers in
bbram_handlers.c to include.
Add the registration so the verifiers are actually built and the syscall
IDs land inside the dispatch table.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5
Replace direct NVIC pending-state calls with k_irq_set_pending()/
k_irq_is_pending()/k_irq_clear_pending(), dropping the dependency on
cmsis_core.h where nothing else needed it.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Added pm_action suspend/resume/turn_on routine for DMIC
Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
Add support for the comparator peripheral found in WCH CH5xx SoCs.
This commit also extends the comparator API with a child API to allow
dynamic configuration of the negative reference voltage. This feature
is intended to enable software-based ADC implementations using the
comparator peripheral.
Signed-off-by: Elie Carrot <elie.carrot@smile.fr>
Implements MMCM programming via the AXI register interface to provide a
configurable SPI reference clock for high-speed ADC capture. The core is
exposed through the standard Zephyr clock_control API.
CONFIG_CLOCK_CONTROL_ADI_AXI_CLKGEN is auto-selected when
DT_HAS_ADI_AXI_CLKGEN_ENABLED.
Signed-off-by: Iustin Stolniceanu <iustin.stolniceanu@analog.com>
The isw-gpios property was unconditionally required by
GPIO_DT_SPEC_INST_GET(), even though the devicetree binding documents
it as optional. This forced every board to reserve an INT/SQW GPIO
even when only basic time get/set was needed, e.g. when the pin is
intentionally left unconnected in low-power designs that rely on the
MCU's own timer for wake-up.
Switch to GPIO_DT_SPEC_INST_GET_OR() so the property is truly
optional, and compile out the ISW interrupt handling and the
alarm/update callback registration built on top of it entirely when no
maxim,ds3231-rtc instance in the build wires up isw-gpios, instead of
only gating them behind a runtime NULL check.
Add DS3231_ALARM_CB_REQUIRED, DS3231_UPDATE_CB_REQUIRED, and
DS3231_ISW_ISR_REQUIRED, derived from CONFIG_RTC_ALARM/CONFIG_RTC_UPDATE
and DT_ANY_INST_HAS_PROP_STATUS_OKAY(isw_gpios). Use these to drop
rtc_ds3231_alarm_set_callback(), rtc_ds3231_update_set_callback(),
rtc_ds3231_init_isw(), the ISR/work-queue handler, and their backing
struct fields entirely when unreachable, and to omit the matching
driver_api entries so the existing NULL-check wrappers in rtc.h return
-ENOSYS instead of a runtime -ENOTSUP.
Basic get_time()/set_time() are unaffected, since they only perform
I2C register access.
Fixeszephyrproject-rtos/zephyr#114886
Signed-off-by: Sachin Pathave <spathave2010@gmail.com>
temp sense is enabled by default but some boards skip this feature
and use a 100Ohm resistor from the TS pin to ground.
In these situations the TS disable bit needs to be set otherwise
the charger will fault.
Signed-off-by: Sahaj Sarup <sahajsarup@gmail.com>
Propagate LOG_INST_ERR_DEVICE_NOT_READY() updates to
Cirrus Logic init functions for device checks. Also cleans
up some minor logic issues and unifies the init
implementation across CS40L26/27 and CS40L5x drivers.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
The interrupt mask register uses active-low polarity: a bit value of 0
enables the interrupt on the corresponding pin, while 1 masks it
(per PCAL9539A datasheet section 6.2.10).
The standard interrupt configure function was computing:
int_mask = int_fall | int_rise;
This set bits to 1 for every interrupt-enabled pin, which masked all
interrupts rather than enabling them. Fixed by computing the input latch
first, then deriving the mask by inversion:
input_latch = int_fall | int_rise;
int_mask = ~input_latch;
Signed-off-by: Christoph Baechler <cbaechler@gmail.com>
The driver C source incorrectly references the new devicetree
property "scl-sda-low-timeout" by the symbol "scl_sda_low_timeout_ms".
Drop the trailing "_ms" so the property value is correctly used by the
driver.
Tested on an it82002aw evaluation board.
Signed-off-by: Keith Short <keithshort@google.com>
Three correctness fixes for the Infineon SDHC driver:
- WAIT_FOR() takes a total timeout in microseconds, not a loop count.
sdhc_host_poll_transfer_complete(), sdhc_poll_buf_read_ready() and the
buffer-read-enable poll passed the raw retry count (1000 -> 1 ms), so
slower cards timed out during the non-DMA PIO reads used by CMD6
(SWITCH_FUNC) and ACMD51 (SEND_SCR), producing "Buffer read is not
ready" and ACMD51 timeouts. Pass retries * per-iteration delay, matching
sdhc_poll_cmd_complete(). Also drop the duplicate IFX_SDHC_RETRY_TIMES
macro in favour of IFX_SDHC_RETRY_TIME.
- Add a clock-settle delay in sdhc_change_clock() after re-enabling the SD
clock: 2000 us for the 400 kHz identification clock (cold bring-up) and
500 us for later speed changes. Fixes intermittent cold-start CMD8
failures where commands were issued before the divider settled.
- Restrict sdhc_infineon_card_busy() to the DAT[3:0] line level. The
DAT_LINE_ACTIVE / CMD_INHIBIT_DAT present-state bits reflect host-side
transfer activity and caused false-positive "busy" reporting, which
breaks the CMD11 voltage-switch checks in the SD subsystem.
Signed-off-by: Kevin Chan <kevin.chan3@infineon.com>
Expose the firmware version obtained during ESP-Hosted initialization
through the Wi-Fi management version API.
Signed-off-by: Daniele Cloralio <d.cloralio@arduino.cc>
The shub humidity converters stored the whole relative humidity scaled
by 1e6 in val2 instead of only the fractional part, so consumers using
val1 + val2/1000000 saw roughly double the actual reading. Use
sensor_value_from_float() to split the value correctly.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
The drain loop exited only once every STATUS_REG data-ready bit was
clear, but those bits are cleared as a side effect of a registered
handler reading the output registers, so a source with no handler (e.g.
temperature) spun the loop forever. Qualify the exit condition by
handler presence and cap the number of iterations in both variants.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
lsm6dso_enable_tilt_int() assigned only the tilt bit of an
uninitialised lsm6dso_emb_sens_t, and lsm6dso_embedded_sens_set()
writes all six bits into EMB_FUNC_EN_A/B, so stack residue could
enable the pedometer, significant motion or FSM engines. Read the
current state first and modify only the tilt bit.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
Full-scale for Vout and bEMF on CS40L26/27 is 12.3 V, not
24 V. Update full-scale for CS40L26/27 to be a struct
sensor_value and change scale to multiply.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
nxp_wifi_cpu_reset() previously required both sd-gpios and pwr-gpios to
be present in devicetree before any reset logic ran, silently making
the function a no-op on boards that only wire sd-gpios (e.g. an SDIO
module using its reset line as WL_EN with no separate power-enable
GPIO). Make pwr-gpios independently optional so sd-gpios alone is
sufficient to drive reset.
Also fix the enable path: reset was previously asserted and left
asserted while pwr-gpios was raised, with no release step, so the
module never actually came out of reset before communication started.
Explicitly release sdio_reset after the assert delay, before waiting
out the release hold time.
Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
Some USDHC instances are permanently wired to a non-removable device,
such as an SDIO Wi-Fi module, with no card-detect GPIO or host
card-detect line available. Previously this relied on falling through
to the "no card detection method configured" warning path and assuming
the card was present. Add an explicit non-removable boolean property so
boards can declare this intent directly; when set, the driver reports
the card as always present and skips card detection.
Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
Add ARM SCMI Reset shell interface for demonstration and testing
purposes, defined as a sub-command of the *scmi* command.
The ARM SCMI Reset shell interface defined as following:
uart:~$ scmi reset
reset - Reset proto commands
Subcommands:
version : get protocol version
Usage: version
num-domains : get total number of reset domains
Usage: num-domains
summary : get summary for all reset domains
Usage: summary
info : show domain info
Usage: info <domain_id>
assert : domain assert
Usage: assert <domain_id>
deassert : domain de-assert
Usage: deassert <domain_id>
autoreset : domain Autonomous reset
Usage: autoreset <domain_id>
Add the file `shell/reset.c` and update the `CMakeLists.txt` to include
support for building the reset domain shell commands when
CONFIG_ARM_SCMI_RESET_HELPERS is enabled.
Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
Added kconfig option to disable onoff manager,
in order to limit code size for LFCLK only applications.
Signed-off-by: Michal Frankiewicz <michal.frankiewicz@nordicsemi.no>
Made HFCLK, LFCLK, HFCLK192M, HFCLKAUDIO, XO, XO24M Kconfigs
not selectable by user.
Signed-off-by: Michal Frankiewicz <michal.frankiewicz@nordicsemi.no>
The Multi-function Digital Filter (MDF) is dedicated to the connection of
external Σ∆ modulators. It is mainly targeted for the following
applications:
* audio capture signals
* motor control
* metering
The MDF features:
* 6 serial digital inputs:
– SPI interface
– Manchester coded interface
– PDM interface
* 2 common clocks input/output
* Flexible connection between filters and digital inputs
* 6 flexible digital filter paths, with:
– configurable CIC filter
– reshape filter
– high-pass filter
– An offset error cancellation
– Gain control
* Short-circuit detector
* Clock absence detector
* 16 or 24-bit signed output format
* Independant delay for each bitstream
* DMA read access
* Interrupt services
Signed-off-by: Raphaël Gallais-Pou <raphael.gallais-pou@foss.st.com>
in several subsystems, Kconfigs are ordered by vendors. In audio
subsystem, the border is more blurry on how it is handled.
Prepare the arrival of a new driver by factorizing common properties and
files.
Signed-off-by: Raphaël Gallais-Pou <raphael.gallais-pou@foss.st.com>
The print about the configuration of UAOL carries important information
for debugging and it should be visible above debug level.
Split up the prints and also output the final configuration of the pcmsctl
register in detail.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
According to the API, len is the length of the transmission buffer.
All DSI hosts respect this, except the ST one, which reads len + 1
bytes: short writes take an extra byte from after the buffer, and long
writes pass len as NbParams while passing the first buffer byte
separately as Param1, so the packet carries one byte too many. Either
way the driver reads past the end of the caller's buffer.
Align the ST driver with the API and the other hosts, and send exactly
the bytes the caller provided.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.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.
Identifiers mirroring the Renesas RX driver package
(e.g. R_RIIC_MasterSend, R_RIIC_MasterReceive, riic_info_t.p_slv_adr)
are kept unchanged.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
z_vrfy_i3c_transfer() validated target->bus with K_SYSCALL_OBJ but then
passed the caller's live descriptor on, and the implementation reloads
target->bus and dispatches through it, so the value that was checked is
not necessarily the value that gets used.
Copy the descriptor into a local with k_usermode_from_copy(), validate
the bus in that copy and pass the copy down. The copy suffices because
the i3c_xfers implementations only read scalar fields out of the
descriptor.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5