Commit graph

65835 commits

Author SHA1 Message Date
Kumar Gala
e1e8179690 modbus: serial: Convert to DEVICE_DT_GET
Move to using DEVICE_DT_GET so we can phase out DT_LABEL.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 10:32:42 +02:00
Kumar Gala
e63643d212 drivers: serial: lpc11u6x: Remove DT_LABEL usage
Remove DT_LABEL usage that is needed for device_get_binding, replace
this with DEVICE_DT_GET.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 10:32:33 +02:00
Kumar Gala
78b1d950be drivers: i2c: lpc11u6x: Remove DT_LABEL usage
Remove DT_LABEL usage that is needed for device_get_binding, replace
this with DEVICE_DT_GET.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 10:32:33 +02:00
Kumar Gala
93f2fedc12 drivers: gpio: lpc11u6x: Remove DT_LABEL usage
Remove DT_LABEL usage that is needed for device_get_binding, replace
this with DEVICE_DT_GET.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 10:32:33 +02:00
Jonathan Rico
3c5bf5089a Bluetooth: host: add dedicated WQ for long-running tasks
Send long-running tasks to a dedicated low-priority workqueue.

This shouldn't increase memory usage since by doing this, we get rid of the
ECC processing thread.

This should fix issues like #43811, since the system workqueue runs at a
cooperative priority, and the new dedicated one runs at a pre-emptible
priority.

Fixes #43811

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-06-30 10:31:13 +02:00
Krzysztof Chruscinski
cf19d7ef82 tests: lib: spsc_pbuf: Add test for getting maximum utilization
Add test for CONFIG_SPSC_PBUF_UTILIZATION option.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-30 10:30:49 +02:00
Krzysztof Chruscinski
1986591beb tests: lib: spsc_pbuf: Add tests for zero copy API
Extend test suite to validate zero copy API.
Add stress tests.
Add support for cache in the test. Test is not emulating cache
but ensures that buffer works correctly with cache enabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-30 10:30:49 +02:00
Krzysztof Chruscinski
8c79ed2610 tests: lib: spsc_pbuf: Convert to use new ztest API
Convert test to use new API.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-30 10:30:49 +02:00
Krzysztof Chruscinski
715ae32501 lib: os: spsc_pbuf: Add option to get maximum utilization
Add option to track maximum utilization of the packet buffer.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-30 10:30:49 +02:00
Krzysztof Chruscinski
fa055f743f lib: os: spsc_pbuf: Extend API with zero copy model
Added functions which allow to use zero copy model for handling
data within the packet buffer.

Additionally, added handling of cache by adding option to keep rd_idx
in different cache line than wr_idx and data.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-30 10:30:49 +02:00
Daniel Leung
3efce4c939 Revert "tests: logging: log_api: Add cast to char array"
This reverts commit 265394e30e.

The underlying cause is fixed so reverting this...

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-06-30 14:03:45 +09:00
Daniel Leung
73a940e3b7 lib: os/cbprintf: make char[] work in C++ and tagged arguments
Strings in C++ are usually of type char[] instead of char*.
Therefore, this needs to be taken into account when doing
tagged arguments or else char[] would be tagged as simple
pointer. So fix this by adding a way to get the type of
elements in an array to determine if it is a char array.

Fixes #46761

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-06-30 14:03:45 +09:00
Kumar Gala
2ddf2fa8b8 tests: i2c_target_api: Fix project name
In renaming of I2C terminology this project name in CMakeLists.txt
got missed.  Should be i2c_target_api.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-29 21:13:16 -04:00
Hu Zhenyu
5921eccf1b test: tests/crypto/tinycrypt timeout
It takes more than 300 seconds to finish the test,
so enlarge the timeout value from 300 to 500(seconds)

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-06-29 20:59:31 -04:00
Anas Nashif
dba3d31ddd tests: kernel: common: increase timeout
Some platforms need more time when under load, 60s are not enough.

Seen on hifive_unleashed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-06-29 17:00:21 -04:00
Chen Peng1
02ad698ce9 tests: iterable_sections: move to new ztest API.
Move test iterable_sections to use new ztest API.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2022-06-29 15:50:14 -04:00
Chen Peng1
aca68aec50 tests: arm_mpu_regions: move to new ztest API
Move test to use new ztest API.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2022-06-29 15:50:14 -04:00
Thomas Stranger
80372e6f0a MAINTAINERS: add myself as canbus collaborator
Add myself as canbus collaborator to the MAINTAINERS.yaml
file.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-06-29 15:49:43 -04:00
Christopher Friedt
a1ef368094 MAINTAINERS: posix: add cfriedt as maintainer
Adding myself as maintainer of the POSIX API layer.

