Commit graph

81582 commits

Author SHA1 Message Date
Christopher Friedt 748683fae6 posix: eventfd: remove redundant conditional
Since the argument is a 32-bit unsigned int, all possible
values satisfy the condition that intval < UINT64_MAX - 1.

Remove the redundant conditional.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-07-21 06:33:19 -04:00
Tim Lin 995444d5a9 ITE: drivers/i2c: Modify the condition of assert
Channel B or C do not necessarily have to use FIFO mode.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-07-21 10:30:42 +00:00
Ryan McClelland f851d2a61b tests: lib: c_lib: fix test_sqrt double promotion warnings
Double promotion warnings are generated with the flag -Wdouble-promotion
Exponent was defined as a float, but was really be used a double here
Change the type of exponent in sqrt from float to double.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-07-21 06:30:32 -04:00
Carlo Caione d24880e358 test: Exclude qemu_cortex_a53_smp from portability.posix.eventfd
The test is failing for (so far) unknown reasons, blocking several PRs.
Exclude it until a proper investigation finds the root cause.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-21 06:23:00 -04:00
Alberto Escolar Piedras b69cd3cbc1 manifest: Update nRF HW models to latest
Which include a more complete model of the CLOCK peripheral.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-21 08:47:53 +02:00
Alberto Escolar Piedras b3f0a08512 doc: nrf52_bsim: Update list of supported peripherals
The GPIO, GPIOTE and FICR are now also modelled
to a reasonable degree.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-21 08:47:53 +02:00
Paul He 278563ed45 drivers: input: gt911: fix error 'ret' undeclared
When CONFIG_INPUT_GT911_INTERRUPT is set to 'y', it will get this
undeclared error, now fix it.

Signed-off-by: Paul He <pawpawhe@gmail.com>
2023-07-20 20:52:19 +00:00
Al Semjonovs f856e7ba63 icm42688: Fix channels read BIT shift error
channel_pos_read bit was being cleared with a sensor channel enum value
instead of the encoded bit position.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-07-20 14:19:20 -05:00
David Leach 3038a3c4e0 MAINTAINERS: Add manuargue to NXP HAL maintainer list
Add manuargue to NXP HAL maintainer list

Signed-off-by: David Leach <david.leach@nxp.com>
2023-07-20 15:15:58 -04:00
Daniel Leung 4c80949ecf libc: remove no longer valid kconfig comment
After commit 9a0aebc5fd,
the exclusion of qemu_x86_tiny is no longer and the "depends on"
option was removed. However, the comment about that remained.
Remove the comment as it is no longer valid.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-07-20 12:58:36 -04:00
Flavio Ceolin ed8355ad3f kernel: userspace: Fix memory leak
Fix memory leak on dynamic object allocation.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-20 16:10:32 +00:00
Flavio Ceolin cbbe6d2ab7 kernel: userspace: Simplify dinamyc objects
There is not need to have two types to represent dynamic objects.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-20 16:10:32 +00:00
Tom Burdick 34a24ec4cd docs: RTIO documentation updates
Updates docs to account for the large number of changes that have
occured since the initial documentation was written.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-07-20 12:00:50 -04:00
Nerijus Bendžiūnas 7c08a9b6ad doc: fix FIXED_PARITION_ID typo
It seems flash_map.rst is the only place for this typo.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
2023-07-20 11:49:28 -04:00
Jamie McCrae a4d56e4f55 tests: boot: mcuboot_recovery_retention: Fix configuration issue
Fixes an issue with the tests whereby the RAM memory configuration
files were not being used, and could not be passed to the mcuboot
image.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-20 15:13:49 +00:00
Jamie McCrae ee5c9b2629 mgmt: mcumgr: grp: img_mgmt: Add image data written callback
Adds an optional callback upon image data being written, can be
used for syncing or timeout purposes.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-20 14:55:46 +00:00
Jamie McCrae 6c541e1af0 mgmt: mcumgr: Add event ID index callback function
Adds a function which gets the callback ID index of a given
event ID.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-20 14:55:46 +00:00
Lukasz Mrugala a9a6df9b50 scripts: tests: Environment tests update
Implemented style changes proposed by gchwier previously.
Tests updated according to fixes in environment.py in
  * PR #60526
  * commit d72c434
  * commit 7afeefd

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-07-20 16:25:31 +02:00
Benjamin Cabé 779636415c lib: cbprintf: doc: Doxygen cleanup
Fixed a couple typos and added @deprecated tags for deprecated macros.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-20 16:25:22 +02:00
Erwan Gouriou c6e03d1ec4 boards: nucleo_wba: Document entropy support
Update documentation and yaml file

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-07-20 16:25:02 +02:00
Erwan Gouriou 9e2e3cf090 tests: driver: counter: Add stm32wba target
Add stm32wba target to verify driver implementation

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-07-20 16:25:02 +02:00
Erwan Gouriou a59182d73b dts: stm32wba: Add counter node on timer1
Counter node was missing for this timer

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-07-20 16:25:02 +02:00
Guillaume Gautier 276b5577cb samples: drivers: adc: boards: Add overlay for NUCLEO_WBA52CG
Add overlay for NUCLEO_WBA52CG

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-20 16:25:02 +02:00
Guillaume Gautier bd0a0e40e2 tests: drivers: pwm: pwm_loopback: board: Add NUCLEO_WBA52CG
Add NUCLEO_WBA52CG board to the PWM loopback test

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-20 16:25:02 +02:00
Erwan Gouriou 30061ecd7f tests/drivers/clock_control: Add tests for stm32wba_core
Add tests to validate implementation of stm32wba clock_control driver.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-07-20 16:25:02 +02:00
Tom Burdick 0b6b970f0a sensors: icm42688: Do not force rc oscillator
Forcing the usage of the RC oscillator and keeping it on turns out
to have detrimental effects to the readings by default. The default
clock mode settings are perfectly fine.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-07-20 16:24:46 +02:00
Robert Lubos 5c5be08ba9 drivers: ieee802154_nrf5: Use generic symbols for packet size
Use generic symbols defined in ieee802154.h for packet/FCS size instead
of redefining them in the driver header.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-20 16:24:26 +02:00
Robert Lubos cf58d11f8f drivers: ieee802154_nrf5: Add payload length check on TX
In case upper layer does not follow the convention, and the net_pkt
provided to the nRF 15.4 driver had a payload larger than the maximum
payload size of an individual 15.4 frame, the driver would end up with
buffer overflow.

