Add support for setting the sample frequency via `attr_set` and the
output data rate from device tree source.
Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
There is const used in a few places and some hacks to get around
that const. Just remove the const as well as remove the hacks.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Added support to get irq from dts node, because some platforms may
use multi-level interrupts, and the system INTID may not be connected
directly to interrupt controller.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Before that fix we read the inpupt register when toggling
gpios. With this fix, we now read the output register for
toggling a pin.
Signed-off-by: Sven Ginka <s.ginka@sensry.de>
Due to the introduction of `shell_fprintf_normal` in PR #77192, we can
minimize caller overhead by eliminating direct `color` parameter passing.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Aligned the `struct shell *` argument name from `shell_ctx` to `sh`
for consistency with other drivers' usage of `sh`, and to match
the `shell_cmd_handler` argument name.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Allow configuring MTU for CMUX.
Some AT manual and specification define this as a
frame size. Linux ldattach default to 127 bytes,
3GPP TS 27.010 defaults to 31.
We should limit our CMUX frames to a size that
remote end is capable of handling.
Linux silently drops oversized frames.
Also, remove MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE as
this was only limiting a buffer sizes, and resulted
CMUX frames to be capped to same value.
Use MODEM_CMUX_WORK_BUFFER_SIZE and MODEM_CMUX_MTU instead.
Also rename CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZES to
CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZE as it is now
only used as a Chat module. DLCI pipes use
CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Hexadecimal integer literals are signed if they can fit into a signed int,
which causes undefined behavior.
This happens here because 0xFF can fit into a signed int and then gets
left-shifted by 24, undefined behavior for signed integers.
Signed-off-by: Daniel Hajjar <daniel.hajjar16@gmail.com>
Add support for additional line control signals. Improved configuring
uart_config_flow_control options.
Signed-off-by: Derek Snell <derek.snell@nxp.com>
The STM32WB09 TRNG does not clear FIFO_FULL IRQ flag in hardware once the
FIFO is no longer full, a behavior which differs from all other series.
This results in spurious IRQs, as the TRNG IRQ line effectively remains
high forever once a single interrupt has been generated.
Clear the flag in software after reading from the FIFO on STM32WB09 SoC.
N.B.: the error IRQ flag is already handled properly, as this flag must
also be cleared by software on other series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
CONFIG_SOC_STM32WB09XX implies CONFIG_SOC_SERIES_STM32WB0X, making it
pointless to assert the latter is defined before checking the former.
Simplify #ifdef checks in the entropy driver's LL wrappers thanks to
this observation, by removing unnecessary nesting.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
First commit to add support for Renesas RA i2c sci-b driver
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Remove unnecessary check that the SPI clock is being set to a frequency
above 2 MHz to allow devices running at common lower frequencies (i.e.
1.2 MHz and 400 kHz).
Replace with check that the frequency is not below the minimum frequency
supported by the chipset to prevent overflow error which can occur if
the HAL sets a frequency too low resulting in a SPI clock much larger
than expected.
Fixes#69986
Signed-off-by: David Lim <dlim04@qub.ac.uk>
There is no point in calling k_event_test() to determine what events are
posted and then passing that value to k_event_clear(). Simply pass
UINT32_MAX to k_event_clear() and use the return value to slightly
reduce overhead.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
OUT endpoint 0 cannot be disabled and therefore the only way to forcibly
reclaim the buffer is to reset the core. The reset does not finish if
PHY clock is not running, but just triggering the reset seems to be
enough to be able to reclaim the buffer.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
When the endpoint is disabled while the core is hibernated, there are
timeouts waiting for interrupts. It is not clear how the stack should
behave when class and/or application wants to disable the endpoint while
device is suspended. The problem was originally observed when the
endpoints were disabled as a result of usbd_disable() call.
Avoid the timeouts by modifying the backup values instead of the real
registers (which are not accessible when hibernated).
Split the 32-bit txf_set variable into two 16-bit variables (txf_set and
pending_tx_flush) because maximum number of TxFIFO instances is 16.
The txf_set variable is used as-is, while the pending_tx_flush is used
to keep track of TxFIFOs that have to be flushed on hibernation exit.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
This commit changes to use ambiq hal power control APIs
to replace the previous register settings to power on
ambiq drivers.
Signed-off-by: Hao Luo <hluo@ambiq.com>
The Xilinx AXI Ethernet subsystem is commonly found in FPGA designs.
This patch adds a driver and device tree bindings for the Ethernet MAC
core and its MDIO controller.
The driver was tested on a RISC-V softcore in an FPGA design, with an
RGMII phy and Ethernet subsystem version 7.2 Rev. 14. Device tree
bindings match the device tree generated by Vitis hsi. Note that Vitis
generates one of the two included compatible strings depending on
version.
Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
Extend runtime PM to support fast instance (spis120) which requires
additional action in suspend/resume phase.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add support for the STM32WB0 series to the existing STM32 driver for
Independent Watchdog peripheral.
NOTE: this commit only includes basic support for the watchdog.
STM32WB0 specificities such as the different possible clock sources, LSI
frequency measurement or window support are left for future implementation.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Remove the inline attribute from stm32 clock drivers functions
especially for functions that are only referenced in the clock API
operation structure and therefore cannot be inline. As a generic
comment, today compiler are smart enough to optimize embedded software
without needing inline function attributes in the source files.
This change hopes that next stm32 clock driver will no more replicate
this bad habit when using existing source files as implementation
examples.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
IN_RANGE() macro from zephyr/sys/util.h returns a boolean value
so it should be treated as such and not compared to a decimal value.
Fix stm32 clock drivers accordingly and simplify places where the
value is compared to true.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct typo in STM32H7 HSI clock calibration directives introduced
in commit 6b167f2596 ("drivers: clock_control: add calibration for
h7 pllx_hsi") that currently has no functionnal impact but is worth
to be fixed for consistency.
No functional change,
Fixes: 6b167f2596
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Remove function exported stm32_system_clock_update() defined in
STM32H7RS series clock driver but that is not used and not even declared.
There already exists a CMSIS SystemCoreClockUpdate() function in
STM32 HAL drivers for the exact same purpose one may use if needed.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add ULP Coprocessor board support for C6.
This requires a change in the board qualifier depending on the build
target.
Update esp32c6 overlay and configuration files to the proper name.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
TLS_CREDENTIAL_SERVER_CERTIFICATE credential type is misleading, as in
fact it just represents a public certificate, it does not matter if the
certificate belongs to a server or a client. And actually, it was
already used in-tree for clients as well, for example in LwM2M.
Therefore rename the credential type to a more generic
TLS_CREDENTIAL_PUBLIC_CERTIFICATE and deprecate the old one.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
- Define alarm_set_callback() only when CONFIG_RTC_ALARM is set otherwise
a warning will be generated at runtime for the function not being
used.
- add "static" keyword to all internal functions.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Clear display only when display pixel format is actually supported
since buffer size depends on it.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Change pinctrl-0 dts prop as optional in case DSI display is used
Add these APIs support: set_brightness, set_contrast, get_framebuffer
Add a new config to select frame buffer section
Signed-off-by: Danh Doan <danh.doan.ue@bp.renesas.com>
When two tach use simultaneously, I find that the both tach status will
be cleared at once, which causes one of tach not to get rpm speed.
So I change it to clear status only one tach at a time.
This issue is reported by Huaqin:
https://partnerissuetracker.corp.google.com/issues/404067663?pli=1
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>