Commit graph

4132 commits

Author SHA1 Message Date
Jukka Rissanen 5119235a00 net: doc: http/method.h: Hide internal documentation
Do not generate documentation for internal symbols.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen 639fa20d08 net: doc: http/hpack.h: Hide internal documentation
Prevent internal symbols from being in generated documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen b0fa414039 net: doc: http/frame.h: Improve documentation
Doxygen documentation was totally missing in this file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen de2cdd538b net: doc: http/client.h: Improve documentation
Add missing doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen d206c5931a net: doc: hostname.h: Document hostname length macro properly
Max hostname length was not documented.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen fb4dda2605 net: doc: gptp.h: Documentation missing for structs
Add more struct documentation to gptp.h

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen 9ec0f6ec4f net: doc: ethernet_bridge.h: Hide internal structs from doxygen
Mark internal structs as hidden to avoid generating public
documentation for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen f1852b4a1d net: doc: ethernet.h: Document header file properly
Documentation to various public features was missing.
Also some of the public features were marked in hidden section.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen ce3512bfaf net: doc: dummy.h: Document dummy L2 header file
The dummy L2 header file was missing documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen ee26be4113 net: doc: dsa.h: Hide internal documentation
Do not generate documentation for internal symbols.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen 86537ca469 net: doc: dns_resolve.h: Improve documentation
Couple of doxygen comments were missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen 03e9b3f320 net: doc: dhcpv4.h: Document DHCPv4 message types
The DHCPv4 message type documentation was missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen bacff7fd28 net: doc: conn_mgr_monitor.h: Add @file documentation
This improves documentation coverage metric for this file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen 931dffd755 net: doc: conn_mgr_connectivity.h: @endcond was incorrectly placed
The net_event_conn_cmd is internal so no need to generate public
documentation for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen b994970068 net: doc: coap: Fix doxygen documentation
Fix doxygen documentation in COAP header files to improve
documentation coverage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen 0a49160d1e net: doc: canbus.h: Added missing @file section
This will improve documentation coverage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen fb64753c28 net: doc: buf.h: Improve documentation
Added missing doxygen comments. Also hide internal symbols from
generated documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Declan Snyder e7d0f3feaf include: reset.h: Add _OR dt spec macros
Add _OR versions of all the reset_dt_spec macros.

Also bump the API version to 0.2.0 (unstable) since
there are multiple implementations of this API.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Declan Snyder 1db901e2c9 dts: bindings: Add bindings for NXP LPC resets
Add binding representing the peripheral reset controller
of the NXP LPC SYSCON heritage hardware including SYSCON
itself and the newer RSTCTL.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Krzysztof Chruściński 299b52d1a7 debug: Add MIPI STPv2 data stream decoder
Add a decoder of STPv2 stream.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-21 16:48:28 -04:00
Aleksander Wasaznik a530010fe2 Bluetooth: Remove useless field init_credits
Remove `bt_l2cap_le_endpoint.init_credits` that has zero uses and is
just taking up RAM for no reason.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-05-21 16:45:50 -04:00
Lucas Romero 3f50197a90 lib: bitarray: add method to find nth bit set in region
This is part one of several changes to add more methods to the bitarray api
so that it can be used for broader usecases, specifically LoRaWAN forward
error correction.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-05-21 16:44:38 -04:00
Lucas Romero 752d3c529e lib: bitarray: add method to xor two bitarrays
This is part one of several changes to add more methods to the bitarray api
so that it can be used for broader usecases, specifically LoRaWAN forward
error correction.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-05-21 16:44:38 -04:00
Lucas Romero c5e5686805 lib: bitarray: add method to count bits set in region
This is part one of several changes to add more methods to the bitarray api
so that it can be used for broader usecases, specifically LoRaWAN forward
error correction.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-05-21 16:44:38 -04:00
Benjamin Lindqvist ed025b2f04 net: lib: coap_client: observe-related fixes
An earlier pull request implementing observe support was merged too
hastily. It had a few issues:

1. The predicate for whether a request should be marked not ongoing was
wrong (it checked ret != 0 instead of ret < 0)
2. Without observes in mind, MID-based deduplication is not a required
feature. Deduplication was handled implicitly - the exchange would get
dropped after the first response anyway, so duplicate responses would
not get matched to anything. But with observes, there are several
responses in an exchange. This commit adds this.
3. Using coap_request_is_observe(&internal_req->request) in the response
handler requires the whole request to stay in scope for the lifetime of
the observation, which I observed was not always the case. Adding an
is_observe bool to the internal struct improved stability significantly.

With these fixes, GETs with observe option works very well.

Signed-off-by: Benjamin Lindqvist <benjamin@eub.se>
2024-05-21 16:42:38 -04:00
Flavio Ceolin 7c06739829 drivers: system_timer: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-20 20:49:25 -04:00
Flavio Ceolin b4a1ac5ac6 drivers: loapic: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-20 20:49:25 -04:00
Flavio Ceolin 9faaf0f8ce headers: memory_domain: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-20 20:49:25 -04:00
Flavio Ceolin b8d40c790d headers: arch/x86: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-20 20:49:25 -04:00
Flavio Ceolin 97ed2a8f03 headers: arch/xtensa: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-20 20:49:25 -04:00
Juliane Schulze 72b20315ea drivers: set LIS2DH default trigger mode to "EDGE_BOTH"
Previous value just activated the ability to trigger for both edges,
without (de)-activating the gpio. This caused an assrtion error in GPIO.h.

