Commit graph

106070 commits

Author SHA1 Message Date
Dominik Ermel
d31ad05d75 Revert "tests/storage/flash_map: Support for no flash_area_open"
This reverts commit 29f7f53f85.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-27 10:36:55 -05:00
Yang Jialong
5a3f0b9506 arch: riscv64: smp: get msip base address from dts
In most implements, the msip base address is 0x2000000. But the address
is not fixed in all boards.

Signed-off-by: Yang Jialong <yangjialong@vcore.com>
2024-11-27 06:58:57 -05:00
Dominik Ermel
29f7f53f85 tests/storage/flash_map: Support for no flash_area_open
The commit removes flash_area_open usage from tests, where it is not tested
and only used to obtain area.
The commit adds tests for flash_area_device_is_ready.
The commit adds test for flash_area_sectors, which is equivalent
of flash_area_get_sectors but takes flash area object instead of flash
area index.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-27 06:58:43 -05:00
Dominik Ermel
b50dc43a26 storage: flash map: Add flash_area_sectors
The commit adds flash_area_sectors function that allows to get information
on sector/erase page layout by flash_area object pointer instead of
index.
The only difference between flash_area_sectors and flash_area_get_sectors
is that the later calls flash_area_open internally and as such requires
flash map to be compiled in.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-27 06:58:43 -05:00
Dominik Ermel
1f1dc372cd storage: flash map: Add FIXED_PARTITION(label) macro
The commit adds FIXED_PARTITION(label) macro that allows to obtain
struct flash_area object for partition of given label.
The macro allows instantiation of partition at point of usage
and will be replacing need for defining flash map with all partition
entries.
Area obtained with the macro should not be passed to open, instead
flash_area_device_is_ready, basically equivalent of device_is_ready
should be called on the obtained pointer to check if area is ready
for use.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-27 06:58:43 -05:00
Anas Nashif
48ddfe7c4a twister: filters: add ability to filter by vendor
add vendor_allow and vendor_exclude to the list of filters. The vendor
data is maintained in the board.yml files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-27 06:58:23 -05:00
Fin Maaß
a45e5f0424 drivers: spi: remove unused register
core_mmap_dummy_bits is not used by the
driver and also optional in litex.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-27 06:58:11 -05:00
Pieter De Gendt
3bf519de38 ci: compliance: Rebase on the target branch before running compliance
Prior to running the compliance checks, we rebase the PR onto the target
branch to check the compliance state as if we were merged.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-27 06:57:52 -05:00
Ilya Tagunov
b3a943d2d5 Revert "tests: posix: common: userspace: temporarily disable qemu_arc_em"
This reverts commit f415724831.
This is fine, as the underlying issue is solved.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-27 06:57:23 -05:00
Ilya Tagunov
3068f668d9 scripts: process_gperf: upgrade the asso_values type to unsigned short
The gperf tool automatically selects the optimal data type for the
asso_values table, depending on MAX_HASH_VALUE. However, there is
a corner case when the tables generated on different stages of the
build process have different data types, causing a link-time error.
Upgrade the data type for the table from unsigned char to unsigned
short to at least exclude this 8-bit to 16-bit transition. There is
another potential issue with the 16-bit to 32-bit transition, but
it seems not very likely to have 65k kernel objects anytime soon.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-27 06:57:23 -05:00
Josuah Demangeon
5be4aed620 doc: releases: 4.1: add notes/migration guide for video CID rename
The video CIDs got changed, and users will be impacted and need to
rename some constants. Offer a strategy for finding the new names in
the migration guide for the upcoming release.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-11-27 10:31:54 +01:00
Josuah Demangeon
8c226b98ac drivers: video: controls: document each control and move classes
Make controls more readable and intuitive to extend, with definition
of each control value to help disambiguate between similar controls,
such as BRIGHTNESS vs GAIN.

