If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set for them.
(This default behaviour is usefull for stdin/out/err so that new process
is kept connected to them, but it is very rare for it to be usefull for
any other descriptor)
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from using them (for example
if the child survives the parent but it does something else while keeping
a port open).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix the check in dwc2_unset_dedicated_fifo() that wrongly included the
current endpoint when testing for higher FIFOs. This caused false
warnings and early returns.
Use ~BIT_MASK(ep_idx + 1) to only test FIFOs above the current EP.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
virtio_pci_init_virtqueues was allocating more virtqueues than
specified by num_queues param if data->common_cfg->num_queues
was greater than num_queues
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Usage of stm32xxxx_ll_tim.c has been removed so we can also remove the
selection of USE_STM32_LL_TIM from the Kconfig.
Also remove the LL_RCC that plays no part in the driver.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Usage of stm32xxxx_ll_tim.c has been removed so we can also remove the
selection of USE_STM32_LL_TIM from the Kconfig.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Remove the calls to LL_RTC_Init, LL_RTC_DeInit and LL_RTC_ALMA_Init in
the RTC counter driver. This avoids calling functions from
stm32xxxx_ll_rtc.c.
They are replaced by a set of simpler functions from the header file.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Remove all function calls for functions that are defined in the
stm32xxxx_ll_rtc.c and replaces them by simpler calls from the header file.
Also remove the use of LL_RTC_AlarmTypeDef since no functions from the
header file uses it.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
The NRFX SAADC device driver needs to implement PM DEVICE for it
to work with power domains, which is required for some SoCs. Inline
PM device runtime "self get/put" pm has been implemented for the
normal sync read API.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Not motivated by any impacted functionality but rather following good
practices. Recursive inclusions may be confusing and hard to diagnose.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
This version is based on the CPU LPSPI driver, directly implementing
the submit call following the non-blocking asynchronous pattern.
This has been re-introduced after struggling to keep up with data
streaming applications, which demands reduced and controlled latency,
which for the default implementation (using RTIO workqueue) is not
guaranteed, due to being serviced by a thread-pool vs directly in the
ISR context.
This version includes limited feature-set, yet stress-tested:
- Required both rx-fifo and tx-fifo to be equal.
- 8-byte words supported only.
- SPI Controller-only supported (target mode not included).
- SPI_HOLD_ON_CS only supported with CS GPIOs.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
In the enum opamp_functional_mode becomes prefix
OPAMP_FUNCTIONAL_MODE_ to avoid clash with STM32 HAL macros
The suffix _MODE were removed to make the names shorter
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
This commit adds a new property in the device-tree bindings for swapping
the serial data input and output pins of the SPI/I2S peripheral for
STM32 microcontrollers that support it.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
Limit a transaction to a boundary of aligned addresses. Each PSRAM may
specify different configuration.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
Limit a transaction to a boundary of aligned addresses. Each PSRAM may
specify different configuration.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
This commit adds a new property in the device-tree bindings for swapping
the MISO and MOSI pins of the SPI/I2S peripheral for STM32 microcontrollers
that support it.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
Avoid incorrect (clock_control_subsys_t *) incorrect cast and
remove the cast of pclken in calls to the clock_control_
framework.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
STM32G4xx series shares several DMA configurations with
the other platforms. These changes aim to enable platform
specific DMA configuration and align them to other platforms.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
The driver did send some extra 0 bytes when the receive hasn't been
finished yet. This patch makes sure to avoid that.
Signed-off-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
At the moment, if you would pass a NULL buffer to the driver, the rx and
tx counts of that buffer would not advance. This patch fixes that.
Signed-off-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
The driver has ignored the first RX buffer. Most likely it has been
modeled for accesses to a SPI flash or similar where the first read data
is not relevant.
This commit makes sure that the driver can work as a universal SPI
master instead.
Signed-off-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
support gpio wake up function.
change init stage from POST_KERNEL to PRE_KERNEL_1
because uart wrap init need to use the gpio functions.
Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
Compilation fails if CONFIG_SDMMC_STM32_EMMC is set. This bugfix
adds #ifdef ... #endif pairs for unused static functions and
a call to stm32_sdmmc_card_detect_uninit().
Signed-off-by: Andreas Schweigstill <andreas@schweigstill.de>
Function stm32_dma_config_channel_function is unused hence remove it
from headers and dma_stm32_v1. In case of dma_stm32_v1, the related
configuration is already part of the LL_DMA_Init call done in
another place in dma_stm32.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The dma_stm32_slot_to_channel function is only applicable on the
STM32Fx series since the LL_DMA_CHANNEL_x macros only exist for those
platforms among the one based on st,stm32-dma-v1.
While checking for !defined(CONFIG_DMAMUX_STM32) is ok to enable this
on STM32Fx, it prevents to disable dmamux on other platforms since
required symbols do not exist.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
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>