Fixes #71227

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-05-20 18:05:01 +02:00
Patryk Duda 0079ab1cb3 toolchain/llvm: Fix integer macros implementation
Currently __INT64_C() doesn't add any suffix to provided constant which
causes the constant to have 'int' type. On the other side, __UINT64_C()
adds ULL suffix which makes the constant 'unsigned long long'.

Of course, __INT64_C() is wrong here because 'int' type, in most cases,
has 32 bit width.

According to the C standard, these macros are for minimum-width integer
constants. For example, it means that using INT16_C() macro will give
you constant with type the same as 'int_least16_t' type.

Clang doesn't provide defines like __INT_LEAST16_C_SUFFIX__, which makes
implementation difficult, because we need to determine appropriate type
first.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-05-20 18:04:54 +02:00
Patryk Duda 1f4e911d68 toolchain/llvm: Provide integer macros only when necessary
Using '#ifndef' before defining a macro is a good way to provide default
version of the macro if not defined elsewhere. But it has some
disadvantages:
- It hides information about the users of these macros. It's hard to
  determine when this implementation is used.
- Correctness depends on file including order.

It looks like these macros are used only by minimal libc and only if
ENFORCE_ZEPHYR_STDINT is not selected. We expect other libc to provide
their own implementation.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-05-20 18:04:54 +02:00
Patryk Duda 759dcfe18f llvm: stdint: Don't define integer constant macros in llvm.h
Zephyr minimal libc implements integer constant macros using internal
headers provided by GCC, for example INT64_C(x) is just a __INT64_C(x)
which is implemented by the GCC.

Clang compiler doesn't provide these definitions, so we define them
(__INT64_C() and INT64_C()) in zephyr/toolchain/llvm.h, but it looks
like INT64_C() definition doesn't come from llvm.h, but from stdlib.h
despite of checking if __GNUC__ is defined.

This is because Clang sometimes pretends to be GNU compiler:
$ x86_64-pc-linux-gnu-clang -dM -E - < /dev/null | grep "GNU"
 #define __GNUC_MINOR__ 2
 #define __GNUC_PATCHLEVEL__ 1
 #define __GNUC_STDC_INLINE__ 1
 #define __GNUC__ 4

Let's keep the integer constant macros in stdlib.h and their
actual implementation in llvm.h. Also define these macros if __clang__
is defined, just in case.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-05-20 18:04:54 +02:00
Aleksander Wasaznik 442f208cb3 Bluetooth: Add BT_LE_ADV_CONN_ONE_TIME
The adv auto resume feature is planned for deprecation. This new define
is the new default applications should use.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-05-20 15:16:03 +01:00
Bjarki Arge Andreasen 5e193edbc3 modem: chat: implement buffer stats
implement buffer statistics for modem_chat module.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Bjarki Arge Andreasen 88bb45082a modem: ppp: implement modem_statistics
Implement modem buffer statistics for ppp module.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Bjarki Arge Andreasen b636327601 modem: cmux: Implement modem backend statistics
Implement modem backend statistics into modem CMUX DLCI
channel receive buffer and CMUX transmit and receive buffers.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Bjarki Arge Andreasen beeb769bb1 modem: backend: uart: isr: Implement modem backend stat
Implement modem backend statistics into isr uart modem backend.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Bjarki Arge Andreasen aba5580af3 modem: backend: Add statistics module
Add statistics module which tracks the usage of modem backend
transmit/receive buffers if implemented by a backend.

A modem backend may register itself to the modem backend
stat module, and advertise its transmit and receive buffer
sizes and momentary usage (length).

The modem backend module tracks the maximum usage, which can be
output to the shell using the "modem_stats buffer" shell command.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Chauncy Liu 5d737e2ab4 include: net: fix compiler warning on unused variable & unsupported type
Use ARG_UNUSED on unused variable
Cast variables to correct type to avoid compilation warnings.

Signed-off-by: Chauncy Liu <chauncy@beechwoods.com>
2024-05-20 14:36:35 +03:00
Jukka Rissanen 9a40066b4f net: dns: Convert resolver to use socket service API
Instead of using net_context API directly, the DNS resolver is
changed to use the socket service API. This allows DNS access
for offloaded sockets and can lower overall memory consumption.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Bartosz Bilas 7046c9030e drivers: spi: remove deprecated spi_is_ready function
`spi_is_ready` is depreceted since v3.3 so let's remove it.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2024-05-18 12:20:05 -04:00
Jeppe Odgaard 0b94ab7704 drivers: sensors: add veaa_x_3 proportional pressure regulator sensor
Add driver for Festo VEAA-X-3 series proportional pressure regulator.

The driver assumes that the maximum ADC value matches the maximum
output from the device, and that the maximum DAC value matches the
maximum input value for the device. External hardware is probably
required between the ADC/DAC and the device.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-18 15:56:09 +03:00
Emil Gydesen 7c96743fae Bluetooth: ISO: Upgrade from experimental to unstable
The ISO API and implementation have existed in Zephyr
for several years, and while not fully qualified, stable
or tested yet, it's not experimental anymore (and have
not been for a long time).

