Commit graph

11963 commits

Author SHA1 Message Date
Daniel Leung c972ef1a0f kernel: mm: move kernel mm functions under kernel includes
This moves the k_* memory management functions from sys/ into
kernel/ includes, as there are kernel public APIs. The z_*
functions are further separated into the kernel internal
header directory.

Also made a quick change to doxygen to group sys_mem_* into
the OS Memory Management group so they will appear in doc.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-20 09:19:14 +01:00
Andriy Gelman 0d1fa268bb drivers: clock_control: Add PWM clock device
Adds a clock control device for a PWM node, allowing the PWM
to be controlled using the clock control API.

It is a similar idea to the device driver in linux:
linux/Documentation/devicetree/bindings/clock/pwm-clock.yaml

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-11-20 09:18:44 +01:00
Jun Lin 317d070222 tests: timer_behavior: increase stdev tolerance for npcx timer
Change the stdev tolerance stdev from 10 to 33 when npcx timer is used.
This is because the clock source of npcx event timer, which is used to
generate the timeout interrupt, is running at 32.768 KHz.
(i.e. 1 count = ~30.5 us.) The conversion from the absolute system timer
to the event timer count might have -30.5 ~ 30.5 deviation.
The tolerance setting is under the assumption that test sampes are
evenly located at 1030.5 and 969.5 for the worst case.

Fixes #59594

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-11-17 17:24:14 +00:00
Ian Morris 4c92419546 drivers: sensor: hs300x: Add driver for Renesas HS300x sensors
Adds support for Renesas HS3001 and HS3003 temperature/humidity sensors
connected via an I2C bus.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2023-11-17 10:33:02 -06:00
Anas Nashif f25e2201a4 tests: fix various test identifiers
Fix a few inconsistent test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-17 09:27:40 +01:00
Flavio Ceolin eb323be088 tests: smbus: Fix user mode usage
APIs that set callback don't have syscalls and their
tests have to run in supervisor mode.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-11-17 09:22:05 +01:00
Lingao Meng 2cd8d40b97 Bluetooth: Mesh: Split Model Structure
Split Model Variables to separate structue.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2023-11-16 16:52:14 +01:00
Lingao Meng ab08f34fd9 Bluetooth: Mesh: Make bt_mesh_model as rodata
Since model struct most of member should not change at run time,
so mark as const will be suitable and safely.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2023-11-16 16:52:14 +01:00
Lucas Tamborrino 16629cbabd tests: coredump: Remove matching pattern
On xtensa architectures the string "ZEPHYR FATAL ERROR"
comes after the coredump itself. The ordered regex will
incorrectly fail for this arch.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-11-16 09:30:19 +01:00
Andriy Gelman a34d4d1ce9 drivers: spi: xmc4xxx: Fix potential runtime error
Fixes an unhandled interrupt runtime crash if CONFIG_SPI_XMC4XXX_DMA=y and
CONFIG_SPI_XMC4XXX_INTERRUPT=n.

The unhandled interrupt error is triggered because irq_enable() was called
without calling IRQ_CONNECT() when CONFIG_SPI_XMC4XXX_INTERRUPT=n.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-11-16 09:26:50 +01:00
Armando Visconti d17b1c8cbb tests: build_all: sensor: fix i2c.dtsi typo
Fix lps22df i2c address in order to be unique.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-16 06:56:31 +00:00
Anas Nashif d94bdafda6 tests: clock_control: cleanup test tags and unify them
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif 153e6d9dc7 tests: uart: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif 743564e89e tests: dac: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif 131aa56900 tests: i2c: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif d9d7e6a2f4 tests: watchdog: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif 9ff81c1541 tests: pwm: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif 093f9a9df2 tests: adc: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Fabio Baltieri 256bc860cf input: add a gpio based keyboard matrix driver
Add a GPIO based keyboard matrix driver using the generic keyboard
matrix code.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-15 11:41:25 +01:00
Mariusz Skamra 71494dd98f tests: bluetooth: ascs: Add test for ASE notificaion retry
This adds test for ASE state notification retry. The test verifies
whether the state transition is repeated if failed due to notification
error.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-11-15 10:03:07 +01:00
Mariusz Skamra 341e571cfb tests: audio: mocks: Add k_work_schedule mock implementation
This adds k_work_schedule mock implementation that will be used in
bluetooth audio unit tests.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-11-15 10:03:07 +01:00
Krzysztof Chruściński 1ec05c4431 tests: drivers: Add dependency to UART runtime configuration
Force enabling of the UART runtime configuration in UART tests.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-11-15 10:02:18 +01:00
Henrik Brix Andersen c56bfb9d06 tests: drivers: can: shell: add tests for setting raw timing
Add CAN shell tests for the "timing" and "dtiming" subcommands.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-15 10:01:59 +01:00
Lingao Meng e1d4451976 bsim: bluetooth: mesh: Increase Net Transmit Count value on the node
This is to increase probability of reception of responses (Config Status
messages) from the node when the provisioner sends a Set message and the
node response with a Status message at the same time so that the message
collide.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2023-11-15 10:01:47 +01:00
Greter Raffael 8ed4876bed tests: kernel: also move the test_isr_dynamic to new ztest API
`test_isr_dynamic` for `CONFIG_GEN_SW_ISR_TABLE=n` was somehow
overlooked in commit b7f1e98724.

