This patch applies multiple small cleanups across the HL78xx modem
driver, improving readability, consistency, and diagnostics without
changing logic.
Key changes:
- Added missing blank lines in Kconfig sections for readability.
- Improved several log messages for clarity and guidance to users.
- Added a debug log when RAT/Band configuration requires a modem restart.
- Replaced an incorrect SET_RAT_GMS_CMD macro name with SET_RAT_GSM_CMD.
- Added TODO marker for unhandled script failure case.
- Corrected log format string in event handler to include event ID.
- Added an informational log on modem initialization.
- Added clarifying comments in header structures and APN lookup path.
- Normalized #endif comment style throughout the driver.
- Fixed use of CME_ERROR_STRING in chat match definitions.
- Applied formatting hints (clang-format off/on) around multi-line
MODEM_CHAT_MATCHES blocks.
- Improved enum documentation in public API header.
These changes improve maintainability and developer usability without
modifying driver behavior.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Merge the GEN_ABSOLUTE* macros for architectures which have
the same assembler.
Add support for building the POSIX architecture for armhf targets.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a macro to construct a `struct pdm_io_cfg` instance from the
devicetree node with the appropriate properties.
Add macros to query which PDM channels are available.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Extend the PWM API to support events, as some
controllers allow interrupts if e.g., a pwm period
has ended or a fault occured.
Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
It was previously possible to set output division setting
to an invalid number. These bindings ensure a valid number
is set of 0-8.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Add device tree support for enabling the second low pass filter
(LPF2) for the accelerometer output.
This adds additional low pass on top of the default ODR/2 from
the LPF1 output.
Signed-off-by: Emil Hammarström <emil.a.hammarstrom@gmail.com>
move sbc to bluetooth because only bluetooth uses it,
change CONFIG_LIBSBC_ENCODER and CONFIG_LIBSBC_DECODER as CONFIG_LIBSBC.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Remove `-Wno-array-bounds` as there does not seem to be any issues
that require it anymore.
Add -Wno-stringop-overflow to avoid what seem like false positive
warnings with gcc 13.3.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Instead of copying all fields from cmux_config into run-time
struct cmux, just have the configuration structure as a member.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
CMUX driver can enable the support for idle-timer in
devicetree and can be requested to shut down the pipe
during sleep.
Then UART backend put the actual device into sleep when
pipe is closed.
Waking up is requested by sending data to DLC pipe
or by manually opening the uart_pipe.
Modem may request similar wake-up by a RING interrupt which
would open the same pipe.
When UART is powered and pipe is not closed, CMUX wake-up
procedure is automatic. Either end may initiate the wake-up.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Signal powersaving mode for the remote end using PSC command.
Wakes up the remote end from powersaving mode by sending flag characters.
This method is defined in 3GPP TS 27.010.
Sections 5.4.6.3.2 Power Saving Control (PSC) and
5.4.7 Power Control and Wake-up Mechanisms.
Essentially it is one PSC command to indicate a sleep state, and
then repeated flag characters to wake up the remote end or indicate
that we have been woken up.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add edac driver for NXP's ERM and EIM peripherals. It can inject ECC
error to specific channel within EIM and then report the error address,
syndrome and count within ERM.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
Please note that when performing conversions,
the selected channels must all be of the same type
(either ADC raw or V2T.)
Mixing ADC and V2T channels in a single conversion sequence is
not supported.
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Some but not all LOG_OUTPUT_ format flags were Kconfigurable
for log backends using log_backend_std_get_flags()
Adding the missing configurable flags to Kconfig and referencing
them in log_backend_std_get_flags() for full control of output:
- CRLF_NONE
- CRLF_LFONLY
- SKIP_SOURCE
FORMAT_SYSLOG was omitted b/c it is specific to NET log backend.
Signed-off-by: Nicholas Lowell <Nicholas.Lowell@lexmark.com>
Many dts/dtsi files where its dt-bindings are in-tree
do not include zephyr prefix in the #include path.
Add it to make it consistent globally.
Some dt-bindings that resides in hal can not be changed.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add wrapper function for XEN_DOMCTL_deassign_device hypercall to
support deassigning device tree devices from guest domains.
Signed-off-by: Damjan Belavic <damjan_belavic@epam.com>
Fix assertion failure when buf_rx_freed_notify() is called from ISR
by replacing k_sched_lock with atomic_ptr operations for callback
pointer access.
The scheduler lock is retained during callback execution in thread
context to maintain backward compatibility, but is skipped in ISR
context where it's not available.
Updated documentation to clarify the behavior difference between
thread and ISR contexts.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The macro SETTINGS_STATIC_HANDLER_DEFINE did not have a docstring alghough
it's used in-tree more than the documented
SETTINGS_STATIC_HANDLER_DEFINE_WITH_CPRIO.
Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
Use the same docstring style throughout the public header. Prefer to
have struct field documentation above the field definition instead of
placing it after using "/**<". Also use the doxygen special commands for
documenting function parameters and return values.
Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
This commit introduces the DT_INST_STRING_TOKEN_BY_IDX_OR()
and DT_STRING_TOKEN_BY_IDX_OR() macros, which allow
specifying a default value if the indexed string token is not
defined.
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
Add MFD driver for managing rv3032 functionality which did not fit RTC
api. That way are implemented part which otherwise will not be used:
- RTC
- counter/timer
- temperature sensor
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
Add a new API function zbus_chan_from_name() that allows retrieving a
zbus channel by its name string. This complements the existing
zbus_chan_from_id() function and provides more flexibility for channel
lookup operations.
The implementation is conditionally compiled when CONFIG_ZBUS_CHANNEL_NAME
is enabled, ensuring it's only available when channel names are configured
in the system.
Signed-off-by: Trond F. Christiansen <trond.christiansen@nordicsemi.no>
Add a switch/case like variant of the COND_CODE_1 macro where the first
flag that equals 1 has its value expanded, with a default fallback.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add a sensor channel for the encoder counts. This is useful for
reading the encoder counts and calculating an absolute position
of a linear actuator.
Signed-off-by: Omeed Baboli <omeedbaboli@gmail.com>
Current bridge function is very simple which does forwarding for all
packets. There will be more and more features of bridge RX handling.
Let's move bridge RX handling to bridge_input.c for next IPv4/IPv6
protocols support for virtual bridge interface.
And currently there is no path to call bridge_iface_recv function.
Let's rework it for proper function returning NET_CONTINUE.
Also fixed another issue of link local address checking. Because
net_linkaddr structure changed. So fixed
is_link_local_addr((struct net_eth_addr *)net_pkt_lladdr_dst(pkt))
to
is_link_local_addr((struct net_eth_addr *)(net_pkt_lladdr_dst(pkt)->addr))
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
There are two ways in the current implementation to join a network,
either with an association request or a via MLME-SET(macShortAddress) to
rejoin a previously associated network.
The coordinator address needs to be valid in the rejoin case. It can be
lost, for example if the device power cycles. This commit fixes that gap
with new MLME GET/SET for:
- macCoordShortAddress
- macCoordExtendedAddress
Signed-off-by: Simon Piriou <spiriou31@gmail.com>
Similar to logging and shell, allow application to override and
extend the ASSERT macros globally. This enables intercepting log strings
at the macro level for things like string tokenizations.
Signed-off-by: Kevin Zeng <zengk@google.com>
Added PTP timestamping support in NETC ENETC host driver for no-tag
supported NETC switch.
On RX path, extended descriptor is used on host (pseudo MAC) to get
timestamp writeback.
On TX path, TX timestamp response should be enabled on host (pseudo MAC).
After TX, writeback TX timestamp ID should be updated to tx pkt fifo.
Once RX path received TX timestamp response, match TX timestamp to tx
pkt in fifo with the timestamp ID.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
For NETC switch with tag support, PTP timestamping had already been
supported in tag driver.
This patch is to add PTP timestamping support for no-tag supported switch.
Timestamp functions are implemented and exported for host driver to
handle.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Converted to use NETC_PTP_TIMESTAMPING_SUPPORT for PTP timestamping.
PTP timestamping is needed only when NET_L2_PTP and PTP_CLOCK_NXP_NETC
are selected.
Used default 16 bytes for ETH_NXP_IMX_RX_RING_LEN for PTP timestamping
because RX extended descriptor would be used.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
PTP timestamping should be enabled only when NET_L2_PTP and
PTP_CLOCK_NXP_NETC are selected. And NET_PKT_CONTROL_BLOCK
is required for PTP timestamping code.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
The rank cannot be notified and the function allowed for
just updated to the rank. The CSIS spec does not mention
the usecase, nor support, for changing the rank of a device.
The spec only seems to allow for dynamic changes to the set
size (and only during that can the rank be set).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
New nrfx release contains major rework of nrfx drivers
instantiation making it easier to integrate with dts nodes.
Now, nrfx driver instances can no longer be `const`
because they contain driver runtime state.
Additionally, all nrfx drivers return `errno` error codes
instead of deprecated `nrfx_err_t`.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Add an extra _ on the handler struct name generated bu the
EC_HOST_CMD_HANDLER macros, this makes them a bit easier to list as they
now look something like
__cmd_EC_CMD_GET_VERSION
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add two macro variants for registering handlers that have either only a
request structure or only a response structure.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>