This commit removes any references to it being experimental
and instead defines it as unstable by setting the version to
> 0.1.0. 0.8.0 is being used as the initial version, as that
is what other unstable modules was defined to have as their
initial version if they were not stable (>= 1.0.0).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:54:31 +03:00
Emil Gydesen fcf089574d Bluetooth: ISO: Guard sec_level for iso_chan with unicast
The required_sec_level is only valid for unicast iso channels.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:54:19 +03:00
Emil Gydesen f58ac3476f Bluetooth: CAP: Add reference to the set member for CAP discover
Since the CSIP API expects a set member struct for nearly all
functionality, the reference to the full set member (along with
the CAS specific CSIS) should be given to the application.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:51:26 +03:00
frei tycho 18fd294b5c include: arch: x86: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-05-17 14:39:21 -05:00
Johann Fischer b0d7d70834 usb: device_next: add initial BOS support
Use the same scheme as for string descriptors. Descriptors can be added
or removed using the existend interface.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 16:25:02 +01:00
Johann Fischer 29003ff264 usb: bos: cleanup Binary Device Object Store header
We could reuse the BOS header, but there are parts that are only needed
in the legacy device support or used internally and the tests. Move this
parts to the appropriate places.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 16:25:02 +01:00
Johann Fischer 4f17bc6051 usb: device_next: store bDescriptorType and bLength in descriptor node
It simplifies the macros to create the string descriptors. We also no
longer need placeholders for the SerialNumber descriptor when it is
generated from hwid. In the future, we can store other descriptor types
in the same list.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 16:25:02 +01:00
Johann Fischer 48ca72326b usb: device_next: move string descriptor data to a separate structure
Move and rework string descriptor data to a separate structure so we can
share memory with another type. Also add description to the
USBD_DESC_STRING_DEFINE macro.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 16:25:02 +01:00
Johann Fischer f110766072 usb: device_next: add few more string descriptor helpers
Add function to get string descriptor index and function
to remove linked descriptor from a device. This abstracts
it a bit so that the user does not need to know how it is
handled internally.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 16:25:02 +01:00
Krzysztof Chruściński 24082d582f arch: arm: cortex_m: pm_s2ram: Add option for custom marking
s2ram procedure used RAM magic word for marking suspend-to-RAM. This
method may not work in some cases, e.g. when global reset does not
reset RAM content. In that case resuming from s2ram is detected when
global reset occurred.

RAM magic word method is the default but with
CONFIG_PM_S2RAM_CUSTOM_MARKING a custom implementation can be provided.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-17 14:33:47 +02:00
Emil Gydesen c547079cc2 Bluetooth: Audio: Upgrade from experimental to unstable
This commit upgrades the LE audio API and implementation
from experimental to unstable.

LE Audio have existing for quite a few years in Zephyr
and is not going anywhere, but at the same time it still
has significant effort remaining before it can be
considered stable.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-17 14:33:39 +02:00
Pete Skeggs f04f8b2422 net: lib: coap_client: Improve cancel function
Improve coap_client_cancel_requests(). Ensure it can be
called from a callback. Report error to waiting callbacks.
Clear active flag.

This is useful when the network becomes unavailable
or prior to disconnecting in order to save power.

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
2024-05-17 10:34:12 +02:00
Tom Burdick b249535093 sensors: Add channel specifier
Use a structured channel specifier rather than a single enum when
specifying channels to read in the new read/decoder API.

Replaces usages of a seperate channel and channel_index parameter
where previously used with a struct sensor_chan_spec.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-05-17 09:30:18 +02:00
Flavio Ceolin 8cd1ab8896 drivers: pcie: Remove deprecated pcie_bdf_lookup
pcie_bdf_lookup() was deprecated before 3.3 release. Time to remove
it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-17 09:30:04 +02:00
Flavio Ceolin f4aefc281b drivers: pcie: Remove deprecated pcie_probe
pcie_probe() was deprecated before 3.3 release. Time to remove it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-17 09:30:04 +02:00
Abderrahmane Jarmouni 32c04c6b25 include: dt-bindings: gpio: fix flag value
'1u' causes devicetree parsing error.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-17 09:29:53 +02:00
Ryan McClelland 9640905a71 drivers: i3c: add ccc getcaps helper
This adds the defines for getcaps format 1 and format 2.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-05-16 16:23:31 +02:00
Ryan McClelland da094d4d3c drivers: i3c: fix ccc getmxds macros
GETMXDS macros had typos in them. This fixes them.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-05-16 16:23:31 +02:00
Mateusz Michalek 5919163b48 include: storage: flash_map: _NODE macros
adds size, offset and divice access macros that are
operating with nodes as an argumet.

Signed-off-by: Mateusz Michalek <mateusz.michalek@nordicsemi.no>
2024-05-16 16:21:34 +02:00
Jérémy LOCHE - MAKEEN Energy 8ef8e8b497 arch: arm: rom_start relocation configuration
In order to support Linux rproc loading, some SOCs require
the boot-vector and irq-vectors to be placed into a defined
memory area for the mcu to boot.

