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>
Split V1 and V2 code from the common file of STM32 ethernet
driver.
Whenever it is possible, make use of v1 or v2 version of functions
that are call from the common file in order to maximize factorization.
Review definitions to put them where they are used.
Review header inclusions to minimize them.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
In an effort to make stm32 eth driver files easier to read and maintain,
split the ptp code in a dedicated file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This reverts commit 678e226045.
This commit was part of PR 94142 which has been merged
while a discussion was still on going on the right direction
between splitting V1 and V2 or keeping a common file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This reverts commit 29750ac05d.
This commit was part of PR 94142 which has been merged
while a discussion was still on going on the right direction
between splitting V1 and V2 or keeping a common file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Commit bc8d66d538931e650dd2855fabe768720dcb4b02 introduced a
result argument to some RTIO callback handlers. Update for the IIS3DWB
sensor.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
flushing rx pending already happens in
uart_litex_fifo_read, which should be called
by the callback, so don't do it again, also
it can lead to the drop of chars, as flushing
removes the current entry in the fifo.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Process all in one callback, in order to reduce latency.
The following changes have been done:
- Process FIFO read-out and/or Data-ready in GPIO callback.
- FIFO Full is handled on completion if needed.
- Omit fifo-count fetching, to optimize cycles. The watermark
count is the number of samples we're going for.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
By introducing three states: Off -> On -> Busy -> (Offf)
This allows us to more clearly guard on-going events and detect
overlapping triggers.
Signed-off-by: Luis Ubieda <luisf@croxel.com>