This change removes the on-stack copying and instead
uses a pointer to the configuration to avoid unnecessary
stack usage
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Add support for new get_properties_copy() method. This allows to
use ssp driver from user-space threads.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The DAI interface is not used from user-space in all configurations
where Zephyr user-space is enabled, so it is beneficial to have
a build option to contorl whether the DAI syscalls are included or
not.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add a variant of get_properties() method that writes the properties
to a caller provided pointer. Unlike the old variant, this copy
variant can be exported to user-space in a safe way.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add user-space support to the dai.h interface. No functional
impact to builds when CONFIG_USERSPACE is not set.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
During reboot operations, interrupts are disabled but k_is_pre_kernel()
returns false, causing SCMI communication to fail when using interrupt
mode. Force polling mode to ensure reliable operation in all contexts.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Implement sys_arch_reboot() using SCMI system power protocol
for warm and cold reset operations on SCMI-enabled platforms.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add SCMI System Power Domain Protocol support with:
- System power state set operations
- Standard SCMI power states (shutdown, cold/warm reset, suspend)
- Graceful and forceful power transitions
- Optional NXP vendor-specific power states
- Device tree binding for "arm,scmi-system"
This enables system-wide power management through standardized
SCMI interfaces for reboot and power control operations.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add SCMI protocol version negotiation to handle compatibility between
different agent and platform versions. The negotiation automatically
downgrades to supported version when needed and maintains backward
compatibility with legacy systems.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add standardized SCMI protocol common interface functions that can be
reused across different SCMI protocol implementations:
- scmi_protocol_get_version(): Query protocol version
- scmi_protocol_attributes_get(): Get protocol-specific attributes
- scmi_protocol_message_attributes_get(): Query message capabilities
- scmi_protocol_version_negotiate(): Negotiate protocol version support
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Instead of having one "make_thread" function per instance, called through
a function pointer in the instance configuration, save the thread stack
information instead and consume it from shared code in the driver pre-init
function. This makes the driver more readable (less code in the instance
creation macro) and should reduce its footprint impact (since the thread
creation code is no longer duplicated).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add support for resetting the LPTIM peripheral to its default state
on initialization. This ensures that any previous configurations
do not interfere with the new settings.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add support for the Zephyr device power management framework to
enable runtime power control of the ADXL345 accelerometer.
This implementation adds a pm_device_action callback that handles
SUSPEND and RESUME actions. When suspended, the sensor enters
standby mode for low power operation. On resume, it returns to
measurement mode.
The implementation follows the standard pattern used by other
sensor drivers (lis2dh, bme280, vcnl4040) and integrates with
the PM_DEVICE_DT_INST_DEFINE macro for automatic PM setup.
Tested on nRF52832 with CONFIG_PM_DEVICE enabled.
Signed-off-by: Tobias Kässer <t.kaesser@gmail.com>
When uart_ns16550_irq_tx_enable() is called and the TX FIFO is already
empty, no new interrupt is generated, causing data transmission to stall
in some cases. This patch introduces a workaround to simulate an ISR
callback if the FIFO is empty when enabling the TX IRQ.
Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
Increase the default number of software-limited CAN RX filters across the
drivers. Some of these were chosen quite conservative, requiring custom
configuration for even simple in-tree samples.
Users can reduce the number of available RX filters to reduce RAM footprint
as needed.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Rename Kconfig option CONFIG_CAN_RCAR_MAX_FILTER to
CONFIG_CAN_RCAR_MAX_FILTERS to match remaining CAN driver Kconfig option
naming.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN xmc4xxx Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_XMC4XXX_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the STM32 FDCAN Kconfig symbols, renaming
CONFIG_CAN_MAX_STD_ID_FILTER to CONFIG_CAN_STM32_FDCAN_MAX_STD_ID_FILTERS
and CONFIG_CAN_MAX_EXT_ID_FILTER to
CONFIG_CAN_STM32_FDCAN_MAX_EXT_ID_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the STM32 bxCAN Kconfig symbols, renaming
CONFIG_CAN_MAX_STD_ID_FILTER to CONFIG_CAN_STM32_BXCAN_MAX_STD_ID_FILTERS
and CONFIG_CAN_MAX_EXT_ID_FILTER to
CONFIG_CAN_STM32_BXCAN_MAX_EXT_ID_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the MCUX FlexCAN Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MCUX_FLEXCAN_MAX_FILTERS and
CONFIG_CAN_MAX_MB to CONFIG_CAN_MCUX_FLEXCAN_MAX_MB.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN mcp251xfd Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MCP251XFD_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN max32 Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MAX32_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN mcp2515 Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MCP2515_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN sja1000 Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_SJA1000_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN native_linux driver Kconfig symbols,
renaming CONFIG_CAN_MAX_FILTER to CONFIG_CAN_NATIVE_LINUX_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN loopback driver Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_LOOPBACK_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
When parsing AT command responses, empty string arguments were being
ignored if they occur it the end of the response.
This is not only iconsistent behavior, but also causes issues when
parsing responses where we need to know the number of arguments.
For example, the +CEREG response and unsolicited command response which
we need to know if it is response or unsolicited command response to
correctly parse the it, as the first argument will be different.
Example:
Response: +CEREG: 5,4,\"0A0B\",\"FFFFFFFF\",9,0,0,,
Notification: +CEREG: 4,\"0A0B\",\"FFFFFFFF\",9,0,0,,
Here we want to know that response has 8 arguments, not 7, or we will
confuse it with the notification.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Introduce CONFIG_MCUX_OS_TIMER_MIN_DELAY to allow the configuration
of the minimum delay cycles.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
This commit introduces helper functions to avoid having large
#if DT_HAS_COMPAT_STATUS_OKAY ... #else blocks,
improving readability.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
When an invalid GPIO configuration is provided for a wake-up pin on
STM32WBA series, display a series-specific message and return an error.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
When an error occurs while attempting to configure a GPIO pin as wake-up
pin, return the error to the caller instead of merely printing a log
message which may not even be displayed.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Use the pixelformat information provided by the DSI panel in order
to control the color coding of the DSI host.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
So far the LTDC driver has not be using the pixel-format property
defined in the lcd_controller bindings. This property describes the
format of the panel connected to the LTDC output. It is not to be
confused with the format of the LTDC layers (aka format of data stored
into the framebuffer). The LTDC accepts various input formats while in
most cases only RGB888 is supported for output. RGB666 is also supported
by enabling Dithering however it is not supported currently by the
driver.
Enforce verification of the pixel-format given to the LTDC device-tree
by checking that it matches with the platform supported formats.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The QDEC driver does not use any of the functions implemented in the TIM
LL full driver module (`stm32XXxx_ll_tim.c`), only those provided by the
LL header (`stm32XXxx_ll_tim.h`).
Disable compilation of the unnecessary full driver module.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The RTC driver does not use any of the functions implemented in the LL full
driver module (`stm32XXxx_ll_rtc.c`), only those provided by the LL header
(`stm32XXxx_ll_rtc.h`).
Disable compilation of the unnecessary full driver module.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
STM32H5 series now uses the dedicated `flash_stm32_xspi` driver instead.
Remove all quirks related to H5 in the STM32 OSPI driver.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
When the number of input bits changes, the value in the `CR_DATASIZE`
register should be modified accordingly.
The CRC32_C algorithm does not require the result to be XOR
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
The buffer length check was not updated with the change to the H4 header
push location (changed in 6113230c). As the complete buffer is now
provided, a buffer of length `SPI_MAX_MSG_LEN` is now valid.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The reset gpio field was in the config structure but was not coded
into the initialization path. So, add the appropriate code to handle
the gpio setup when it is defined in the device tree.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>