Move the class definition to the top of each relevant class, like it
is on Linux for the V4L2_CID_..._CLASS_BASE variables.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-11-27 10:31:54 +01:00
Josuah Demangeon
217f053ccd drivers: video: controls: rename controls to Linux-like names
This uses Linux V4L2 controls as a reference to give names to the
CIDs. Apply the renaming down to the drivers that use them.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-11-27 10:31:54 +01:00
Josuah Demangeon
9a6df717f0 drivers: video: controls: Sort controls according to their class
Now that Control IDs have different classes, sort them to their
apropriate classes sections.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-11-27 10:31:54 +01:00
Josuah Demangeon
d96b3725e4 drivers: video: controls: use the same CID numbers as Linux
Refers to the CID numbers found in the Linux Kernel so that each CID
of Zephyr matches the CIDs of Linux. The new CIDs introduced in
Zephyr can then follow the same number and naming found on Linux.

No renaming of the CID macro names is done yet.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-11-27 10:31:54 +01:00
Josuah Demangeon
962da420cd drivers: video: controls: use the same classes IDs as Linux
The V4L2 and V4Z list of control IDs are slightly different. Use the
same CIDs as Linux, with the exact same numbers to facilitate debug
and co-development.

This also rename the GENERIC class into BASE as in Linux. No change
in the video CIDs names in this commit.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-11-27 10:31:54 +01:00
Olivier Lesage
e2435d0061 bluetooth: samples: Remove auto phy update from connected CS samples
Unless the PHY is managed by LE power control, the CS procedure phy
needs to match the ACL phy.

Disabling the auto phy updates keeps the ACL on 1M.

The alternative would be to read the current phy by enabling
BT_USER_PHY_UPDATE but this still doesn't work if the phy is changed
after being read.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-11-27 10:31:25 +01:00
Olivier Lesage
15aabd3605 bluetooth: samples: Wait for encryption before starting CS setup
Handling the security changed callback was missing, so it could happen
that the sample would try to read remote capabilities before the link
was encrypted, which is not allowed.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-11-27 10:31:25 +01:00
Olivier Lesage
b72300f7d8 bluetooth: host: document that step_data_buf can be NULL
If the controller reports 0 steps in the subevent results, the pointer
is NULL.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-11-27 10:31:25 +01:00
Olivier Lesage
080250716c bluetooth: host: cast LE_CS_TIME_DIFFERENCE_NOT_AVAILABLE explicitly
The special value 0x8000 is just outside the range of an int16_t,
so this should help make sure whatever overflow behavior is entered
by using the step data structs on protocol bytes is the same as this
macro.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-11-27 10:31:25 +01:00
Olivier Lesage
480f8aa887 bluetooth: host: Use LOG_WRN for failed CS procedures
These can indicate that something about the user configuration needs to
be changed.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-11-27 10:31:25 +01:00
Théo Battrel
66ff97e69b Bluetooth: Host: Deprecate BT_BUF_ACL_RX_COUNT symbol
Because the number of ACL RX buffers must be at least the number of
maximum connections plus one, increasing `CONFIG_BT_MAX_CONN` could
inadvertently lead to a build failure if the number of ACL RX buffers is
not also increased. This dependency may not be obvious to users.

To address this issue, this commit deprecates the
`CONFIG_BT_BUF_RX_COUNT` Kconfig symbol and computes the value in
`buf.h` using the new `BT_BUF_RX_COUNT` define. Note that the default
value and the minimum range value have been changed to 0 to "disable"
the option.

Additionally, to allow users to increase the number of ACL RX buffers,
this commit introduces the new `CONFIG_BT_BUF_RX_COUNT_EXTRA` Kconfig
symbol. The value of this symbol will be added to the computed value of
`BT_BUF_RX_COUNT`.

