Use hardware clock frequency to calculate watchdog expire ticks
instead of kernel's "ticks".
Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
Enabling `CONFIG_INPUT_FT5336_INTERRUPT` if the ft5336 node in DT
has `int-gpios` property.
As a result of this change, some boards can eliminate lines that
explicitly configure `CONFIG_INPUT_FT5336_INTERRUPT`.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
The SAM0 ADC has an internal register to divide the accumulated results
of oversampling the ADC by the amount of samples collected. This value
has to be set by the driver and was missing.
Signed-off-by: Patrick Günzel <patrick.guenzel@kinexon.com>
The commit 2c3165d187 ("drivers: spi: add opaque type to encode SPI
operation flags") introduces new type for operation flag, since it is
16/32-bit depending on CONFIG_SPI_EXTENDED_MODES.
Use the new type for safe, if the function 'spi_stm32_shift_frames' may
use extended operation flag later.
Signed-off-by: Haiyue Wang <haiyuewa@163.com>
Move all initialisation of the data struct to the init function to avoid
creating the very large `struct sd_card` in `.bss`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
In the dma loop_transfer test (test_loop_repeated_start_stop()), the
order of calls is dma_config() -> dma_stop() -> dma_start(). This
currently does not work on xmc4xxx because after calling dma_stop(), the
dma would be in a suspended state. Fix this by leaving the suspended state
before exiting dma_stop().
Also don't clear the context (dma_channel->dlr_line and dma_channel->cb)
that was setup by dma_config().
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
When quering the DMA status we need to return the number of pending bytes
left in the transfer. Currently this is inferred by calling
XMC_DMA_CH_GetTransferredData(). However, this function actually returns
the number of items read from the source peripheral (via CTL.BLOCK_TS).
It doesn't guarantee that the last item was fully transferred to the
destination.
When using the ADDR_ADJ_INCREMENT/DECREMENT options it is better to use
DAR register to infer the number of transferred bytes. This points to the
memory address where the next data will be written. It only increments
after the ongoing transfer from source to destination is completed.
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Some ADCs (e.g. SAM0) can only convert one channel at a time
and therefore need to be reconfigured for every voltage
divider prior to startin the conversion
Signed-off-by: Patrick Günzel <patrick.guenzel@kinexon.com>
end frame is used to supply clock pulses so that data goes to last
LED in the chain. Thus, it depends on the number of LEDs in the chain.
Previously, the number of ones sent into the end frame was
hard-coded and limited the usage of the driver to 64 LEDs in the
strip.
Signed-off-by: Cyril Fougeray <cyril.fougeray@toolsforhumanity.com>
Move the SAM V71 register name fixup from the SoC code into the PWM driver
next to the other PWM driver fixup.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit adds support for the STM32WB0 series to
the existing STM32 timer-based counters driver.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
The Atmel SAM0 SoC enable peripherals clocks in distinct places: PM and
MCLK. The old devices had defined the peripheral clock enable bit at PM.
On the newer devices this was extracted on a dedicated memory section
called Master Clock (MCLK). This change excludes the dedicated bindings
in favor of a generic approach that cover all cases.
Now the clocks properties is complemented by the atmel,assigned-clocks
property. It gives the liberty to user to customize the clock source
from a generic clock or configure the direct connections.
All peripherals drivers were reworked with the newer solution.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add new SENSOR_CHAN_FREQUENCY constant to allow implement sensors that
output frequency values in Hertz.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Add support for the I2C_MSG_RESTART flag to be able to use a
repeated start in between chained transactions.
The driver now uses the stop/restart flags set in the i2c_msg,
instead of starting and stopping for each transaction in the chain.
Signed-off-by: Lorenz Clijnen <github@lorc.be>
update gpio driver to adapt rt7xx gpio model:
1. There is no PORT_Type on RT7xx,so set PORT_Type as void
2. Add port_no parameter in gpio_mcux_config to adapt IOPCTL driver
3. Add gpio-port-offest parameter in blinding, it will help map the
relation between index n and gpio port when some soc have domain
access attribution.
3. Splite gpio_mcux_configure function into two functions(
gpio_mcux_iopctl_configure and gpio_mcux_port_configure)
according to CONFIG_PINCTRL_NXP_IOCON macro
4. Add code to adapt RT700 GPIO attribute configuration
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Define iocon array to store iocon base address
add index parameter support to support multi iocon instances
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
The DMA-based path of the lpspi driver is basically
almost a driver of it's own, move it to it's own file.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There is (almost) a whole separate driver for RTIO,
move this code to its own file and move shared code
and definitions to a common file.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Move this driver to its own subfolder to organize it
since there will be new files added for this hardware.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Without this fix I get an MPU fault in samples/net/openthread/shell/
with CONFIG_IEEE802154_DRIVER_LOG_LEVEL_DBG=y.
Related commit: a7224830ce
Signed-off-by: Martin Jäger <martin@libre.solar>
Add hwinfo driver for Silicon Labs Series 2 devices. The driver
is separate from the Series 0/1 Gecko driver because the available
reset causes are completely different.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
This PR fixes the issue that building the driver with either
CONFIG_RTC_CALIBRATION=y or CONFIG_RTC_ALARM=y and without
'int-gpios' used will cause
'undefined reference to `rv8803_write_reg8'' error.
Signed-off-by: Marcin Lyda <elektromarcin@gmail.com>
Some time ago a new shim for nRF UARTE was added (uart_nrfx_uarte2.c)
which used nrfx_uarte.c driver underneath. It was supposed to support
nrf54x platforms. However, later on legacy driver (uart_nrfx_uarte.c)
was extended to support nrf54x platforms and it takes less code size,
has better performance and more features. Shim uart_nrfx_uarte2 will
no longer be supported. As new shim is the default and there is a
Kconfig to pick the legacy shim (CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y)
it cannot be deprecated in the normal way. Additional Kconfig option
is created (DEPRECATED_UART_NRFX_UARTE_LEGACY_SHIM) which is enabled
if CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n and it selects DEPRECATED.
A warning was also added to the CMakeLists.txt.
Patch removes use CONFIG_UART_NRFX_UARTE_LEGACY_SHIM in tests.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
In order to ensure that watchdog channels are freed in proper
driver state, synchronization in form of simple loop needs
to be added after stopping. In no irq variant, it is already done
on nrfx level. NRFY function can be replaced by NRFX one in
the future.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Simplifies GPIO reset logic in `phy_mc_ksz8081_reset()` by introducing
a dedicated function, `phy_ksz8081_reset_gpio`. If this function returns
`-ENODEV`, it will fall back to using a command-based reset instead.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Simplifies error handling in `phy_mc_ksz8081_get_link()` by
centralizing mutex unlocking with a `done` label.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Link layer needs some fixing before hci driver can be minimally configured
and hence must revert conditional inclusion of core functionalities untill
new link layer is available.
Signed-off-by: Petri Pitkanen <petri.pitkanen@silabs.com>
Several driver setting were as defines in driver file which made hard to
change by application programmers. Fixed by adding
silicon labs specific Kconfig file for bluetooth driver configurations.
Also some cleaning for handling Kconfig conditional to conform
preferred style.
Signed-off-by: Petri Pitkanen <petri.pitkanen@silabs.com>
RTIO correctly declares tx buffers as const, however, the
existing I2C API and NRFX (SDK) drivers don't. Therefor cast the
const buf to non-const when passing the tx buf to the twim driver
from the RTIO call to avoid the const warning.
The tx buffer is being treated as const data naturally in the
NRFX driver, its just not declared as such since we reuse the
buffer for both RX and TX data.
Alternatively the SDK and "shim" drivers built on top of it need
to be updated, which is quite a bit of work :)
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Multi channels share one IRQ, add channels-shared-irq-mask on RT1180
attribution to describe the channel shared status, and add code
implementation to register the handler function for each channel
in different interrupts.
Fix legacy building warning issue
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
add support SCE9 to entropy driver for Renesas RA
Signed-off-by: Minh Hoang <minh.hoang.wm@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Enables the fractional-N (FRACN) setting for PLL1 in the STM32H5XX
clock driver.
This feature allows achieving a system clock frequency of 250 MHz from
an 8 MHz `clk_hse`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Exit the init earlier when XSPI is in memory map mode. Avoid
unnecessary checks and prevent pin reconfiguration that might
cause line spikes. Clock check beforehand is preserved.
Remove '\n' from the LOG_DBG string.
Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
Exit the init earlier when OSPI is in memory map mode. Avoid
unnecessary checks and prevent pin reconfiguration that might
cause line spikes. Clock check beforehand is preserved.
Remove '\n' from the LOG_DBG string.
Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
We add a serial UART driver for Microchip MEC5 HAL based chips.
The driver supports polling, interrupts, and runtime configuration
features. Power management will be implemented in a future PR.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
This macro is defined in a few places which leads to macro redefinition
error e.g. when compiling prometheus network sample for NPCX boards.
Provide one definition of IS_BIT_SET() in util_macro.h to fix the
problem.
Signed-off-by: Patryk Duda <patrykd@google.com>
Move the instance pointer, which is a constant value, into a dedicated
config structure. At the same time, remove the type casting macros as
this pattern has been removed from the tree for some years now.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The STM32 IWDG is a single channel watchdog, and therefore should be
returning `-ENOMEM` when a user attempt to install additional timeouts,
instead of overwriting previous values.
Signed-off-by: Jordan Yates <jordan@embeint.com>