Commit graph

81299 commits

Author SHA1 Message Date
Patryk Duda cab341d29c arch/common: Fix moving location counter backwards when using LLD
In GNU LD, the location counter (the 'dot' variable) always refers to
the byte offset from the start of current object as mentioned in
documentation[1]:

```
'.' actually refers to the byte offset from the start of the current
containing object. Normally this is the SECTIONS statement, whose start
address is 0, hence '.' can be used as an absolute address. If '.' is
used inside a section description however, it refers to the byte offset
from the start of that section, not an absolute address.
```

For example, if the section 'rom_start':

rom_start : {
	. = 0x400;
	_vector_start = ABSOLUTE(.);
} > FLASH

has a starting address of 0x8000000, then _vector_start will be
0x8000400

However, behavior of LLVM LLD is quite different, the value of the
location counter is always absolute (see discussion [2]), so in the
example above, the linker will return error, because it will interpret
'. = 0x400' as an attempt to move the location counter backwards.

It could be fixed by changing line to '. += 0x400' (#54796) which will
move the location counter by 0x400 for both linkers, but it would work
only when we are at the beginning of section. Consider the following
example:

rom_start : {
	. = 0x400;
	KEEP(*(.boot_hdr.conf))
	. = 0x1000;
	KEEP(*(.boot_hdr.ivt))
	KEEP(*(.boot_hdr.data))
	KEEP(*(.boot_hdr.dcd_data))
	. = 0x2000;
	_vector_start = .;
} > FLASH

In this case, _vector_start will be 0x2000, but if we change
'. = 0x2000' to '. += 0x2000', then the value of _vector_start depends
on size of data in input sections (but it's 0x3000 at least).

Actually, this example comes from final linker script when compiling
firmware for mimxrt1170_evk_cm7 board. This board failed to boot
(#55296) after #54796 was merged.

This patch introduces method compatible with both linkers. We calculate
relative offset from the beginning of the section and use that value to
calculate number of bytes by which we should move the location counter
to get CONFIG_ROM_START_OFFSET.

[1] https://sourceware.org/binutils/docs/ld/Location-Counter.html
[2] https://discourse.llvm.org/t/lld-location-counter-inside-objects

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2023-07-14 12:08:02 +02:00
Carles Cufi 5824e95b1e Bluetooth: Host: Introduce BT_CONN_PARAM_ANY
Some controllers support additional connection parameter ranges
beyond what is described in the specification. Enabling this new option
allows the application to set any value to all connection parameters.
Tbe Host will perform no limits nor consistency checks on any of the
connection parameters (conn interval min and max, latency and timeou).
However, the Host will still use numerical comparisons between the
min and max connection intervals in order to verify whether the
desired parameters have been established in the connection.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-07-14 09:40:52 +00:00
Carlo Caione c9a68afede arm64: Set FP to NULL before jumping to C code
When the frame-pointer based unwinding is enabled, the stop condition
for the stack backtrace is (FP == NULL).

Set FP to 0 before jumping to C code.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-14 09:33:00 +00:00
Ryan McClelland 2984565722 drivers: fix double promotion warning in sensor_value_from_float
fix double promotion warning when compiling when compiling with
-Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-07-14 09:31:47 +00:00
Manuel Argüelles bed68af489 tests: code_relocation: support mr_canhubk3 boards
Add test scenario for NXP S32 platforms, for now only ported to
mr_canhubk3.

In some platforms the MPU region used for NULL pointer detection
conflicts with the ITCM region, causing access fault. Make disabling the
null pointer exception detection the default behavior for this scenario.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-14 09:38:43 +02:00
Manuel Argüelles 17f345780d tests: code_relocation: use per-SoC linker file for Arm tests
In order to support more Arm SoCs, extend the SoC-specific linker file
instead of the default arch linker file.

Fixes #60165

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-14 09:38:43 +02:00
Manuel Argüelles 20a2e40a5e tests: code_relocation: restrict Arm test to NXP platforms
Currently tests.application_development.code_relocation and
tests.application_development.code_relocation_kinetis scenarios are
restricted to specific NXP platforms only, so make filters more strict.

Also for frdm_k64f, which lacks of ITCM, relocation to ITCM must be
disabled.

Fixes #60167

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-14 09:38:43 +02:00
Hake Huang 616561de7f dma: fix the DMA_TCD_QUEUE_SIZE setting issue in test
this test need more queue size, so set to
CONFIG_DMA_TCD_QUEUE_SIZE=4

fixing: #60196

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2023-07-14 09:38:26 +02:00
Dawid Niedzwiecki c590c5c1ee mgmt: ec_host_cmd: add suppressing commands
Add a feature to suppress commands. The suppressed commands are not
logged on the command reception.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-07-14 09:38:20 +02:00
Florian Grandel b106c21acd net: l2: ieee802154: unified assertion order
Small refactoring that unifies the assertion order for improved
consistency across tests - placing the SUT before the expected value
everywhere.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-14 09:38:01 +02:00
Florian Grandel cffb1a448e net: l2: ieee802154: test disassociation from coordinator
Introduces an integration test that simulates an incoming disassociaton
notification from a coordinator.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-14 09:38:01 +02:00
Florian Grandel ea04e80aa1 net: l2: ieee802154: introduce device roles
Introduces IEEE 802.15.4 device roles for use in later change sets.

In the near term this will be used for coordinator-role support in
tests. Then additional coordinator-specific features will be gradually
introduced without exposing them to the user API, yet. Once a reasonable
feature set has been collected for coordinators, it will be exposed in
public APIs for use in applications.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-14 09:38:01 +02:00
Florian Grandel 111a87efb1 net: l2: ieee802154: test enddevice disassociation
Adds test coverage for the disassociation shell command that
disassociates the enddevice by notifying its coordinator.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-14 09:38:01 +02:00
Florian Grandel 81c1f19f1b net: l2: ieee802154: shell set_ext_addr test coverage
Introduces an integration test that covers the set_ext_addr shell
command.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-14 09:38:01 +02:00
L Lakshmanan 8fca1cdb29 drivers: mm: Fix macro call in RAT driver
The macro used in an assert statement in the `sys_mm_drv_page_phys_get()`
function was using an older version of the naming scheme, fixed now.

Signed-off-by: L Lakshmanan <l-lakshmanan@ti.com>
2023-07-14 09:37:53 +02:00
L Lakshmanan 24759511f4 drivers: uart: Add support for UART_NS16550 TI K3 variant
TI K3 family of SoCs requires an extended set of registers to operate.
Extended functionality of the current driver to support the variant.

Signed-off-by: L Lakshmanan <l-lakshmanan@ti.com>
2023-07-14 09:37:44 +02:00
Robert Lubos c15e3d448c net: conn_mgr: Create conn_mgr thread dynamically
Statically created threads with K_THREAD_DEFINE() are launched only
after the SYS_INIT phase. This does not play well with NET_CONFIG
library, which may block during SYS_INIT until network interface
is UP and RUNNING.

In order to be able to connect to L2 network and thus mark the
network interface as running and unblock NET_CONFIG, we need to be
able to run conn_mgr thread during SYS_INIT. This can be achieved,
by starting the thread dynamically during SYS_INIT phase, instead
of relying on static thread creation.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-14 09:37:37 +02:00
Robert Lubos cc81dca556 net: if: Fix if_ipv4_get_addr() locking
net_if_lock() should be called only after iface pointer is verified not
to be NULL, otherwise we can end up dereferencing NULL pointer in
certain corner cases.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-14 09:37:14 +02:00
Tomasz Moń 440af3ecc8 modules: hal_nordic: nrfx: Make ISO IN ZLP configurable
nRF USBD ISOINCONFIG register controls USBD behavior after receiving IN
token addressed to ISO IN endpoint when the endpoint was not armed with
data. The options are:
  * NoResp, in which case there is no response (i.e. bus timeout)
  * ZeroData, in which case device responds with ZLP

This commit both makes the ISOINCONFIG value configurable and changes
the default from NoResp to ZeroData. For reference, DWC_otg controller
will always send ZLP in such case and does not have NoResp equivalent.

Automatically sending ZLP when ISO IN endpoint is not armed resolves
periodic audio dropouts observed on Mac OS with USB Audio headset
sample. Apple USB Audio class driver will attempt recovery (abort all
pending URBs, switch to alternate config 0, switch to active alternate
config and submit new URBs) every time it sees kIOReturnNotResponding
status code. During recovery no audio data can be transferred and
therefore there are gaps in the audio stream.

Apple USB Audio driver sees kIOReturnNotResponding when there is bus
timeout (i.e. IN token was sent to nRF when the endpoint was not armed
and NoResp option was active). Activating ZeroData option results in
perfectly fine (albeit short) packet that does not trigger interface
recovery and thus fixes the USB Audio issues on Mac OS.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-07-14 09:37:04 +02:00
Carlo Caione 44dd4114db arm64: Remove __packed from ESF
Packing the ESF is actually wrong, remove the attribute.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-14 09:36:40 +02:00
Christopher Friedt 1323b1ac60 tests: kernel: threads: add a testcase for dynamic thread stacks
Test that automatic thread stack allocation works for
both user and kernel threads.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-07-13 17:16:32 -04:00
Christopher Friedt 7b1b2576ac kernel: support dynamic thread stack allocation
Add support for dynamic thread stack allocation

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-07-13 17:16:32 -04:00
ferar alashkar 8c32950de9 device: add explicit macro/variable unsigned suffix
add explicit unsigned suffix to 'Z_DEVICE_MAX_NAME_LEN' macro, matching
it to return type of sizeof (size_t), thus the comparison operator '<='
has the same essential types, complying with required [misra-c2012-10.4]
rule which states; Both operands of an operator in which the usual
arithmetic conversions are performed shall have the same essential type
category.

Found as a coding guideline violation (Rule 10.4) by static code
scanning tool.

Note: Tested on STM32L5 Nucleo-144 board (stm32l552xx).

Signed-off-by: ferar alashkar <ferar.alashkar@gmail.com>
2023-07-13 16:19:12 -04:00
Benjamin Cabé ad0f2a697c lib: os: doc: cleanup Doxygen doc for structs
Fixed Doxygen comments for structs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-13 13:47:36 -04:00
Benjamin Cabé db939b6650 lib: os: doc: fix sys_hashmap_api doc typo
The documentation for sys_hashmap_api has an extra (leftover?) param.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-13 13:47:36 -04:00
Carlo Caione 18636af6d6 arm64: Add frame-pointer based stack unwinding
Add the frame-pointer based stack unwinding on ARM64.

This is a typical output with the feature enabled:

*** Booting Zephyr OS build zephyr-v3.4.0-1029-gae22ff648c16 ***
E: ELR_ELn: 0x00000000400011c8
E: ESR_ELn: 0x0000000096000046
E:   EC:  0x25 (Data Abort taken without a change in Exception level)
E:   IL:  0x1
E:   ISS: 0x46
E: FAR_ELn: 0x0000000000000000
E: TPIDRRO: 0x0100000040011650
E: x0:  0x0000000000000000  x1:  0x0000000000000003
E: x2:  0x0000000000000003  x3:  0x000000004005c6a0
E: x4:  0x0000000000000000  x5:  0x000000004005c7f0
E: x6:  0x0000000048000000  x7:  0x0000000048000000
E: x8:  0x0000000000000005  x9:  0x0000000000000000
E: x10: 0x0000000000000000  x11: 0x0000000000000000
E: x12: 0x0000000000000000  x13: 0x0000000000000000
E: x14: 0x0000000000000000  x15: 0x0000000000000000
E: x16: 0x0000000040004290  x17: 0x0000000000000000
E: x18: 0x0000000000000000  lr:  0x0000000040001208
E:
E: backtrace  0: fp: 0x000000004005c690 lr: 0x0000000040001270
E: backtrace  1: fp: 0x000000004005c6b0 lr: 0x0000000040001290
E: backtrace  2: fp: 0x000000004005c7d0 lr: 0x0000000040004ac0
E: backtrace  3: fp: 0x000000004005c7f0 lr: 0x00000000400013a4
E: backtrace  4: fp: 0x000000004005c800 lr: 0x0000000000000000
E:
E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
E: Current thread: 0x40011310 (unknown)
E: Halting system

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-13 17:04:05 +02:00
Fabio Baltieri 04e0e458c8 input: convert gt911 from kscan
Convert the GT911 driver to the input subsystem, fix the existing boards
to work in the default config.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-13 14:24:50 +00:00
Benedikt Schmidt fd54a9ab6e dts: bindings: adc: fix description of ADS114S08
Fix the description in the binding of the ADS114S08.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-07-13 09:33:08 -04:00
Pavel Vasilyev c89be95274 Bluetooth: Mesh: Fix comment for BT_MESH_DFU_PHASE_UNKNOWN
The phase was added to the spec, so it is not metaphase anymore.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-07-13 13:26:11 +00:00
Benjamin Cabé db53c3fd2c doc: Drop asterisk from Doxygen @param
The name for Doxygen params that are pointers should not include an
asterisk.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-13 13:25:28 +00:00
Gerard Marull-Paretas 77aafa51a1 doc: align pseudo-Makefile with latest CMake changes
The SPHINXOPTS option was not aligned with latest changes in CMake, and
SPHINXOPTS_EXTRA was not present.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-13 14:27:56 +02:00
Gerard Marull-Paretas 908865ef4b bluetooth: conn: remove trailing dot
It was causing Doxygen issues (End of list marker found without any
preceding list items).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-13 14:27:56 +02:00
Marc Herbert 35e8e6fa03 soc/xtensa/nxp_adsp/CMakeLists.txt: use new WEST_SIGN_OPTS variable
Align `soc/nxp_adsp` with new `WEST_SIGN_OPTS` option added to
`soc/intel_adsp` by recent commit d98a7c2f8d ("soc: xtensa: cmake: add
new WEST_SIGN_OPTS variable").

This allows per-board rimage customization at the CMake level. Example
in `zephyr/boards/xtensa/nxp_adsp_NEWBOARD/board.cmake`:

  set(WEST_SIGN_OPTS -- -c rimage/config/special.toml)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-07-13 14:19:26 +02:00
Lukasz Mrugala a36af82f64 scripts: tests: Twister test expansion - quarantine
Here we achieve 100% coverage for the quarantine module,
thanks to unit tests for QuarantineElement and QuarantineData dataclasses.

Implemented PR suggestions of gchwier.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-07-13 14:18:27 +02:00
Alberto Escolar Piedras 913920a06f ztests: Enable native specific functionality with embedded libCs
When building with the native simulator instead of attempting to
call directly to the host libC, use the trampolines provided
by the runner.
In this way we can build this code even if we are building
Zephyr with an embedded C library.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-13 07:44:11 -04:00
Adam Wojasinski 9aeb497321 modules: hal_nordic: nrfx_config: Align to updates in nrfx 3.1.0
Align config files to templates introduced with nrfx 3.1.0 release

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-07-13 13:21:41 +02:00
Adam Wojasinski 6f201f03f6 drivers: pwm: pwm_nrfx: Revert workaround for stopping PWM instance
This reverts commit 36f4226b2f.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-07-13 13:21:41 +02:00
Adam Wojasinski 2460967c5b manifest: hal_nordic: Update hal_nordic revision
Pull in nrfx 3.1.0 release

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-07-13 13:21:41 +02:00
Andrey VOLKOV abfd234060 tests: gpio: add tests for GPIO_DT_RESERVED_RANGES_NGPIOS et al
Added basic test coverage for the:

   * GPIO_DT_RESERVED_RANGES_NGPIOS,
   * GPIO_DT_RESERVED_RANGES,
   * GPIO_DT_INST_RESERVED_RANGES_NGPIOS,
   * GPIO_DT_INST_RESERVED_RANGES,
   * GPIO_DT_PORT_PIN_MASK_NGPIOS_EXC,
   * GPIO_PORT_PIN_MASK_FROM_DT_NODE,
   * GPIO_DT_INST_PORT_PIN_MASK_NGPIOS_EXC and
   * GPIO_PORT_PIN_MASK_FROM_DT_INST macros.

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
2023-07-13 12:16:44 +02:00
Andrey VOLKOV 9e526dba97 gpio: add "gpio-reserved-ranges" support to GPIO_PORT_PIN_MASK_XX
Updated the implementation of the GPIO_PORT_PIN_MASK_FROM_DT_NODE and
GPIO_PORT_PIN_MASK_FROM_DT_INST macros to support
"gpio-reserved-ranges" device tree property.

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
2023-07-13 12:16:44 +02:00
Andrey VOLKOV 6587fccd65 drivers: gpio: add "gpio-reserved-ranges" property support
Added

   * GPIO_DT_RESERVED_RANGES_NGPIOS(node_id, ngpios),
   * GPIO_DT_RESERVED_RANGES(node_id),
   * GPIO_DT_INST_RESERVED_RANGES_NGPIOS(inst, ngpios) and
   * GPIO_DT_INST_RESERVED_RANGES(inst)

as DT gpio's "gpio-reserved-ranges" property missing support.
The array of pins range pairs as shown below now works.

Also implemented paired extended versions of
GPIO_PORT_PIN_MASK_FROM_NGPIOS macro:

   * GPIO_DT_PORT_PIN_MASK_NGPIOS_EXC(node_id, ngpios) and
   * GPIO_DT_INST_PORT_PIN_MASK_NGPIOS_EXC(inst, ngpios)

with reserved (ie EXCluded) pins support too.

The implementation constraint is inherited from common DT limitations:
a maximum of 64 pairs can be used, i.e. theoretically no more than
128-bit gpio ports are supported (but resulted bitmask is actually
limited by the size of gpio_port_pins_t type).

Usage example:
The reserved mask, defined in the device tree as:
    gpio0: gpio0 {
       ....
       ngpios=<32>;
       gpio-reserved-ranges = <0 8>, <9 5>, <15 16>;
       ....
    };

and used in driver configuration as:
    {
     ...
     .gpio_reserved = GPIO_DT_RESERVED_RANGES(DT_NODELABEL(gpio0)),
     .pin_port_mask = GPIO_DT_PORT_PIN_MASK_NGPIOS_EXC(
				DT_NODELABEL(gpio0),
				DT_PROP(DT_NODELABEL(gpio0), ngpios)),
     ...
    }

correctly converts to:

    .gpio_reserved = 0x7fffbeff, 0b01111111 11111111 10111110 11111111)
    .pin_port_mask = 0x80004100, 0b10000000 00000000 01000001 00000000)

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
2023-07-13 12:16:44 +02:00
Andrey VOLKOV c35d97534f include: util_internal: add Z_SPARSE_LIST_{ODD|EVEN}_NUMBERS
Add auxiliary lists Z_SPARSE_LIST_ODD_NUMBERS and
Z_SPARSE_LIST_EVEN_NUMBERS. These lists were originally created for
GPIO_DT_RESERVED_RANGES_NGPIOS macro, but may be useful for others
applications too.

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
2023-07-13 12:16:44 +02:00
Andrzej Głąbek 41c33d7f32 drivers: flash: nrf_qspi_nor: Fix writing from unaligned RAM buffers
Flash API states that drivers should support write requests without
any restrictions on location or alignment of the source buffer.
Due to hardware limitations of the QSPI peripheral, the nrf_qspi_nor
driver currently fails to perform a write from a RAM buffer that is
not word-aligned. Fix this by using in such case the same mechanism
that is used when the source buffer is located in the internal flash
(copy data to a buffer located on stack).
Also correct the length parameter for writes from this stack-based
buffer to be the actual data chunk length, not always the size of
the buffer (as for CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE > 4
this may lead to overwriting of some data located next in the flash).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-07-13 12:09:02 +02:00
Alberto Escolar Piedras 9be7b59b4a ctf tracing: native/host backend: Refactor to support embedded C libraries
Split this tracing backend in a top and bottom to enable
building it with embedded libCs with the native simulator.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-13 05:47:08 -04:00
Loic Poulain df7749129f samples: cdc_acm: Add 96b_carbon to usbd-next board
This board can rely on udc_stm32 usbd-next driver.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2023-07-13 10:44:42 +02:00
Loic Poulain e8e2b53849 drivers: usb: udc: add STM32 UDC driver
Add UDC driver for STM32 based MCU, relying on HAL/PCD.
This has been tested with cdc_acm sample on the following boards:

- 96b_carbon (STM32F4)
- disco_l475_iot1 (STM32L4)
- nucleo_wb55rg (STM32WB)
- nucleo_h723zg (STM32H7)
- stm32f3_disco (STM32F3)

This fails at runtime for the following:

- b_u585i_iot2a (STM32U5)

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2023-07-13 10:44:42 +02:00
Joakim Andersson 82024ad5cf tests: arch: arm: Use a more common SHA algorithm
The profile type "not set" uses the "default crypto config" header.
However platform may set their own crypto configuration headers.
SHA-512 algorithm is not the most common algorithm to support and
are for example disabled in profile types medium and small.

Change to SHA-256 which is much more common and is even needed
internally by TF-M for protected storage and sub-key derivation.

Update the QEMU icount setting to make the interrupt occur during
the secure call to TF-M.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-07-13 10:44:08 +02:00
Wei-Tai Lee f2e0f787bf drivers: i2c: add error handling
Return errors when failing at consecutive transactions and
missing targets.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2023-07-13 09:23:39 +02:00
Wei-Tai Lee fc89a85c29 drivers: i2c: add thread-safe semaphore
Add a semaphore to ensure that only one transaction
happens at a time when threads want to transfer
simultaneously.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2023-07-13 09:23:39 +02:00
Mariusz Skamra 1ca75e3b6e Bluetooth: audio: ascs: Fix invalid memset of QoS parameters
This fixes invalid memset of QoS parameters that may happen if Config
Qos operation is requested on ASE in QoS Configured state. In such case
if the requested parameters have been rejected, the ASE QoS parameters
shall remain unchanged (were memset instead). Otherwise, the stack shall
send QoS Configured state notification with cleaned up parameters (all
zero's) which was not done.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-07-13 09:23:24 +02:00