The configurations of tests and samples have been updated to reflect
these changes.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-11-27 10:30:59 +01:00
Johan Hedberg
9b19a90daa samples: bluetooth: Add build asserts for VS-using samples
The README files of these samples already indicate that they use the
Zephyr-specific HCI vendor extensions, but this may still not be clear
enough to some users, as evidenced in #81779. Add build asserts to make
sure the samples only build when Zephyr VS extensions have been enabled.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-27 10:30:32 +01:00
Johan Hedberg
534b54b6da samples: bluetooth: hci_pwr_ctrl: Add devicetree overlays for qemu
This sample requires Zephyr HCI vendor extension support by the used
Bluetooth controller. In the case of qemu this needs to be explicitly
indicated by enabling the corresponding devicetree property.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-27 10:30:32 +01:00
Jilay Pandya
719cd2639c drivers: stepper: refactor set_actual_position to set_reference_position
This commit refactos set_actual_position to set_reference_position.
stepper_set_reference_position is more apt in regards to what this func
actually does

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-27 10:29:47 +01:00
Mark Wang
fb811f1599 bluetooth: ssp: support pairing_accept for ssp
when receiving the io cap request from controller, call
pairing_accept to check whether application accept the
pairing. If no, reply BT_HCI_OP_IO_CAPABILITY_NEG_REPLY.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-11-27 10:29:36 +01:00
Luca Burelli
56fd854423 llext: fix minor Coverity issue #434586
The check combination of "is zero" and then "less than zero" leaves open
the theoretical possibility of a positive return value, which would
continue on with an uinitialized 'rela'.

Checking for "not zero" has the same effect and covers all situations.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-27 10:29:23 +01:00
David Pinho
141f8b3858 doc: build: dts: bindings-syntax: node typo
Replace 'node' with 'property' in a sentence.

Signed-off-by: David Pinho <david.pinho@gmail.com>
2024-11-27 10:29:14 +01:00
Gerard Marull-Paretas
f812de2026 drivers: input: gpio_keys: select GPIO
Instead of depending on GPIO. This allows to just enable
CONFIG_INPUT=y + DT node in the application layer. The same
pattern is nowadays followed by most drivers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-27 10:29:04 +01:00
Dmitrii Golovanov
113875d53c twister: testplan: Detect duplicates on --no-detailed-test-id
Detect duplicate TestSuites on load, and raise error when it happens
with `--no-detailed-test-id` option which shortens TestSuite name
excluding the test project path prefix, thus increasing chances
for duplicates. Without this check, only the last duplicated
test configuration was selected while others silently ignored.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-27 08:19:39 +01:00
Dmitrii Golovanov
89466f9d7e twister: testplan: Fix duplicate scenarios error reporting
Fix duplicate test scenario error reporting to show paths to all
twister.yaml configuration files where these duplicates were found.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-27 08:19:39 +01:00
Tomáš Juřena
b4dcdaaeab drivers: sensor: ti: ina230: Fix dts warning if INA230_TRIGGER enabled
Updates the Kconfig condition to support trigger functionality for INA236.
This will get rid of `warning: INA230_TRIGGER (defined at
drivers/sensor/ti/ina23x/Kconfig:43) was assigned the value 'y' but got
the value 'n'.` if INA230_TRIGGER is enabled.

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2024-11-27 08:18:57 +01:00
James Roy
ef8f037e78 device: Optimize device_get_binding search efficiency
Optimize 'device_get_binding' function search so that
when a matching device is found, it returns NULL if
it is not ready.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-11-27 08:18:30 +01:00
Manuel Argüelles
c11d4cc3b7 dts: nxp: s32: fix edma compat
Convert the eDMA compat to prop version for NXP S32Z2 SoC
that was missed in commit b070da7c33.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-11-27 08:18:06 +01:00
Vinayak Kariappa Chettimada
478cace022 Bluetooth: Controller: Fix minimum offset for subsequent CISes
Fix CIS offset calculation by Central for subsequent CISes
such that when compensating for dissimilar ACL and ISO
intervals, ensure that minimum offset does not cause a
collision between the ACL and the CIS event at the instant.