This is necessary for NXP's IMX SOCs for instance but
can be leveraged by other SOCs that have multiple
zephyr,flash choices.

Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
2024-05-16 15:52:20 +02:00
Chris Friedt ed501d788b kernel: structs: define priq bitmap size via bits per long
Since a long is 64-bits on 64-bit architectures, and 32-bits
on 32-bit architectures, we can simplify the definition of
PRIQ_BITMAP_SIZE by defining it in terms of BITS_PER_LONG.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-05-16 13:51:23 +02:00
Henrik Brix Andersen 0f7cd6128e drivers: can: set default initial bitrates via Kconfig
Set the default initial bitrates globally via Kconfig. The initial bitrates
can still be overridden using the "bus-speed" and "bus-speed-data"
devicetree properties.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-16 09:23:59 +02:00
Daniel DeGrasse 82ce2b412d sd: sdmmc: rework frequency and timing selection logic
SDMMC framework frequency and timing selection logic has several
longstanding issues, including:
- requiring that SD hosts support the maximum frequency possible for a
  given UHS mode in order to apply that timing
- selecting SDHC_TIMING_SDR25 for high speed mode, when SDHC_TIMING_HS
  would be correct

Rework the frequency and timing selection logic within the SD framework
to resolve these issues.

Fixes #52589
Fixes #67943

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-16 09:21:03 +02:00
Daniel DeGrasse 87030f4cbf sd: sdmmc: add DEFAULT and HIGH_SPEED bus speeds
Add DEFAULT and HIGH_SPEED bus speeds to SD spec definition, for non UHS
cards.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-16 09:21:03 +02:00
Daniel DeGrasse 06f3574685 include: zephyr: sd: sd_spec: add UNSUPPORTED frequency for HS mode
Add UNSUPPORTED frequency macro for HS mode frequencies, used when a
card does not support any high speed mode frequencies

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-16 09:21:03 +02:00
Daniel DeGrasse 771451f616 include: zephyr: sd: sd_spec: use frequency macros
Use frequency macros to define SD frequencies, this should increase
readability of the file and reduce errors.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-16 09:21:03 +02:00
Lyle Zhu 615fe2466b Bluetooth: RFCOMM: Kconfig: Add configure BT_RFCOMM_DLC_STACK_SIZE
The default stack size of RFCOMM DLC is 256.
The default value is sufficient for basic operation.

If more stack space is used (such as call function printk)
in context of callback disconnected of RFCOMM DLC, the
default stack size is not sufficient.

Add a configuration BT_RFCOMM_DLC_STACK_SIZE to configure
the RFCOMM DLC stack size.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-05-16 09:15:49 +02:00
Lyle Zhu 514c78546c include: Bluetooth: Add BT COD macros to hci_types.h
Add macros to get Major Service Classes, Major Device
Class and Minor Device Class.

Define Major Device Class code.
Define Minor Device Class field for Computer Major
Class.
Define Minor Device Class field for Phone Major Class.
Define Minor Device Class field for Audio/Video Major
Class.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-05-16 09:15:49 +02:00
Lyle Zhu 84144c6833 Bluetooth: HFP_AG: Initialize HFP AG
Implement basic functions for HFP AG.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-05-16 09:15:49 +02:00
Johann Fischer c3ec41bdf8 usb: device_next: remove unused API function
Remove unused and not required usbd_ep_ctrl_buf_alloc().

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-15 17:29:24 +01:00
Johann Fischer 4c360f38d1 usb: device_next: add controller can detect VBUS state change capability
There are controllers with capability to detect VBUS state change. This
can be used in a generic application to explicitly handle the VBUS
detected event after usbd_init() and for example allow the PMIC to
detect to what type of port device controller is connected.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-15 17:29:24 +01:00
Johann Fischer 693191467d usb: device_next: add USB device context to message delivery callback
Add USB device context argument to message delivery callback.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-15 17:29:24 +01:00
Fin Maaß c5fc2e743c kernel: docs: correct sys_heap_aligned_realloc
correct doc of sys_heap_aligned_realloc().

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-15 15:00:12 +02:00
Seppo Takalo 01b57b4999 net: lwm2m: Add offset to post-write callback
When Block-Wise transfer restarts, the post-write callback should
receive some indication that the block is actually a beginning of new,
instead of part of previous transfer.

