Introduced a API to get the current I2C configuration.
Facilitates runtime inspection of I2C settings.
Useful for debugging and dynamic configuration changes.
Signed-off-by: Xiaolu Sun <xiaolu.sun@intel.com>
Add support for Omron D6F mass flow rate sensor series. The sensor series
outputs an analogue voltage which is read using an ADC.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Add flow rate to `enum sensor_channel` in litres per minute.
The SI unit for flow rate is cubic metres per second. Due to a sensor value
resolution of 1/100000 this unit is not granular enough for low flow rate
sensors.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
After running 'kernel reboot' cmd on coex application,
zephyr os clean bss section, IMU13 IRQ event data set as 0,
then CPU3 receive IMU13 IRQ from CPU1, need access IMU13 IRQ event,
cause hang.
Put enable IMU13 IRQ operation after related task and event created
to fix this issue.
Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
Use k_timepoint_t instead of k_timeout_t for absolute time to avoid
ambiguity and ensure the code works even when CONFIG_TIMEOUT_64BIT=n.
Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
Adds a skip-calibration property to the voltage divider sensor,
which can be enabled, in case the underlying ADC driver
does not support calibration.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
update the function name in driver since pllsai1m was changed
to pllsaim in clock_stm32_ll_common.h.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Do not queue new buffer after bus reset if there is one already queued.
This fixes memory leak on each bus reset if there are no SETUP transfers
received between resets.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Commit 2de30ff782
moved the driver ops from the config pointer to the API. As the config
pointer isn't used, set it to NULL and allow future updates to actually add
a configuration struct.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This macro doesn't accept a delay parameter anymore (well, it does, but
it's deprecated and will trigger build warnings). Just remove it from the
places that were still passing it.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Use the timing params from spi_config that are specific to the slave
instead of using the same timing for the controller for all slaves.
Remove these properties from the LPSPI DT binding.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Certain SPIM instances in nRF52/53/54L/54H Series provide hardware
control of the CSN (chip select) line. Although the standard SPI
drivers do not use this feature, it should be possible to configure
this line through pinctrl in case some special driver needs this.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
DT_PROP_OR instead of DT_INST_PROP_OR was used and property from
device tree was never used.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The conditions needed to declare `uart_ambiq_pm_action()` in
`uart_pl011_ambiq.h` and the conditions needed to use it in `uart_pl011.c`
differed, which would result in a warning promoted to error during
weekly CI runs.
Ensure that the conditions match to remove the warning / error.
```cpp
if defined(CONFIG_SOC_SERIES_APOLLO3X) || \
defined(CONFIG_SOC_SERIES_APOLLO5X)
```
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
- Since ti-hdc20xx is a sensor, it should use SENSOR_DEVICE_* macro for
definition.
- Allows it to work with sensor_shell properly.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Remove address-of operator ('&') when assigning `adc_xxx_init`
function pointer in `DEVICE_DT_INST_DEFINE` and `DEVICE_DT_DEFINE` macro.
This change aims to maintain consistency among the drivers in
`drivers/adc`, ensuring that all function pointer assignments
follow the same pattern.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Add XENMEM_acquire_resource wrapper to map device model related buffers.
This is required for communication with the ioreq server.
- memory
- xendom_acquire_resource:
HYPERVISOR_memory_op(XENMEM_acquire_resource)
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Replace `gnttab_get_page()`/`gnttab_put_pabes(addr)` with
`gnttab_get_pages(npages)`/`gnttab_put_pages(addr, npages)`
for supporting multi-page operation.
Note: This is a breaking change, update callers accordingly.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit introduces a new driver for WS2812 and compatible LED
strips that uses a UART peripheral.
The driver generates the precise, high-speed signal required by the
WS2812 protocol by encoding each data bit into a multi-bit "symbol"
and using a frame-aware packing strategy for transmission:
- Signal Inversion: The UART's TX line must be inverted (tx-invert)
to create the protocol's required idle-low signal. A UART start
bit then generates the initial high pulse of a WS2812 bit.
- Frame-Aware Packing: The driver reuses the UART's hardware-
generated start and stop bits as the first and last bits of the
on-wire symbol. The inner bits of the symbol are packed into the
UART data payload.
This packing scheme imposes a configuration constraint: the total
number of bits in a UART frame (1 start + N data + 1 stop) must be
an integer multiple of the symbol's length (bits-per-symbol).
Signed-off-by: Wai-Hong Tam <waihong@google.com>
ASAN reports error with native_sim after "gpio info <TAB>":
runtime error: index 1 out of bounds for type 'gpio_ctrl [1]'
So, although the dev pointer was not used, don't even read it
from out-of-bounds of gpio_list.
Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
This is a follow up to commit 4fe2c5bd5f.
The UDC_DWC2_USBHS_VBUS_READY_TIMEOUT Kconfig option should be available
also for nRF92 Series SoCs (as it was previously when it depended on
NRFS_HAS_VBUS_DETECTOR_SERVICE), otherwise some builds will fail for
such targets.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Otherwise we'd always return false in spite of the flag being set in
the encoded data, which may lead to the user not reading the underlying
data in an event-paced readout scheme.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Rework how the STM32 UDC driver determines the PHY used by a given instance
and the speed at which the instance is able to and allowed to operate.
The PHY determination now uses the 'phys' property instead of looking at
whether nodes with a specific compatible were enabled. Similarly, the speed
determination takes into account the 'maximum-speed' property, along with
the selected PHY's and the instance's capabilities.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Rework how the driver performs PWR configuration and initializes HS PHYs.
Originally, the initialization logic was split in half without any real
logic. There were also attempts to share some logic but this resulted in
code that was difficult to understand.
Initialize PWR and PHY in well separated steps, and use explicit series
and PHY type checks in each part to ensure the logic is easy to understand.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Rework the STM32 USB UDC driver to use HAL PCD macros for speed selection,
as should have always been done since that is the library used by the shim
driver. Also dummy definitions to ensure cross-series compatibility
without many #if blocks in the driver.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The driver supports high-speed capable controllers. Select
the appropriate Kconfig options to ensure that the stack does
not optimize away high-speed support.
Signed-off-by: Martin Gysel <me@bearsh.org>
Fix timer clock source initialization for MT8188, MT8186 platform.
Add 26Mhz define that is specific for MT818X.
Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
The stm32_i2c_master_mode_end function can be
replaced with a simple irq disable and giving to
the device sync semaphore
Signed-off-by: Erik Andersson <erian747@gmail.com>
stm32_i2c_msg_read and stm32_i2c_msg_write
for interrupt mode is replaced by a common
function: stm32_i2c_irq_xfer
Signed-off-by: Erik Andersson <erian747@gmail.com>
- Rework transaction flow to better match reference manual
and errata sheet for STM32 I2Cv2 peripheral
- Handle message transactions larger than 255 bytes in isr
- Combine stm32_i2c_msg_write and stm32_i2c_msg_read into
one common function stm32_i2c_irq_xfer when using interrupts
Signed-off-by: Erik Andersson <erian747@gmail.com>
To prepare for further patches and separation
of interrupt/DMA modes from polled, this commit
introduces two helpers for starting and stopping
DMA transfers
Finsishing DMA transfers are also moved from
interrupt handlers to thread after beeing wokenen
by semaphore
Signed-off-by: Erik Andersson <erian747@gmail.com>
During testing with teensy 4.0 it was discoverd that toggling
at high frequencies led to missed steps. As per the datasheets
of step-dir drivers an active edge needs to be maintained for
a certain timerperiod, for a step to be executed.
Instead of toggling pin twice instantaneously, the current fix
halves the step period and the step-pin is toggled on the timeout
of the respective timing source.
rework stepper stepper stop
set step pin to low if the driver does not support dual edge
and increment/decrement the actual position by one
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Refactor a bit the RX FIFO handling to prevent RX transfers performed
in Single IO mode from getting stuck when they are suspended due to
the empty TX FIFO and cannot be resumed because there is no further
interrupt in which the TX FIFO could be filled properly with dummy
bytes above its transfer start level.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Do not select CONFIG_SYS_MEM_BLOCKS when enabling the Atmel SAM0 USB device
controller driver as the implementation does not use the system memory
blocks allocator.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Clean up headers includes section:
- Remove conditional inclusions
- zephyr/, then susbystem/, standardlib, locals
- Sort alphabetically within these categories
- Remove the ones already available through _priv.h
Noticeable exception, lldp.h requires prior net_pkt.h inclusion
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Since phy init is not in this function anymore, it can be moved back
to driver initialization function.
While I'm at, harmonize v1/v2 flavors of the function.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
To be able to split code, some functions were removed their static
attribute, which opens the possibility of name conflict.
Rename them by adding eth_stm32_ prefix.
Additionally, review their sorting in the header file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>