Fix this by adding an extra payload_len check before attempting to copy
the payload to the internal buffer.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-20 16:24:26 +02:00
Jai Arora 7daaad454a docs: update posix docs with pthread_equal
add pthread_equal to supported api list

Signed-off-by: Jai Arora <infolinesoni@gmail.com>
2023-07-20 16:24:16 +02:00
Jai Arora 81ef6b5afb posix: Adds test case for pthread_equal functions
Adds test case for pthread_equal
Adds test coverage for same and different thread id

Signed-off-by: Jai Arora <infolinesoni@gmail.com>
2023-07-20 16:24:16 +02:00
Jai Arora 82f5db37d2 posix: Changes pthread_equal to regular type function
Patch changes pthread_equal function from static inline to regular
function type

Fix for issue#59942

Signed-off-by: Jai Arora <infolinesoni@gmail.com>
2023-07-20 16:24:16 +02:00
Marcel Krüger f055110802 doc: Add hint for automatic power domain swiching
Add a hint that when a device is on a power domain
and the device and power domain have runtime PM,
the power domain will automatically resumed/susepended.

Signed-off-by: Marcel Krüger <marcel.krueger@ithinx.io>
2023-07-20 16:23:36 +02:00
Magdalena Kasenberg 927168fb5a bluetooth: tester: bap: Add support for AC 7(i) tests
Allow to assing end points to CISes before creating a CIG. Previously
the end points were assinged top-down, so the configuration 7(i) and
other similar were not covered.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-07-20 16:23:05 +02:00
Mulin Chao f34fff91bc driver: flash: npcx: introduce npcx flash driver
This CL attempts to implement npcx's flash driver instead of the
original one (npcx spi driver plus spi_nor flash driver).

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-07-20 16:22:47 +02:00
Mulin Chao 7411fbcb5b pinctrl: npcx: add DEV_CTLx configuration support
Add a new pinctrl type to control peripheral modules' specific IO
characteristics such as tri-state, the power supply type selection (3.3V
or 1.8V), and so on. In NPCX series, the corresponding registers/fields
are irregular. This CL wraps these definitions to dt nodes and put them
in pinctrl property if needed.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-07-20 16:22:47 +02:00
Jamie McCrae d52b634610 doc: mgmt: mcumgr: Add details on making handlers
Adds a guide on how to make out-of-tree MCUmgr function handlers
and groups, with an example showing a test implementation.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-20 16:22:31 +02:00
Jamie McCrae f99d497281 tests: mgmt: mcumgr: Add handler_demo test
Adds a test that tests a build-only configuration of an
application which uses custom handlers is able to build, and
can be referenced in documentation.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-20 16:22:31 +02:00
Flavio Ceolin ddd2bc94e2 bt: mesh: shell: Fix possible buffer overflow
Fix possible overflow in rpr_scan_report.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-20 11:09:50 +00:00
Flavio Ceolin e55af04e65 bt: audio: shell: Fix possible buffer overflow
Check the size of the search argument in cmd_media_set_search
before copying it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-20 11:09:50 +00:00
Flavio Ceolin 02e70f509f bt: audio: shell: Fix possible buffer overflow
Check the size of the search argument in cmd_mcc_send_search_raw
before copying it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-20 11:09:50 +00:00
Flavio Ceolin fbd56fd920 bt: host: Fix possible buffer overflow
Check in bt_conn_le_start_encryption if the given
ltk fits in bt_conn.ltk before copying it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-20 11:09:50 +00:00
Sean Nyekjaer d0651a8d96 drivers: serial: stm32: void return value from reset_line_toggle_dt
Suggested-by: Francois Ramu <francois.ramu@st.com>
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2023-07-20 10:57:12 +00:00
Sean Nyekjaer 09f4b6f3bd drivers: mipi_dsi: dsi_stm32: void return value from reset_line_toggle_dt
Suggested-by: Francois Ramu <francois.ramu@st.com>
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2023-07-20 10:57:12 +00:00
Sean Nyekjaer f21526c5c9 drivers: counter: stm32: void return value from reset_line_toggle_dt
Suggested-by: Francois Ramu <francois.ramu@st.com>
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2023-07-20 10:57:12 +00:00
Daniel Leung a458d0443a xtensa: allow arch-specific arch_spin_relax() with more NOPs
This adds a Kconfig to introduce the Xtensa specific
arch_spin_relax() which can do more NOPs. Some Xtensa SoCs
may need more NOPs after failure to lock a spinlock,
especially under SMP. This gives the bus extra time to
propagate the RCW transactions among CPUs.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-07-20 10:47:47 +00:00
Robert Lubos 51726f3648 net: l2: ieee802154: shell: Validate address on input
Associate command handler did not validate the provided address length.
In result, if provided address string was longer than the expected
extended address size, strncpy() would not NULL terminate the buffer,
which could lead to unexpected behavior in parse_extended_address(), as
it expects NULL terminated string.