Fixes #71351

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-05-15 14:58:15 +02:00
Emil Gydesen a6a14360a9 Bluetooth: BAP: Remove err from recv_state_removed callback
The callback is only ever called when we received a
notification from the BASS server that the receive state is
removed, which cannot contain an error code.
Thus it does not make sense for the callback to have an
error code.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-15 14:57:20 +02:00
Francois Ramu e255444179 dts: bindings: introduce a new compatible for stm32 xSPI flash controller
The new bindings for the stm32 xspi is for new stm32 devices with
XSPI peripherals like the stm32h5 serie. This is close to the octo-spi.
Adapt the flash controller constants to the XSPI model especially.
This is done through a new xspi.h definition file.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-15 10:56:04 +02:00
Jukka Rissanen 6d129b2a2d net: http_server: Add support for specifying Content-Type
Allow user to specify the Content-Type header field for the
HTTP response.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 20:22:58 -04:00
Johann Fischer c0e8f0d96b usb: device_next: add initial HID device support
Add initial HID device support. Unlike the existing HID implementation,
the new implementation uses a devicetree to instantiate a HID device.
To the user, the HID device appears as a normal Zephyr RTOS device.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-14 18:24:45 -04:00
Johann Fischer a2c9c65bfa include: usb_hid: remove conditional definition from struct hid_ops
For upcoming HID support in the new device stack and to provide API
backward compatibility, there must be no conditional definitions in the
header.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-14 18:24:45 -04:00
Declan Snyder c767ed6e27 dts: bindings: adc: Add NXP GAU ADC binding
Add binding for NXP GAU ADC

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Johan Hedberg 484fe3f06c Bluetooth: Remove bt_read_static_addr() "hack"
This function was used to shortcut HCI for combined host + controller
builds. It doesn't provide much value and adds complexity to the HCI
driver interface, so just remove it. This means vendor-specific HCI
commands is now the only way for the host to access the same
information.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-14 18:21:11 -04:00
Jukka Rissanen e71569fc00 net: http: Make sure not use undefined Kconfig symbols
If CONFIG_HTTP_SERVER is not enabled, then we must not use
Kconfig symbols that are only available when HTTP server is
enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 15:51:20 +02:00
Jamie McCrae 7a4f4711af drivers: led_strip: Make update channels function optional
Makes the update channels function optional, this is only
implemented in one driver so can be safely omitted from most
drivers

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 50b7d61c91 drivers: led_strip: Check length before updating LED strip
Checks that the supplied length is valid for the given driver
before passing it to the update function

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 245163cb87 drivers: led_strip: Update format
Updates the include file to fix some formatting issues

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 4bea96b68b drivers: led_strip: Add length function
Adds a length function which returns the length of the LED strip

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jordan Yates 98deebd29b kernel: add k_uptime_seconds
Add a helper function for retrieving the system uptime in seconds
without having to do a second division.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Jordan Yates aee130f8d7 sys: time_units: add seconds conversions
Add conversions between the existing time units and seconds.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Jordan Yates c354f7b00b sys: time_units: move warning to doxygen command
Move the warning about code being autogenerated into the doxygen comment
instead of being added as a separate comment that then appears in the
`@return` text.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Jukka Rissanen 70ab0e65a5 net: websocket: Add a way to unregister a websocket connection
Doing a normal close for a websocket does not close the underlying
real socket. If we do not have fd for the real socket, then it is
not possible to fully close a websocket connection. As we are allocating
a websocket using websocket_register() in HTTP server use case,
create a websocket_unregister() that will close both the real
socket and the websocket socket.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 09:31:37 +02:00
Corey Wharton bf114c6b1a logging: add API to trigger immediate processing of logs
There are use cases where it's beneficial to trigger the log
thread to process log messages as soon as able instead of waiting
for the processing timer or threshold triggers. An example would be
to flush the log buffer before entering the idle thread after
forcing a system power state.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-05-13 16:06:11 -04:00
Nicolas Pitre 57305971d1 kernel: mmu: abstract access to page frame flags and address
Introduce z_page_frame_set() and z_page_frame_clear() to manipulate
flags. Obtain the virtual address using the existing
z_page_frame_to_virt(). This will make changes to the page frame
structure easier.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-13 16:04:40 -04:00
Fin Maaß 9bd0170aad net: http: client: mark as unstable
As the http client API is currently used by two applications
(websocket and hawkbit), it should be marked as unstable, according
to the docs:
https://docs.zephyrproject.org/latest/develop/api/api_lifecycle.html

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-13 16:02:55 -04:00
Grzegorz Swiderski 97a83ef8a7 dt-bindings: misc: Add nRF54H20 Domain IDs and Owner IDs
Move the Domain IDs from `nrf54h20.dtsi` into its own header file.
Additionally, include another header with Owner IDs.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 10:36:37 +03:00
Grzegorz Swiderski beb4d5690a dt-bindings: adc: Fix BIT_MASK redefined warning
Include `dt-util.h` instead of providing a separate macro definition.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 10:36:37 +03:00
Flavio Ceolin 39538f78cf pm: device_runtime: Small API documentation fix
Remove an invalid return value in pm_device_runtime_enable

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-12 17:02:56 -04:00
Hess Nathan b8c21d4898 coding guidelines: comply with MISRA Rule 13.4
- avoid to use assignment expression value

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-12 13:38:25 -04:00
Hess Nathan 1fb5cd6462 coding guidelines: comply with MISRA Rule 12.1.
-added parentheses verifying lack of ambiguities

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-12 13:37:54 -04:00
Jordan Yates 202a9329e5 net: capture: fix doxygen parameter names
Fix parameter names in the doxygen comment to fix warnings when building
the docs.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-12 11:02:53 -04:00
Adam Matus 684a28656e net: zperf: Add periodic reporting for upload
Add option for zperf tcp upload that will enable periodic result reporting.
This is useful for monitoring performance swings during a longer session.