Signed-off-by: Christopher Friedt <cfriedt@fb.com>
2022-06-29 12:01:56 -04:00
Tom Burdick
63478be651 docs: Update i2c API modified version to 3.2
Updates the API overview page describing that the i2c API has been modified
for 3.2.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-06-29 17:51:31 +02:00
Tom Burdick
88ca215eed i2c: Update API terminology
Updates the API and types to match updated I2C terminology. Replaces master
with controller and slave with target.

Updates all drivers to match the changed macros, types, and API signatures.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-06-29 17:51:31 +02:00
Tom Burdick
19f8ba6a04 docs: i2c: Documentation terminology updated
The i2c terminology has been updated as such master is now controller,
and slave is now target. Updates all doc comments and doc pages to use
updated terminology. Does not change types or API definitions.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-06-29 17:51:31 +02:00
Kumar Gala
355da1dd84 drivers: sdhc: Rework SPI config initialization
Move to using SPI_CONFIG_DT_INST macro to initialization the
struct spi_config cfg_a.  This fixes an issue with how the old
code was initializing the deprecated fields of spi_cs_control.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-29 14:59:43 +00:00
Gerard Marull-Paretas
8b6fe35cac dts: nrf: deprecate -pin properties
-pin properties, e.g. tx-pin have been replaced by pinctrl. Mark them as
deprecated since old pin configuration schemes will be deprecated in
Zephyr 3.2.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-29 14:49:51 +00:00
Lucas Tamborrino
7519ce35a5 samples: basic: blinky_pwm: add support for espressif boards
Add overlay for espressif boards that does not have a built-in LED.

Add instructions on README file about the required LED connection.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-06-29 14:48:25 +00:00
Lucas Tamborrino
4afd321dde west.yml: hal_espressif: updates to latest revision
Includes LEDC pinctrl support and source files.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-06-29 14:48:25 +00:00
Lucas Tamborrino
534efaed31 doc: boards: add pwm to espressif's boards
Add PWM support to espressif's boards documentation

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-06-29 14:48:25 +00:00
Lucas Tamborrino
1333787d8f drivers: pwm: refactor esp32 pwm ledc driver
Use hal function for low level access.
Use device tree for hardware configuration.
Support for esp32s2.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-06-29 14:48:25 +00:00
Lucas Tamborrino
02675bbc80 dts: esp32: full ledc configuration in binding
This commit moves the hardware configuration for ledc
peripheral to the device-tree instead of Kconfig.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-06-29 14:48:25 +00:00
Joakim Andersson
cb32d8e8e9 modules: tfm: Allow enabling FPU in the application with TF-M enabled
Allow the application to enable the FPU when TF-M has been enabled.
Pass the correct compilation flags according to the TF-M integration
guide.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-06-29 14:45:39 +00:00
Aurelien Jarno
c57a41c5d2 drivers/adc: stm32: do not disable the ADC if resolution is unchanged
In case the resolution is already correct (probably the common use
case), do nothing instead of disabling the ADC.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2022-06-29 14:43:29 +00:00
Aurelien Jarno
897554bd39 drivers/adc: stm32: avoid disabling and reenabling the ADC multiple times
The ADC is currently disabled and re-enabled multiple time during each
read. Enabling the ADC is not a free operation on some series and some
internal channels like VREFINT take even longer. This patch improve the
situation by removing the calls to adc_stm32_enable(), replacing it by a
single call just before triggering the conversion.