I'm disabling the irq at the end of the test. The babblesim for the
`nrf5340bsim_*` target walked into a timeout otherwise.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2023-11-15 10:01:22 +01:00
Yong Cong Sin f5a27bcfe3 tests: logging: uart: increase test coverage
The test should work on any boards with UART console, so
increase the test coverage by adding `CONFIG_UART_CONSOLE`
filter and using `qemu_x86` as `integration_platforms` instead
of `platform_allow`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-14 12:26:48 -05:00
Emil Gydesen 15cbe0f890 tests: Remove use of CONFIG_ZTEST_NEW_API
The test was enabling CONFIG_ZTEST_NEW_API which
was recently removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-14 11:14:10 +01:00
Alberto Escolar Piedras 74d22a4b35 tests/drivers/eeprom: Several fixes and improvements
* Fix app path in documentation
* Move the at24 emulator overlays to be general instead of
  native_posix specific
* Switch default test platform from native_posix to native_sim
* From build only test, exclude platforms which are used
  in the build and run test.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 11:11:53 +01:00
Alberto Escolar Piedras 8d4d5184c6 tests/drivers/accel: Switch from native_posix to native_sim
Switch the overlays and default test platform to native_sim
from native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 11:11:53 +01:00
Christopher Friedt 2fc19aa033 tests: lib: c_lib: tests for C11 call_once()
Add tests for C11 call_once().

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-14 18:23:42 +09:00
Christopher Friedt 44a431bbba tests: lib: c_lib: tests for C11 thread-specific storage
Add tests for C11 thread-specific storage.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-14 18:23:42 +09:00
Christopher Friedt 70b03111eb tests: lib: c_lib: tests for C11 condition variables
Add tests for C11 condition variables.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-14 18:23:42 +09:00
Christopher Friedt 0c2da383d3 tests: lib: c_lib: add tests for C11 mutexes
Add tests to cover C11 mutexes

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-14 18:23:42 +09:00
Christopher Friedt ded97fd5b3 tests: libc: add tests for iso c11 threads
Add tests to verify functionality of the C11 `<threads.h>` API.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-14 18:23:42 +09:00
Christopher Friedt dd27dff492 tests: lib: c_lib: separate libc tests into smaller suites
C library testing is mainly there to support what is
necessary to support Zephyr. We do test a variety of libcs
currently, which is where YAML comes in handy.

However, the main libc testsuite can be overkill for testing
some things, and might not be suitable for testing optional
features.

Create a 'common' subdirectory for common libc tests.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-14 18:23:42 +09:00
Vinayak Kariappa Chettimada 09c69731cd Bluetooth: Controller: Reduce RTN for requested Max Transport Latency
Add implementation to reduce CIG's CIS retransmissions so as
to meet the Host requested Maximum Transport Latency.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-11-14 09:46:02 +01:00
Jilay Pandya 8ebbd0227d sensors: tests: adi: increase coverage
This commit adds tests for various configurations of adltc2990

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2023-11-14 09:23:47 +01:00
Andrei Emeltchenko a3ff8d5b90 tests: samples: Add up_squared_pro_7000 overlay
Add up_squared_pro_7000 overlay for watchdog test and sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-11-14 09:23:18 +01:00
Kamil Piszczek ae05c5ea30 tests: bsim: bluetooth: host: privacy: peripheral: test rpa sharing mode
Added a new configuration to the BabbleSim Bluetooth Peripheral Privacy
test to cover the code path for the RPA sharing mode.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2023-11-14 09:22:51 +01:00
Kamil Piszczek f6d6742ca1 bluetooth: id: make sharing RPA between adv sets optional
Added a Kconfig option that makes the RPA sharing feature optional. By
default, the Zephyr Bluetooth stack now uses the RPA rotation policy
that was active before the introduction of the RPA sharing functionality
in the following PR:

https://github.com/zephyrproject-rtos/zephyr/pull/55449

The new Kconfig option configures the advertising sets linked with the
same Bluetooth identity to use the same Resolvable Private Address in
a given rotation period. After the RPA timeout, the new RPA is
generated and shared between the advertising sets in the subsequent
rotation period.

When this option is disabled, the generated RPAs of the advertising
sets differ from each other in a given rotation period.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2023-11-14 09:22:51 +01:00
Krzysztof Chruściński 8ba4249ef7 tests: drivers: uart: Add test for uart_async_rx
Add test for helper module for handling asynchronous RX.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-11-14 09:21:46 +01:00
Alberto Escolar Piedras 327f75ec35 tests/bluetooth/tester: Enable in native_sim
Enable this test in the native_sim target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 09:52:34 +02:00
Marc Desvaux 32e1d06a3c tests: drivers: i2c: i2c_target_api add nucleo_wb55rg
Adds necessary overlay nucleo_wb55rg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-11-13 16:54:42 -06:00
Marc Desvaux 3548ffe053 tests: drivers: i2c: i2c_target_api add nucleo_wb55rg
Adds nucleo_wb55rg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-11-13 16:54:42 -06:00
Marc Desvaux c1a6cfdf9b tests: drivers: i2c: i2c_target_api add b_u585i_iot02a
Adds necessary overlay b_u585i_iot02a in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-11-13 21:31:39 +00:00
Marc Desvaux 619d2fd887 tests: drivers: i2c: i2c_target_api add b_u585i_iot02a
Adds b_u585i_iot02a in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-11-13 21:31:39 +00:00
Marc Desvaux c19ba8ffe9 tests: drivers: i2c: i2c_target_api add stm32f3_disco
Adds necessary overlay stm32f3_disco in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-11-13 21:29:46 +00:00
Marc Desvaux 56dd8f90cd tests: drivers: i2c: i2c_target_api add stm32f3_disco
Adds stm32f3_disco in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-11-13 21:29:46 +00:00
Jeppe Odgaard a1b16d3151 tests: build_all: sensor: i2c: add explorir_m
Add ExplorIR-M uart node in the build_all tests.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-11-13 12:14:08 -05:00
Lucas Denefle f9d0a4c5cf drivers: modem: add Quectel EG25-G
This commit introduces support for the modem EG25-G from Quectel.

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2023-11-13 10:10:15 -06:00