Commit graph

88715 commits

Author SHA1 Message Date
Mariusz Skamra
1cb80d3282 Bluetooth: audio: has_client: Use CONTAINER_OF to get client instance
This starts using CONTAINER_OF macro instead of inst_by_conn function
wherever possible. It's better approach as the client instance is
a container for parameters passed to the callbacks.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-12-14 09:31:59 +01:00
Alessio Lei
733b81d2c7 drivers: modem: remove dependency of modem_socket
Fixed Kconfig to remove dependency between modem_socket and
modem_context, the two do not depend on each other and
should be possible to use independently

Signed-off-by: Alessio Lei <alelei94@yahoo.it>
2023-12-14 09:31:51 +01:00
Anas Nashif
7da7768095 cmake: remove deprecated XCC_USE_CLANG
This was deprecated in 3.0, so remove it now and remove all docs related
to it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-14 09:31:45 +01:00
Andrej Butok
cc4ffb2a54 kernel: cmake: fix k_sleep compilation error for single thread
Fix k_sleep compilation error:
[build] ... syscalls/kernel.h:135: undefined reference to `z_impl_k_sleep'
for single thread applications (CONFIG_MULTITHREADING = n).
The shed.c contains source code which must be present also
in single thread applications.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-12-14 09:31:38 +01:00
Anas Nashif
28445d62c6 soc: intel_adsp: share adsp_imr_layout.h across SoC generations
This header is shared across all ace intel_adsp platforms, so move it to
a common place.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-14 09:30:13 +01:00
Declan Snyder
1011acd4d7 drivers: nxp_enet: Improve code readability
Improve code readability of this driver by simplifying and reworking
some of the source code, formatting and comments.
This commit is not meant to cause any functional difference.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-14 09:30:05 +01:00
Declan Snyder
e913ccc753 net: Add Kconfig for net buf alignment
Add a NET_BUF_ALIGNMENT kconfig to make net buffer alignment configurable.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-14 09:29:47 +01:00
Andrej Butok
263846dd67 boards: mimxrt1040_evk: add boot and slot partitions
Add boot and slot partitions for mimxrt1040_evk.
Enable MCUBoot support for it.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-12-14 09:29:35 +01:00
Armando Visconti
3fe0ffb9dc sample: board: sensortile_box_pro: extend with lis2du12 accelerometer
Extend sensor sample reading also lis2du12 accelerometer data.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-12-14 09:28:52 +01:00
Armando Visconti
23110dcfae boards: arm: sensortile_box_pro: extend with lis2du12
Extend sensortile_box_pro with lis2du12 accelerometer.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-12-14 09:28:52 +01:00
Armando Visconti
1badec4bfd drivers/sensor: add support to LIS2DU12 accelerometer
The LIS2DU12 is a linear 3-axis accelerometer with advanced digital
functions whose MEMS and ASIC have been expressly designed to build
an outstanding ultralow-power architecture in which the anti-aliasing
filter operates with a current consumption among the lowest in the
market.
This driver is based on stmemsc HAL i/f v2.3

https://www.st.com/en/datasheet/lis2du12.pdf

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-12-14 09:28:52 +01:00
Armando Visconti
858007dc93 drivers/sensor: add Kconfig.trigger_template
Add Kconfig.trigger_template to allow an extensive re-use of
trigger configuration inside all sensor drivers.

This template must be included as in the following example:

    module = LSM6DSO
    thread_priority = 10
    thread_stack_size = 1024
    source "drivers/sensor/Kconfig.trigger_template"

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-12-14 09:28:52 +01:00
Mahesh Mahadevan
3535732580 drivers: dma: Return DMA_STATUS_BLOCK or DMA_STATUS_COMPLETE
Use intA and intB fields of the DMA descriptor to decide when
the interrupt is per block versus when the transfer is complete.
This allows us to return the correct flag to the user.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-12-14 09:28:38 +01:00
Mahesh Mahadevan
7d12d654db drivers: i2s: Set DMA complete_callback flag
The MCUX LPC DMA driver now recognizes the compelete_callback
flag. Set this flag so we receive an interrupt after completion
of every block.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-12-14 09:28:38 +01:00
Mahesh Mahadevan
0dbbc3cc77 drivers: spi: Set the complete_callback flag
The MCUX LPC driver now recognizes the complete_callback
flag. We need to set this flag so we receive a callback
after every block.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-12-14 09:28:38 +01:00
Mahesh Mahadevan
4e14f73216 drivers: dma_lpc: Process complete_callback flag
Add code to recognize the complete_callback flag
and issue the callback accordingly.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-12-14 09:28:38 +01:00
Adam Wojasinski
861ccddb92 drivers: counter: counter_nrfx_rtc: Change HAL to HALY in RTC counter
NRFX has introduced HALY software layer which is a superset of HAL
and aggregates some hardware registers manipulations in a single
function calls.

Quote from nrfx changelog:

"HALY is an extension of the HAL layer that aggregates basic hardware
use cases within single functions. Now it is used instead of HAL
in the corresponding drivers."

This commit zephyr's driver to be aligned with the approach used
in nrfx, where drivers has been switched to use HALY instead of HAL.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-12-14 09:28:15 +01:00
Adam Wojasinski
b7949766e6 drivers: timer: nrf_rtc_timer: Change HAL to HALY in RTC timer driver
NRFX has introduced HALY software layer which is a superset of HAL
and aggregates some hardware registers manipulations in a single
function calls.

Quote from nrfx changelog:

"HALY is an extension of the HAL layer that aggregates basic hardware
use cases within single functions. Now it is used instead of HAL
in the corresponding drivers."

This commit zephyr's driver to be aligned with the approach used
in nrfx, where drivers has been switched to use HALY instead of HAL.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-12-14 09:28:15 +01:00
Maureen Helm
5ff4f46d9e tests: drivers: dma: Refactor tests to use data relocation
Eliminates dma tests' dependency on CONFIG_NOCACHE_MEMORY=y for
configuring dma data linker sections. This allows optionally relocating
dma source and destination data to sram or other custom linker section
on boards that don't support dma access to flash.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2023-12-14 09:27:43 +01:00
Anas Nashif
246ec224e2 lib: heap: move heap stats to own file
heap stats are split out from heap_validate.c into own file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif
d4c881da04 lib: mem_block: move to own folder
Move mem_block into own folder and seperate from lib/os and heap
configuration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif
740d0c3b50 lib: heap: make multi-heap feature configurable
Make multi-heap configurable via Kconfig and adapt existing tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif
d398e9631b lib: heap: build heap_info conditionally
Only build when needed and adapt existing users to pull this in when
needed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif
00680bd23a lib: heap: rename with files and use _
be consistent with other files in the same folder.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif
2e24e9da9e tests: shared_multi_heap: fix identifier
Adapt identifier and be consistent with other heap tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif
11365fc4f8 tests: move shared_multi_heap to tests/lib
Move shared_multi_heap test under lib alongside all other heap tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif
44381f957a tests: multi_heap: adapt test identifiers
Change identifier to match with other heap related tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif
dd2dcbed54 tests: move mheap_api_concept into tests/lib/multi_heap
Move multi-heap tests out of kernel folder along side all other heap
related tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif
b9f2ac0270 lib: heap: make heap_print_info static
This should be declated static as it is being only called in this file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif
d6d716b32a lib: heap: build heap utilities only on demand
Build the heap features only when needed and based on Kconfigs being
set.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif
4cd9c11692 lib: heap: split heap-validate.c
Split heap-validate.c into smaller chunks. We have been adding all kind
of new APIs under this file and building it unconditionally whether
those APIs are needed/used or not. Many of those APIs have nothing to do
with the validation part.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif
6cb588820f lib: os: move heap to own folder
consolidate all heap related files and implementation into one folder.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Simon Hein
64462657c9 doc: irq: fix function link
fix not correct shown function link for irq_connect_dynamic.

Signed-off-by: Simon Hein <Shein@baumer.com>
2023-12-13 20:13:46 +01:00
Jukka Rissanen
477a4a5d34 net: shell: Rename the common.h to be more unique
As the common.h is only meant to be used by the network
shell files, rename it to be more descriptive in order to
avoid possible conflicts with any other common.h file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-12-13 20:13:39 +01:00
Jukka Rissanen
37c18ddcb1 net: if: Init also dhcpv6 when interface is init
Do dhcpv6 state initialization same way as how dhcpv4 is done
when initializing network interface structure.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-12-13 20:13:31 +01:00
Jukka Rissanen
f4974ca82a net: if: Cleanup network interface init macros
Avoid using #ifdefs when declaring macros twice. This way
there is only one macro that does the initialization.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-12-13 20:13:31 +01:00
Jukka Rissanen
9bc2815c59 net: buf: Define only one pool initializer macro
Use the IF_ENABLED() macro to define the net_buf pool initializer
macro only once. This way the initializer is only defined in
one place.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-12-13 20:13:24 +01:00
Adam Wojasinski
2457a942ed boards: arm: nrf5340dk_nrf5340: Add SPI to supported peripherals
The target has board configuration for spi_flash sample but bacause
of the lack of SPI mentioned in supported peripherals Twister
is filtering out the target for sample.drivers.spi.flash test.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-12-13 20:13:16 +01:00
Florian La Roche
fdcfec0328 drivers: entropy: entropy_esp32.c: remove not necessary cast
This cast already has the correct type on both sides, so it
can be removed.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2023-12-13 20:12:54 +01:00
Florian La Roche
6621e780c9 lib: libc: minimal: proper cast to "(char *)" from "(const char *)"
The string "" is of type '(const char *)', so add a cast over to
'(char *)' to clean up source code.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2023-12-13 20:12:45 +01:00
Johann Fischer
9566419300 samples: usb: use common sample USBD initialization
Use the common USBD sample initialization helper where new USB device
support has already been added.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-12-13 17:52:00 +01:00
Johann Fischer
b00a998cf1 samples: usb: add common USB device instantiation and initialization
There is common code for the new USB device support in the samples to
instantiate USB device, descriptors, configuration and initialize USB
device. Add common code that can be used for the simple usecase with a
single USB device and single configuration.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-12-13 17:52:00 +01:00
Johann Fischer
52686a8308 usb: device_next: simplify way to set/change triple code
Usually we want set all values of code triple Base Class, SubClass, and
Protocol at once. Merge existing functions to set code, subcode,
protocol into just one helper to set code triple.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-12-13 17:52:00 +01:00
Luca Burelli
2c7ea1dde5 llext: autoselect CACHE_MANAGEMENT on supported targets
Targets that have a data cache must enable CACHE_MANAGEMENT to allow the
llext API to flush it when loading an extension. This patch forces the
flag to be enabled when the target has a data cache.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2023-12-13 15:22:07 +00:00
Luca Burelli
8887402290 llext: fix: use proper global #define for cache flush
The arch_* functions are architecture-specific and may not be defined in
all targets. Use the global alias defined in the Cache API instead.

Fixes #66382.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2023-12-13 15:22:07 +00:00
Georgij Cernysiov
9f3d9f7594 drivers: spi: stm32: disable cs when spi is done
Deassert CS after SPI is done.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
Co-authored-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2023-12-13 13:58:03 +01:00
Evan Perry Grove
6df4576249 tests: drivers: Add nucleo_f722ze board support
Add overlays for the adc_api and counter_basic_api tests. Support
Nucleo F722ZE in the dac_api test.

Signed-off-by: Evan Perry Grove <evan@4grove.com>
2023-12-13 13:57:55 +01:00
Evan Perry Grove
f93ea05895 boards: arm: Add support for ST NUCLEO F722ZE
Introduce support for ST Nucleo F722ZE, an evaluation board based on
the STM32F722ZET6U microcontroller.

Signed-off-by: Evan Perry Grove <evan@4grove.com>
2023-12-13 13:57:55 +01:00
Evan Perry Grove
a54a52b085 dts: arm: Add support for STM32F722 SoC
The STM32F722 is similar to the STM32F723, but lacks the latter's
more advanced USB PHY. Otherwise, they are virtually identical.

Signed-off-by: Evan Perry Grove <evan@4grove.com>
2023-12-13 13:57:55 +01:00
Anders Storrø
25d44a828d Bluetooth: Mesh: Rename prov_dev->provisionee
Renames "prov device" references and options to
"provisionee" to align implementation with Mesh
Protocol specification v1.1, section 5.4.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-12-13 13:57:46 +01:00