Fix this by validating the length of the provided address string before
parsing.

Additionally, make parse_extended_address() return the parsing result,
so that it can be detected when provided extended address has incorrect
format.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-20 10:47:39 +00:00
Magdalena Kasenberg 6135ae0fa0 bluetooth: audio: ascs: Fix Codec Config initiated by server
The Codec Specific Configuration Parameters provided by server was
not copied at bt_ascs_config_ase. Detected by PTS in BAP/USR/SCC PTS
test cases, because no LTV values appeared in ASE Codec Configured
notification.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-07-20 10:46:55 +00:00
Johan Lafon 691b357b59 drivers: clock-control: st: add MCO support for H7 family
Create clock_stm32_ll_mco.h file to bring stm32_clock_control_mco_init,
mco1_prescaler, mco2_prescaler, MCO1_SOURCE and MCO2_SOURCE definitions
which were previously in clock_stm32_ll_common.{c,h}. This is done so that
stm32_clock_control_mco_init can be called from clock_stm32_ll_h7.c.

Also update Kconfig.stm32 and add new MCO sources to allow H7 support.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-07-20 10:46:34 +00:00
Benjamin Cabé c3d515755d bluetooth: doc: Fix gap.h Doxygen documentation
Make #defines properly Doxygen-documented, add some named groups, and add a
few missing comments to some #defines.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-20 10:46:10 +00:00
Benjamin Cabé 9fab241991 bluetooth: doc: Reformat BT_APPEARANCE_* defines
Split the BT_APPEARANCE_* doc on two lines as several lines were
dangerously close to 100-character line limit + some constants were
misaligned.
This makes follow-up commit possible without breaking code formatting
rules.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-20 10:46:10 +00:00