Signed-off-by: Adam Matus <adam.matus@nxp.com>
2024-05-10 14:45:48 -05:00
Robert Lubos 811386ef3a net: lib: http_server: Improve doxygen documentation
Add missing doxygen groups for HTTP service and server APIs.
Improve doxygen API documentation when missing.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-10 14:43:38 -05:00
Robert Lubos cb51bd007a net: lib: http_server: Remove unused struct
JSON support was dropped in the initial server implementation, so remove
a leftover struct representing it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-10 14:43:38 -05:00
Robert Lubos 8cc5193437 net: lib: http_server: Add missing extern C in headers
<zephyr/net//http/frame.h> and <zephyr/net/http/server.h> were missing
"extern C" statement.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-10 14:43:38 -05:00
Vinayak Kariappa Chettimada 3997479b49 Bluetooth: HCI: Rename to bt_hci_iso_sdu_hdr and bt_hci_iso_sdu_ts_hdr
Rename struct bt_hci_iso_data_hdr to bt_hci_iso_sdu_hdr, and
struct bt_hci_iso_ts_data_hdr to bt_hci_iso_sdu_ts_hdr.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-10 15:02:10 +02:00
Dinesh Kumar K e08ce0ed71 drivers: sensor: grow_r502a: add upload and download template
1. Add functionality for upload and download fingerprint
template data of the R502A fingerprint sensor device.
2. change data type for data_len parameter of
transceive_packet function to uint16_t as it may hold
value 256 for dowload template data to sensor.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 7ae0158e35 drivers: sensor: grow_r502a: add set/read system parameter
Add functionality for read and set system
parameter of sensor device.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 3c8bd0bc2b drivers: sensor: grow_r502a: add built-in LED control
Add LED control attribute for sensor device's
built-in LED using zephyr's led driver APIs.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K e57c6f9d2b drivers: sensor: grow_r502a: move enroll, search, delete to application
Removed fps_enroll, fps_search and fps_delete from
driver code, since they did application usage inside
driver. add the following attributes to achieve the
above functionality from application.
1. SENSOR_ATTR_R502A_CAPTURE
2. SENSOR_ATTR_R502A_TEMPLATE_CREATE
3. SENSOR_ATTR_R502A_RECORD_ADD
4. SENSOR_ATTR_R502A_RECORD_LOAD
5. SENSOR_ATTR_R502A_COMPARE

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Mayank Mahajan d1687a557c ADD: Driver for Sensor INA226
INA226 - Bidirectional Current and Power Monitor w/ I2C
Boards Tested: mr_canhubk3

Signed-off-by: Mayank Mahajan <mayankmahajan.x@nxp.com>
2024-05-09 15:46:31 +02:00
Hess Nathan ed12a0cc35 coding guidelines: comply with MISRA Rule 11.8
modified parameter types to receive a const pointer when a
non-const pointer is not needed

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-09 10:28:44 +02:00
Chekhov Ma ad2745471c drivers: mfd: add new driver "mfd_adp5585"
Add mfd_adp5585 and gpio_adp5585 driver. This driver enables ADP5585
as an GPIO expander.
This chip is used as an GPIO expander on i.MX93 EVK. GPIO pinctrl,
read/write and interrupt is supported.
Note that ADP5585 has 2 GPIO banks with 5 pins each. The driver combines
two group into a 16-bit port. Index 0~4 correspond to R0~R4 lines, index
8~12 correspond to C0~C4 lines. Index 5~7 is reserved unavailable.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-05-08 16:09:08 -04:00
Jukka Rissanen 3c9513e9cc net: http_server: Add websocket support
After upgrading the HTTP connection to websocket, call the
application registered callback to transfer the ownership of
the socket to the application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-08 15:02:16 -05:00
Jukka Rissanen 13118cf3c0 net: websocket: Create websocket_register() for http_server use
The http_server needs a way to bind a websocket socket to the
upgraded http connection socket. So websocket_register() is used
for that.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-08 15:02:16 -05:00
Jukka Rissanen 8960f13c4f net: websocket: Fix doc for websocket_recv_msg() function
The function websocket_recv_msg() documentation was missing description
for the return value.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-08 15:02:16 -05:00
Jukka Rissanen 535d4b40a8 net: lib: http_server: Upgrade from HTTP/1.1 to websocket
Allow connection to be upgraded from HTTP/1.1 to websocket.
This commit does nothing yet with the upgraded connection.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-08 15:02:16 -05:00
Jukka Rissanen 37956465e1 net: lib: http_server: Check HTTP/1.1 Upgrade field
Check what kind of upgrading we are doing and return error
if we receive upgrade that we do not support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-08 15:02:16 -05:00
Pieter De Gendt 37ac93b555 include: linker: common-rom: Remove unused http_resource_desc section
HTTP resources are assigned a section for each service, so this
iterable section isn't used.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-08 15:57:13 -04:00
Stoyan Bogdanov 3d60d551c4 dts: bindings: Add SDP-120 connector GPIO ADI
Add binding for adi SDP-120 connector and header file
with marcos to map signals using signal names.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2024-05-08 15:51:42 +02:00
Chris Friedt d6db75640d posix: barrier: remove deprecated and non-std declaration macro
Remove the deprecated macro PTHREAD_BARRIER_DEFINE().

This was deprecated prior to v3.4.0 and technically should have
been removed prior to v3.6.0.

Users should instead use the standard POSIX call,
pthread_barrier_init() to initialize a pthread_barrier_t.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-05-08 12:02:05 +02:00
frei tycho 7260b89c54 drivers: linker: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-05-08 11:59:35 +02:00
Chris Friedt 1f5960e531 doc: posix: add links and make minor corrections
Add a link to _POSIX_CLOCK_MONOTONIC, correct the
_POSIX_RAW_SOCKETS kconfig option.

