Commit graph

81458 commits

Author SHA1 Message Date
Fabio Baltieri d95c12848d drivers: input: add few missing gpio_add_callback return check
Add few missing check on gpio_add_callback and gpio_add_callback_dt
calls, fixes a coverity warning.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-19 09:18:38 +00:00
Keith Packard 3d94c830a3 scripts/checkpatch: Fix check for libc API defines
Re-ordering the API names moved a trailing '|' causing the pattern to match
*every* #define in the input.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-07-19 08:57:04 +00:00
Tomasz Moń e47fc45c4d usb: audio: correctly report internal delay
Every USB device must buffer isochronous data for at least 1 frame in
order to remove packet jitter within a frame. USB Specification Revision
2.0 describes necessary buffering in 5.12.5 Data Prebuffering. USB Audio
1.0 specification mentions buffering in 3.4 Inter Channel Synchronization.

Set bDelay to 1 instead of 0, because bDelay 1 is both the minimum
allowed value and matches the actual device behavior.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-07-19 08:27:00 +02:00
Maciej Perkowski 93031ad5a0 west_commands: Fix parsing of extra args for test-item
An arg --test-item makes west loading twister's test configurations
form sample/testcase.yaml. It has to mirror twister's behavior.
It was not the case with "extra_args" section. Quotation  marks were
not removed in west as they were in twister. The quotation marks
have to be removed from the extra_args section but left in
extra_configs. The commit adds differentiation for those.