Fixes commit 3b3d53f09e ("Bluetooth: Controller: Fix CIS
offset_min for dissimilar interval").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-27 08:17:50 +01:00
Gerson Fernando Budke
cffb66f5c6 drivers: rtc: sam: Add platform on API test coverage
The #81456 fixed the driver issue related to issue #81454. This add
the RTC configurations on sam_v71_xult board to enable test coverage.

Fixes #81454

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-11-27 08:17:37 +01:00
Pisit Sawangvonganan
08fe69cc3c net: wifi: shell: enhance consistency in __wifi_args_to_params
Several arguments were added but have not yet been aligned with others
in the same function. Hence, use `getopt_state` to access `optarg`,
offering a better alternative to direct global access.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-27 08:17:15 +01:00
Pieter De Gendt
5d9a0cba9b ci: compliance: Install python packages from requirements
Instead of maintaining two lists, use the requirements file for
installing compliance dependencies.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-27 08:16:58 +01:00
Aytürk Düzen
55bc3acf58 tests: bluetooth: tester: make hci_ipc confs generic for multi-core
nrf5340_hci_ipc.conf and nrf5340_hci_ipc_cpunet.conf were board specific
rename them for generic multi-core board support

Signed-off-by: Aytürk Düzen <ayturk.duzen@nordicsemi.no>
2024-11-27 08:16:50 +01:00
Marvin Ouma
3977703ebb tests: posix: common: separate posix c_lib_ext to standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves fnmatch, getopt and getentropy
into a singular testsuite at tests/posix/c_lib_ext app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-27 08:16:35 +01:00
Aleksander Wasaznik
18fd49ea0e Bluetooth: Tester: Increase config values to make tests pass
Without this PTS tests do not pass. These values are copied from a
commit aimed at unifying the prj.conf files in this directory. I do not
know which of these are strictly necessary to make the tests pass.
Copying them all poses no harm since the unification will be done later
anyway.

Co-authored-by: Szymon Janc <szymon.janc@codecoup.pl>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-11-27 08:16:18 +01:00
Aleksander Wasaznik
5a8daffc32 Bluetooth: Tester: Use BT_L2CAP_SEG_RECV for L2CAP tests
This API gives better control on L2CAP COC credits and suits better
for Upper Tester implementation.

Co-authored-by: Szymon Janc <szymon.janc@codecoup.pl>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-11-27 08:16:18 +01:00
Szymon Janc
c002b1dc9e Bluetooth: Host: L2CAP: Fix seg_recv call on SDU overflow
This fix calling seg_recv() callback being called even though channel
is being disconnected due to SDU overflow.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-11-27 08:16:18 +01:00
Vinayak Kariappa Chettimada
31f37a5c29 tests: bsim: Bluetooth: Enable some high reliability CAP tests
Enable some high reliability CAP tests by increasing ISO Tx
buffer counts in the Controller to sufficiently generate
number of complete when multiple SDUs are transmitted in
single ISO interval with use of pre-transmissions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-27 08:15:32 +01:00
Vinayak Kariappa Chettimada
5787d7340e tests: bsim: Bluetooth: Align audio test Controller Kconfig
Align audio test Controller Kconfig value same as used with
nRF53bsim.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-27 08:15:32 +01:00
Vinayak Kariappa Chettimada
7e74a046a1 Bluetooth: Controller: Fix ISO Sync Receiver is_abort_cb
Fix ISO Sync Receiver implementation to correctly prevent
subevent from pre-empted in the unreserve time space.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-27 08:15:32 +01:00
Vinayak Kariappa Chettimada
396692c723 Bluetooth: Controller: Fix ISO Sync Receiver time reservations
Fix ISO Sync Receiver time reservation calculation to use
peer broadcasted bis_spacing and sub_interval, instead of
incorrectly calculating using local implementation used
tMSS value.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-27 08:15:32 +01:00
Vinayak Kariappa Chettimada
a7a199d6de Bluetooth: Controller: Fix ISO Sync Receiver skipped ISO SDU
Fix ISO Sync Receiver implementation to correctly reflect
the payload number and timestamp for the skipped SDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-27 08:15:32 +01:00
Pieter De Gendt
d6b1de1cc8 doc: kernel: drivers: Update with DEVICE_API macros
Update the device driver API documentation with the new DEVICE_API
macro definitions and how to use them.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-27 08:15:22 +01:00
Pieter De Gendt
f29203d575 tests: kernel: device: Add API sections tests
Add tests for the subsystem_api to validate runtime API section checks.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-27 08:15:22 +01:00