Define _POSIX_CHOWN_RESTRICTED and _POSIX_NO_TRUNC so that they
conform to the spec.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-05-07 21:22:56 -04:00
Chris Friedt b1e2e4ac2c posix: fs: create a separate Kconfig option for fsync
Create CONFIG_POSIX_FSYNC to match the spec.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-05-07 21:22:56 -04:00
frei tycho 045a11fad1 debug: stack: coding guidelines: cast unused arguments to void
- added missing ARG_UNUSED

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-05-07 18:03:31 -04:00
Pieter De Gendt a2b866e6fd linker: Move iterable subalign value from header to kconfig
Add a Kconfig option for iterable section subalignment.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-07 18:01:37 -04:00
Debbie Martin 882238116e arch: arm: cortex-r: Add compiler tuning for Cortex-R82
Change the GCC toolchain configuration to make use of the Cortex-R82
target. When Cortex-R82 was added as a GCC toolchain option, the GCC
version of the Zephyr SDK did not support Cortex-R82 tuning. Zephyr was
therefore compiled compiled for the Armv8.4-A architecture. Since Zephyr
SDK 0.15.0 (which updated GCC from 10.3.0 to 12.1.0) coupled with Zephyr
3.2, the Cortex-R82 target is supported.

The Armv8-R AArch64 architecture does not support the EL3 exception level.
EL3 support is therefore made conditional on Armv8-R vs Armv8-A.

Signed-off-by: Debbie Martin <Debbie.Martin@arm.com>
2024-05-07 17:57:05 -04:00
Hao Luo d71c97f072 drivers: pinctrl: Add pinctrl driver for Apollo3 SoCs
This commit adds pinctrl support for Apollo3 SoCs.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-07 18:57:19 +02:00
Fin Maaß 7d83a8a68a lib: smf: constant number of arguments for SMF_CREATE_STATE()
This sets the number of arguments for SMF_CREATE_STATE() to always
be the same, independent of the selected Kconfig options.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-07 17:46:21 +02:00
Jonathon Penix d77dc62d19 linker: lld: cortex_m: Place .ARM.exidx sections when using lld
Currently, .ARM.exidx input sections are only handled when building with
ld. When building with lld (and depending on the orphan section handling
policy configured), a few issues can arise:

  1. lld may produce warnings about the orphan section
  2. lld may place the input .ARM.exidx sections in unexpected ways--it
     seems lld does place the .ARM.exidx input sections in the expected
     .ARM.exidx output section, but it places them at the end of the
     section (after '__exidx_end').

To resolve the possible warning and unexpected placement, explicitly
handle .ARM.exidx sections when lld is used.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-05-07 11:48:05 +02:00
Rafał Kuźnia 45d827a51a include: dts: nrf: add EXMIF pinctrl definitions
Added EXMIP pinctrl definitions, which allow selecting pin functions by
name in DTS. The definitions are added, but not used in pinctrl_nrf.c.

The nrf-regtool reads the pinctrl configuration and applies the settings
using different mechanisms.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-05-07 09:52:53 +01:00
Andries Kruithof 6a0cdb4eaa Bluetooth: CAP: Commander Reception start procedure
Add the CAP commander reception start procedure which starts reception
on one or more CAP acceptors

With the implementation of broadcast reception start procedure we also need
some mockups for unit testing

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-05-07 09:34:01 +02:00
Fin Maaß 571ad19b0d mgmt: hawkbit: change the tls certificate tag
Be able to change the tls certicicate tag.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-06 22:50:44 +01:00
Jukka Rissanen d47e0dd93e net: Add IPv6 source address selection support
Add support for IPv6 Source Address Selection defined in RFC 5014.
This commit does not add any address selection support to getaddrinfo()
as described in the RFC. The AI_EXTFLAGS symbol and also the ai_eflags
to hints is added but they are not used by the code.
The public/temporary address selection is only done internally by
the net_if_ipv6_select_src_addr_hint() according to flags set by
setsockopt().

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Jukka Rissanen f96087e257 net: Add ref counting to net_if_addr struct
Add reference counting to network interface address (for both
IPv4 and IPv6) so that the address is not removed if there are
sockets using it. If the interface address is removed while there
are sockets using it, the connectivity will fail for the said
socket.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Jukka Rissanen a7e332dc18 net: ipv6: Add Privacy Extension events to net_mgmt
Add events to be generated when privacy extension is enabled
or disabled, or when allow/deny filter is added or deleted.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Jukka Rissanen 0d085d74c4 net: ipv6: Select proper IPv6 source address for privacy extension
If IPv6 privacy extension is enabled, then we need to select
proper public or temporary IPv6 source address when sending the
packet.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Jukka Rissanen ed9a983837 net: ipv6: Initial support for privacy extension
This creates support for IPv6 privacy extensions which is described
in RFC 8981. This will also add API that can be used to add IPv6
prefixes to a allow or deny list privacy extension filter.

The code will create temporary IPv6 addresses from prefixes that
are advertised by Router Advertisement messages. The temporary
IPv6 addresses are then expired according to lifetime and removed.