fixes: #60297

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-07-18 21:33:00 -04:00
Benjamin Cabé 61c38379ba app_memdomain: doc: Properly mount doc page
Properly mount App memory domain APIs into Doxygen doc
hierarchy.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-18 21:37:41 +00:00
Benjamin Cabé d8147ce648 input: doc: document event definitions
Added missing documentation to event types, key codes, etc.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-18 21:37:28 +00:00
Nicolas Pitre 141299fb80 tests: timer_behavior: better cope with timer wrap-arounds
Commit a1d21ca69b ("tests: timer_behavior: don't fail the test with
timer wrap-arounds") simply ignored the total time validation whenever
any rollover was detected. Let's adjust the end timestamp according
to the number of rollovers instead.

Documentation for sys_clock_cycle_get_32() says it should count up
monotonically through the full 32 bit space, wrapping at 0xffffffff.
Therefore we just need to add 2^32 times the number of rollovers to
the end timestamp.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-07-18 21:36:57 +00:00
Yong Cong Sin 43c549305b posix: signal: check RTSIG limit
Use build assert to make sure that the realtime signal
constants are configured properly in the Kconfig.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin 5970543999 test: posix: signal: add test for big nsig number
Add an extra test config to test large number of signals.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin 335acf817d posix: signal: implement strsignal
Implementation and ztest for strsignal.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin ff4b81e5e5 posix: signal: implement sigismember
Implementation and ztest for sigismember.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin 88cd494430 posix: signal: implement sigdelset
Implementation and ztest for sigdelset.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin 8011449542 posix: signal: implement sigaddset
Implementation and ztest for sigaddset.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin b9720e27c0 posix: signal: implement sigfillset
Implementation and ztest for sigfillset.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin 6910eb4a9b posix: signal: implement sigemptyset
Implementation and ztest for sigemptyset.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin e3c49b9573 posix: signal: add initial header
Initial header for the signal APIs.
APIs to be implemented in later commit.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin 2037362e16 checkpatch: exclude POSIX headers from typedef rule
The `NEW_TYPEDEFS` rule consistently generates false
positives when implementing POSIX standard APIs.

It makes sense to disable this check for the POSIX haders
rather than requiring merge superpowers constantly. That
way, we can merge as per usual after sufficient approvals
rather than waiting for someone with merge superpowers to
override / manually merge.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Keith Packard b021dece98 scripts/checkpatch: Check for patches adding #defines for libc APIs
All code in the Zephyr core must use only the Zephyr C library API
according to rules A.4 and A.5. Such code is not permitted to request API
extensions from the C library via any of the API request mechanisms.

This addition to checkpatch.pl verifies that patches don't #define
any of these:

	__STRICT_ANSI__
	_POSIX_SOURCE
	_POSIX_C_SOURCE
	_XOPEN_SOURCE
	_ISOC99_SOURCE
	_ISOC11_SOURCE
	_ATFILE_SOURCE
	_GNU_SOURCE
	_BSD_SOURCE
	_SVID_SOURCE
	_DEFAULT_SOURCE

Reference: #49922

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-07-18 19:20:24 +00:00
Michael Zimmermann f937c031d8 arch/posix: move fuzz entry doc to the right place
It should document the entry point function, not the DMA-like variable.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2023-07-18 19:19:53 +00:00
Michael Zimmermann 0da94225b0 arch/posix: make posix_fuzz_buf const
The original buffer is const as well and we're not allowed to modify it.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2023-07-18 19:19:53 +00:00
Michael Zimmermann 8de34fef19 arch/posix: use size_t for posix_fuzz_sz
That's the type of the original argument and we should use it internally as
well to prevent truncating the value.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2023-07-18 19:19:53 +00:00
Michael Zimmermann 6168f47ac3 arch/posix: put fuzzing kconfigs into submenu
Without fuzzing enabled they don't do anything and should not be
selectable.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2023-07-18 19:19:53 +00:00
Manimaran A 80d46c5f7e drivers: eeprom: mchp: Bug fix
Updated the DT macro to read EEPROM size property.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-07-18 19:19:14 +00:00
Valentin Korenblit 4648917be4 drivers: gicv3: GICR_TYPER_LAST mask width is 1 bit
Fix compiler warning: bitwise comparison always evaluates to false

Signed-off-by: Valentin Korenblit <vkorenblit@sequans.com>
2023-07-18 19:10:11 +00:00
Daniel DeGrasse 5862b38e99 drivers: input: gt911: enable fallback to alternate address
GT911 IC uses the INT pin to select the correct I2C address during
reset. However, some boards may not route this pin (or may only support
receiving inputs on it). This results in the I2C address selected by the
GT911 IC being arbitrary based on the state of the (floating) INT pin.

To resolve this, introduce an `alt-addr` property for this device. When
set, the INT pin will not be pulled low. Instead, the I2C address will be
probed at runtime, starting with the devicetree address and falling back to
`alt-addr`.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-18 18:49:13 +00:00
Ali Hozhabri 2e09dc4eb0 boards: arm: nucleo_l476rg: add storage partition
Add fixed-partition to be used as storage partition with the size of 32KB.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2023-07-18 17:59:36 +00:00
Benjamin Cabé 6719caf05e drivers: hwinfo: doc: Reset causes documentation
Add missing Doxygen for reset cause flags.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-18 16:22:22 +02:00
Seppo Takalo 27a695dda0 tests: coap_client: Zero-initialize address structures
Even though tests don't use the address, it causes warnings
on static analyzers.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-07-18 16:22:10 +02:00
Benjamin Cabé b76aa7cfaf net: mqtt-sn: doc: Fix Doxygen documentation
- Add missing Doxygen comments.
- Fix typo in Doxygen group name.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-18 16:21:52 +02:00
Andy Sinclair f2735b6109 drivers: mfd: npm1300: Added reset and hibernate
New reset function which performs a full power reset

New hibernate function which powers down and wakes after
specified timeout

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-07-18 16:21:41 +02:00
Dipak Shetty 022b234356 drivers: spi: eliminate dead code in spi_mcux_lpspi
The `spi_mcux_transceive` had 2 return calls when the
`CONFIG_SPI_MCUX_LPSPI_DMA` flag was active. The first return would be
called and the later was unreachable. With the fix, now the return calls
are mutually exclusive. Also, the `transceive` call is not compiled with
the `CONFIG_SPI_MCUX_LPSPI_DMA` flag is active.
Fixes #59533

Signed-off-by: Dipak Shetty <dipak.shetty@zeiss.com>
2023-07-18 16:21:26 +02:00
Wojciech Sipak 48fc80fa79 drivers: adc: iadc_gecko: select proper bits from sample
Only 12-bit resolution is currently available in the driver,
and each of the 16-bit samples store the actual data
aligned to the left.
A sample should be shifted 4 bits to the right to allow
proper interpretation.

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-18 16:21:09 +02:00
Lukasz Mrugala d42b2e0a9b scripts: tests: Environment tests update
Implented suggestions proposed by gchwier.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-07-18 16:20:54 +02:00
Lukasz Mrugala 7c270c8488 scripts: tests: Expand environment.py tests
As we aim to enhance our test coverage, environment module
is a target-rich environment. Some errors in the original
module were discovered and tests regarding these cases were
commented out until they are fixed.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-07-18 16:20:54 +02:00
Daniel DeGrasse fa94dcd277 drivers: mipi_dsi: implement clock selection algorithm
With the phy-clock being specified in devicetree (and thus under user
control), there is no need to artificially enlarge the DPHY clock to
insure it is fast enough. Instead, we can calculate the DPHY clock
directly, selecting the closest realizable value that is at least as
fast as the value requested by the user.

Fixes #59215

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-18 16:20:28 +02:00
Emilio Benavente 0d2127317b tests: drivers: dma: Added the 595 to chan link testcase.yml
Added the mimxrt595_evk into the testcase.yml
for the channel chaining test.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-07-18 16:20:21 +02:00
Emilio Benavente 3531482800 dts: arm: nxp: nxp_rt5xx_common: Added required inputmux bindings
Added required inputmux bindings to support
DMA Channel Chaining for the mimxrt595_evk

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-07-18 16:20:21 +02:00
Emil Gydesen bbe6bb231a tests: Bluetooth: Add testing of invalid input for BAP broadcast source
Add tests to verify that the stack does not allow any
invalid data.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-18 16:20:14 +02:00
Benjamin Cabé d72ad22c49 smbus: doc: Fix smbus_dt_spec documentation
Fixed Doxygen doc for smbus_dt_spec.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-18 10:17:00 -04:00
Fabian Blatz 723421b231 input: convert cst816s from kscan
Convert the cst816s capacitive touch screen driver to the input subsystem.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-07-18 08:55:26 -05:00
Nerijus Bendžiūnas db00177e2e boards: arm: move nucleo_g474re storage_partition to end of flash
Board/MCU has 512 KiB of flash (see stm32g474Xe.dtsi).

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
2023-07-18 08:56:14 -04:00
Aleksandr Khromykh b8f7c81dd3 tests: Bluetooth: Mesh: fix omitted names
PR fixes using of the parameter with omitted names.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-07-18 11:15:27 +00:00
Benjamin Cabé e1f7f94480 doc: lorawan: Cleanup doxygen comments
Add some missing Doxygen comments / fixed existing ones.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-18 11:14:39 +00:00
Benjamin Cabé 95bedcd20f doc: lora: Cleanup doxygen documentation
Fixed missing Javadoc style comments and briefs for some enums.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-18 11:14:39 +00:00
Benjamin Cabé e1f4a6f3ef bluetooth: mesh: doc: Add missing Doxygen comments
Misc. improvements in the Doxygen comments

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-18 11:14:14 +00:00
Mykola Kvach 0c4900d5ab soc: arm64: renesas: gen3: Move GIC version to DT
Move the GIC version to the device tree for Renesas R-Car Gen3
to improve readability

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-07-18 11:14:05 +00:00
Daniel Leung 9f02eeadf8 serial: allow callback setting to be exclusive
Both the IRQ API and Asynchronous API support callback.
However, since they are both interrupt driven, having
callbacks on both API would interfere with each other
in almost all cases. So this adds a kconfig to signal
that the callbacks should be exclusive to each other.
In other words, if one is set, the other should not
be active. Drivers implementing both APIs have been
updated to remove the callbacks from the other API.
Though, this still leaves the option to disable
the kconfig and allows both APIs to have callbacks
if one desires.

Fixes #48606

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-07-18 11:13:02 +00:00
Emil Gydesen bbbc28a0ba Bluetooth: CAP: Always register BAP callbacks with CAP callbacks
Modified bt_cap_stream_ops_register to always register BAP callbacks
to ensure that the callbacks are always forwarded (unless later
overwritten by the application...)

The CAP Initiator Unicast will still register the callbacks itself,
to ensure that the unicast procedures still work even if
bt_cap_stream_ops_register was never called.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-18 11:11:12 +00:00
Guillaume Gautier a254ea0cd1 dts: arm: st: f0: add hsi14 clock
Add HIS14 clock in STM32F0 dtsi.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-18 11:10:17 +00:00
Guillaume Gautier c9461ca783 drivers: clock_control: add support for stm32 hsi14 clock
Add support of the dedicated STM32F0 14 MHz HSI clock for ADC.
Also remove ADC clock source selection as it is obsolete.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-18 11:10:17 +00:00