This also open the possibility to not reconfigure the ADC if it is
already configured, implemented in the following patches.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2022-06-29 14:43:29 +00:00
Aurelien Jarno
c9d3efabe7 drivers/adc: stm32: streamline code to disable ADC
This avoid repeating (slight different) code.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2022-06-29 14:43:29 +00:00
Adrian Bonislawski
65a242552b logging: use std_get_flags in cAVS HDA backend
This will use std_get_flags in cAVS HDA backend
and remove unnecessary duplication

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-06-29 14:42:23 +00:00
Adrian Bonislawski
83100c72cf logging: support dictionary based logging in cAVS HDA backend
This adds a dictionary based logging support in cAVS HDA backend

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-06-29 14:42:23 +00:00
Jaroslaw Stelter
8632986746 soc: intel_adsp: Add lib_code module type.
External libraries can contain processing module code or common library
code. Library manager need to distinguish between both type of modules
for proper loading.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-06-29 10:41:59 -04:00
Jamie McCrae
4e20669aa9 drivers: sensor: sm351lt: Fix global thread triggering bug
This fixes a bug in the sm351lt driver whereby global triggering will
cause an MPU fault due to an unset pointer.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2022-06-29 14:40:53 +00:00
Martin Åberg
89a652ad94 MAINTAINERS: Add new collaborator and code owner for SPARC and LEON
Add @julius-barendt as collaborator and code owner for areas related
to SPARC and LEON.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2022-06-29 14:39:51 +00:00
Martin Åberg
cb4be0ce10 MAINTAINERS: Remove myself from SPARC and LEON
This removes myself as collaborator and code owner for areas related
to SPARC and LEON.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2022-06-29 14:39:51 +00:00
Kumar Gala
a52f7a4e3a drivers: ieee802154: mcr20a: Remove unused variable
Since the driver uses spi_dt_spec there is no need for an explicit
spi_cs_control variable.  The variable is unused.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-29 06:02:28 -05:00
Yuval Peress
a7ceba3710 testing: add zephyr/ prefix to testing include path
Continuation of issue #41543 to add prefix scope for Zephyr's include
files.

Signed-off-by: Yuval Peress <peress@google.com>
2022-06-29 06:04:32 -04:00
Yuval Peress
ffc0983547 test: unittest: Fix deprecated ZephyrUnittest
Fix the deprecated calls to loading ZephyrUnittest by replacing them
with `Zephyr COMPONENTS unittest`.

Signed-off-by: Yuval Peress <peress@google.com>
2022-06-29 06:04:32 -04:00
Andrzej Głąbek
d06d1397c3 bluetooth: ll_sw: nrf5: Apply workaround for anomalies only when needed
Workaround for nRF52 anomalies 102, 106, and 107 was applied also for
SoCs that were not affected with those, namely nRF52811 and nRF52840.
Since the side effect of this workaround is reduction of sensitivity,
this was highly undesirable.
This commit uses dedicated functions provided by MDK for checking if
a given anomaly applies to the used SoC (and its actual revision) so
that the workaround is applied only when it is really needed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-29 11:57:45 +02:00
Anas Nashif
ab24be5552 drivers: timer: provide timer irq to tests
As with previous commit, make the timer irq a simple integer variable
exported by the timer driver for the benefit of this one test
(tests/kernel/context).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-06-29 10:31:00 +02:00
Andy Ross
fb3b434438 drivers: timer: update TIMER_IRQ for tests/kernel/context
This test has gotten out of control.  It has a giant #if cascade
enumerating every timer driver in the Zephyr tree and extracting its
interrupt number.  Which means that every driver needs to somehow
expose that interrupt in its platform headers or some other API.

Make it a simple integer variable exported by the timer driver for the
benefit of this one test.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-06-29 10:31:00 +02:00
Pavel Vasilyev
df31962793 Bluetooth: Mesh: Increase BT RX thread stack size for mesh
New logging system (v2) requires more stack size in deferred mode.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-06-29 10:30:45 +02:00
Francois Ramu
80dd57a49d drivers: flash: stm32 ospi driver align erase on sector size
When erasing the flash, the size to erase must be
compared to a multiple of SECTOR_SIZE.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-06-29 10:30:04 +02:00
Erwan Gouriou
5728a6db75 dts: bindings: clock: stm32: Additional doc on rcc bindings
Provide some additional guidance on how to use the alternate clock
source cells.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-06-29 10:29:46 +02:00
Veijo Pesonen
9bf570eaba net: lwm2m: Fixes SenML CBOR composite read
Path list was replaced accidentally with free list during refactoring.
This change does fix the issue.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-06-29 10:29:27 +02:00
Keith Packard
866f1cb9b0 lib/cbprintf: Disable tagged arguments with picolibc
Picolibc doesn't have the non-standard printf support required for tagged
arguments in cbprintf. Disable this and use the format string parsing code
instead.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-29 10:29:13 +02:00