Fixes #9349

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Jukka Rissanen ce4a13ae79 net: ipv6: Generate an event for deprecated address
If IPv6 address expires and moves to deprecated state, then
send a mgmt event so that listeners can act on it.
One such action is to close a socket bound to that source address
so that the address can be released.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Benjamin Lindqvist 0d14143926 net: coap_client: handle observe requests as intended
The coap_client lib only handled "one-shot" requests properly. This
patch allows it to keep listening for additional responses to a request,
if the request was made with the CoAP OBSERVE option appended.

An API for canceling such requests is also added.

Signed-off-by: Benjamin Lindqvist <benjamin@eub.se>
2024-05-06 17:31:19 +01:00
Aurelien Jarno d68e8cbfe8 drivers: clock_control: add support for MSI clock on STM32WL
Add support for the MSI clock on the STM32WL family. This is needed for
instance to set the RNG clock domain to MSI in the device tree when not
using the PLL.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-06 14:59:44 +01:00
Pieter De Gendt f147a5fec2 spelling: Replace occurrences of "iff" with "if and only if"
Spell checking tools do not recognize "iff", replace with "if and only if".
See https://en.wikipedia.org/wiki/If_and_only_if

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-06 14:58:08 +01:00
Tomasz Moń 2f24adbe0f usb: device: Do not claim to be USB 3.2 device
The bcdUSB value 0x0210 defined in USB 3.2 Specification indicates USB
3.2 device operating in one of the USB 2.0 modes. USB 2.0 Link Power
Management Addendum defines bcdUSB value 0x0201 to indicate that USB 2.0
device supports the request to read the BOS Descriptor.

The main difference between bcdUSB 0x0210 and 0x0201 is that the USB 3.2
device must support LPM, while USB 2.0 devices can (but are not required
to) support LPM.

The difference is respected by USB 3 Gen X Command Verifier (2.3.0.0)
Chapter 9 Tests [USB 2 devices], where the test behaves as follows:
  * For bcdUSB 0x0200:
      Checking Device Under Test for LPM L1 Compatibility...
      USB version of device is 2.00.
      DUT is NOT compatible with LPM.
      LPM is NOT required for DUT
      LPM is only supported in USB version 2.01 and above.

  * For bcdUSB 0x0201:
      Checking Device Under Test for LPM L1 Compatibility...
      USB version of device is 2.01.
      DUT IS compatible with LPM.
      LPM is NOT required for DUT
      USB 2.0 Extension Descriptor bmAttributes:
        LPM Capable = 0
        BESL and Alternate HIRD Supported = 0
        Baseline BESL Valid = 0
        Deep BESL Valid = 0
        Baseline BESL: 0d
        Deep BESL:  0d
      LPM is not supported

  * For bcdUSB 0x0210:
      Checking Device Under Test for LPM L1 Compatibility...
      USB version of device is 2.10.
      DUT IS compatible with LPM.
      LPM IS required for DUT
      USB 2.0 Extension Descriptor bmAttributes:
        LPM Capable = 0
        BESL and Alternate HIRD Supported = 0
        Baseline BESL Valid = 0
        Deep BESL Valid = 0
        Baseline BESL: 0d
        Deep BESL:  0d
      (USB: 9.6.2.1.6) Bit 1 in Attributes field of a USB 2.0 Extension
      descriptor returned in response to a GetDescriptor(BOS) request
      must be 1 for LS/FS/HS devices that support LPM L1.

The test fails when LPM bit is not set in USB 2.0 Extension Descriptor
only when bcdUSB is 0x0210. The test failure was incorrectly fixed in
commit 312429be3c ("usb: samples: Add Extension descriptor to webUSB
sample."). Properly fix the issue by changing bcdUSB to 0x0201 and
removing the false LPM support claim.

The false LPM claim was leading to device ceasing to work after some
time if there was no traffic from host to device (when the host is
likely to have executed the LPM L1 transition that was not properly
handled by the device).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-06 14:54:23 +01:00
Fabio Baltieri 06236ba883 drivers: ht16k33: convert from kscan to input
Convert the ht16k33 to use the input subsystem. This can still be used
with the kscan API with the zephyr,kscan-input driver, or use the
input-keymap one to generate input codes instead.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-05-06 14:53:36 +01:00
Alberto Escolar Piedras 2f5e93938b Revert "kernel: retrieve system timer clock frequency at runtime or static"
This reverts commit 7c03e5de7f.

https://github.com/zephyrproject-rtos/zephyr/pull/69705
Introduced a regression in main in which
tests/subsys/logging/log_timestamp
started failing. (See
https://github.com/zephyrproject-rtos/zephyr/issues/72344
for more info).
Let's revert the PR. It can be submitted after with the issue
fixed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-06 14:52:29 +03:00
Emil Gydesen 49d6b6bc0e Bluetooth: Fix spelling in some public header files
Fixes a few spelling mistakes

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-04 15:21:52 +01:00
Najumon B.A 7c03e5de7f kernel: retrieve system timer clock frequency at runtime or static
update kernel timeout logic based on retrieve system timer clock
frequency at runtime or static way based on Kconfig
TIMER_READS_ITS_FREQUENCY_AT_RUNTIME

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2024-05-04 13:24:12 +03:00
Pieter De Gendt 7ad76e598f include: drivers: Add missing __subsystem tags
Add __subsystem tags to driver API structs.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-03 14:44:41 +01:00