Commit graph

59607 commits

Author SHA1 Message Date
Emil Gydesen
fa1be6436a Bluetooth: CSIS: Refactor bt_csis_client_discover_sets to use member
Refactor bt_csis_client_discover_sets to use the
bt_csis_client_set_member struct instead of a bt_conn.
The bt_csis_client_set_member represents a remote server
(set member), and make it possible to avoid sending indexes
of instances around instead of bt_csis.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-18 10:40:33 -05:00
Emil Gydesen
728f390f65 Bluetooth: CSIS: Remove unused functions and callbacks from csis.h
Remove the lock and release sets functions, as well
as the discover member function as they have been removed
from the implementation a while ago.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-18 10:40:33 -05:00
Emil Gydesen
2bf89990ee Bluetooth: CSIS: Expose bt_csis to client via bt_csis_client_set_member
Use the bt_csis_client_set_member struct to store the individual
bt_csis client struct. This way they are exposed to the
client application.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-18 10:40:33 -05:00
Emil Gydesen
60181a183f Bluetooth: CSIS: Add array of bt_csis to discovery function
Add an [out] array to the discovery function and
an array to the discovery callback of bt_csis structs.
These should be used instead of bt_conn pointers for
CSIS client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-18 10:40:33 -05:00
Emil Gydesen
c8be71a257 Bluetooth: CSIS: Use bt_csis for CSIS client
Use the bt_csis struct instead of the
bt_csis_client_svc_inst struct for the CSIS client.
This makes it more similar to not only the CSIS
implementation, but also the other LE Audio
client implementations.

Furthermore, this change will make it easier to use
bt_csis in the API in the future.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-18 10:40:33 -05:00
Emil Gydesen
ca8ed046a1 Bluetooth: CSIS: Rename servers to client_insts in csis_client.c
Rename the array to a more descriptive name and change the type
to bt_csis, as well as renaming the individual variables
when accessing the array.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-18 10:40:33 -05:00
Emil Gydesen
f2b4896536 Bluetooth: CSIS: Move csis_instance to csis_internal.h
Move the struct definition to the internal header file,
and add it to the bt_csis struct.

This also renames the csis_instance to
bt_csis_client_svc_inst to use the bt_csis prefix.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-18 10:40:33 -05:00
Alexander Wachter
22a10752ed samples: net: sockets: can: Disable Ethernet
Disable Ethernet on SocketCAN sample because some Ethernet
drivers cannot operate on such small buffers.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-01-18 10:39:55 -05:00
Alexander Wachter
1343199f95 boards: sam_e70_xplained: Add CAN support
This commit adds CAN support on the sam_e70_xplained.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-01-18 10:39:55 -05:00
Alexander Wachter
64871ad8a9 boards: sam_e70_xplained: default GPIO to y
Set CONFIG_GPIO=y is in the sam_e70_xplained_defconfig

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-01-18 10:39:55 -05:00
Alexander Wachter
9a989be2bf dts: atmel: SAME70: Add can instances for SAME70
This commit adds can0 and can1 on the Atmel SAME70.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-01-18 10:39:55 -05:00
Alexander Wachter
6e5c8a339d drivers: can: Add frontend for Atmel SAM M_CAN controller
This commit adds a frontend for the generic Bosch m_can driver
for Atmel SAM series.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-01-18 10:39:55 -05:00
Alexander Wachter
4e903cd4fe drivers: can: mcan: Add headers for types used in this file
Some includes that resolve types used in this file were missing.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-01-18 10:39:55 -05:00
Alexander Wachter
c5ad0b425e drivers: can: mcan: fix array index in cache handling param
filter_nr was renamed to filter_id. This change was not included
in the cache handling PR.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-01-18 10:39:55 -05:00
Daniel Leung
1cb754c628 boards: qemu_x86_tiny: pin logging subsys code and data
This pins the logging subsys code and data so logging can be
used with demand paging.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-18 10:39:21 -05:00
Daniel Leung
0c32256b00 scripts: logging: include pinned rodata in database
This adds "pinned.rodata" into the string database so
this will work with pinned rodata section.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-18 10:39:21 -05:00
Daniel Leung
9b9001956f logging: dictionary: workaround non-existing strings
When strings are not in the dictionary, the parser would crash.
This works around the issue by indcating an unknown string
as "string@<addr>".

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-18 10:39:21 -05:00
Jian Kang
b89a0f5d24 Fix: Add the doxygen group of heap listener
Add the doxygen contents of heap listener which is missed.
We already have some apis of heap listener, but cannot be display
in our documents. So add the group to show in the doc.

Signed-off-by: Jian Kang <jianx.kang@intel.com>
2022-01-18 10:39:01 -05:00
Sylvio Alves
e6cc771c63 boards: esp_wrover_kit: use default configs from soc
Set esp_wrover_kit board to use default soc cmakelists
and remove hardcoded bootloader as it is automatically
selected by kconfig options.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-18 10:38:34 -05:00
Sylvio Alves
2b427fd935 soc: esp32: add flash dts values into cmake config
This configures soc and flash size definition
using DTSI information instead of hardcoded
values.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-18 10:38:34 -05:00
Benedikt Schmidt
6c60664281 drivers: clock_control: stm32h7: systick activation
Do not enable systick in the clock control initialization of
a STM32H7.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2022-01-18 10:36:07 -05:00
Attie Grande
ce07d834a5 drivers: i2c: sam0: Return the bus to idle when a transaction fails
If a transaction fails, the bus was not being returned to idle. This
increases power consumption, and can cause the following transaction to
be misinterpreted.

By issuing a STOP command on error, we can ensure that the bus returns
to idle correctly.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-01-18 10:28:31 -05:00
Attie Grande
aed55b6cb9 drivers: i2c: sam0: Ensure the bus returns to idle after a read
When calling i2c_transfer(), the bus failes to enter the idle state when
performing a read, or an unacknowledged write. This increases power
consumption, and can cause the following transaction to be
misinterpreted.

This behaviour was observed on a SAML21 part. There appears to be a race
condition between the peripheral setting CLKHOLD, and the command being
correctly set up - so now we wait for the CLKHOLD field to be set before
issuing the STOP command, and this resolves this issue.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-01-18 10:28:31 -05:00
Sylvio Alves
40ad264a47 drivers: uart: fix esp32 TX checks
This fixes both TX ready and completed uart
calls to meet valid condition.

Closes #41526
Closes #41624

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-18 10:28:00 -05:00
Flavio Ceolin
3a57a8060e tests: pm_multicore: Avoid possible race condition
Use the given cpu argument in the policy callback to
avoid possible race condition.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-01-18 10:27:35 -05:00
Henrik Brix Andersen
e8df8a5790 drivers: can: mcux: flexcan: rework transmit error handling
Rework the transmit error handling in the NXP MCUX FlexCAN driver:
- Frame transmission must be automatically retried in case of lost
  arbitration or missing acknowledge.
- Abort any pending TX frames when bus-off state is entered.
- Fail early in can_send() if in bus-off state.

Fixes: #19502

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-17 21:09:17 -05:00
Henrik Brix Andersen
ea355a0032 drivers: can: document the expected behavior for lost arbitration or NACK
Document the expected driver behavior for can_send()/can_write() when
loosing bus arbitration or when a frame is not acknowledged.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-17 21:09:17 -05:00
Henrik Brix Andersen
b6f6069b99 drivers: can: stm32: add support for disabling automatic retransmissions
Add support for disabling automatic retransmission of CAN frames
(similar to CAN "one-shot" mode in the Linux kernel).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-17 21:09:17 -05:00
Carlo Caione
93b0ea9782 ipc: Remove multi-instance backend
Remove the legacy multi-instance backend and the sample.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-01-17 15:50:58 -05:00
Anders Storrø
499c4fb1e3 Bluetooth: Mesh: Add LPN-disable BabbleSim test
Adds test to check correct behaviour for disabling
LPN feature.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-01-17 15:49:46 -05:00
Anders Storrø
e6d0ec1aba Bluetooth: Mesh: Add check to LPN friend_req_sent
Adds state check to the friend_req_sent CB to ensure
that the CB does not alter the LPN state if it is in a
disabled state. This resolves behavioural issue for lpn_set(false).

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-01-17 15:49:46 -05:00
Krzysztof Chruscinski
aff9cfc65a logging: Add assert when wrong backend is used
Add assert when logging v2 is enabled but backend doesn't support it.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-17 15:49:10 -05:00
Krzysztof Chruscinski
262cc55609 logging: Deprecate v1, default to v2
Reduced logging mode selection to deferred, immediate, minimal and
frontend. Decoupled logging version from mode and created CONFIG_LOG1
which can be used to explicitly select deprecated version.

From now on, chosing CONFIG_LOG_MODE_{IMMEDIATE,DEFERRED} will result
in version2.

Deprecated CONFIG_LOG2_MODE_{IMMEDIATE,DEFERRED} with cmake warning.

Codebase adapted to those changes.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-17 15:49:10 -05:00
Krzysztof Chruscinski
dd4035c624 doc: logging: Add note about v1 deprecation
Added note about v1 deprecation.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-17 15:49:10 -05:00
Krzysztof Chruscinski
5628f63665 logging: Add missing api documentation
Add description for log_backend_msg2_process.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-17 15:49:10 -05:00
Krzysztof Chruscinski
ce6297c501 logging: Deprecate backend API
Deprecate v1 backend API.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-17 15:49:10 -05:00
Attie Grande
36ebb7a2bc drivers: i2c: fixup comments outlining command arguments
Some comments were missing, and others were misleading. This is now
resolved.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-01-17 15:43:20 -05:00
Francois Ramu
7b397007b4 west.yml: Update hal_stm32 with recent cube packages
STM32Cube updates:
   stm32cube: update stm32wb and its lib to version V1.12.1
   stm32cube: update stm32mp1 to version V1.5.0
   stm32cube: update stm32u5 to version V1.0.2

  update stm32cube/common_ll

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-01-17 15:40:09 -05:00
Julien Massot
15f4bbf86b drivers: can: RCar add pinctrl support
Get pin configuration from device tree to
set alternate pin function.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-17 21:00:58 +01:00
Julien Massot
ee91ae5a21 boards: arm: rcar_h3ulcb: add pins definition
Add some pins definitions for CAN0 and SCIF1/2.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-17 21:00:58 +01:00
Julien Massot
feb6e2504e drivers: pinctrl: add Renesas RCar PFC driver
Introduce Pin Function Controller for Renesas R-Car family.
This first implementation support to set a given pin as gpio
or peripheral (GPSR), to set a peripheral function to a
pin (IPSR), to set pull-up, pull-down (PUEN, PUD).
In addition this driver allows to set driving capabilies(DRVCTRL).

Pins are identified thanks to the per SoC binding for
pin definition which also contains pin alternate function
parameters.

Some pins can also have driving capabilities, some have bias
capabilities.
In order to find the correct bias and drive registers pfc_r8a77951.c
describes the different registers.
Each SoCs or package will need to define getters
for these registers: pfc_rcar_get_bias_regs() and
pfc_rcar_get_drive_regs().

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-17 21:00:58 +01:00
Julien Massot
39e03d0c3f dts: arm: r8a77951: add pin-controller node
Pin controller address is the same for all member of the
GEN3 SoC Series, but pinmux configuration is SoC specific.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-17 21:00:58 +01:00
Julien Massot
b06862ca11 dts: bindings: pinctrl: add Renesas R-Car Pinmux
Renesas R-Car series contains a PFC (Pin Function Controller).
This module consists of registers for selecting the function of
the multiplexed pins and controls the pull-up resistor on each pin.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-17 21:00:58 +01:00
Piotr Pryga
ab32c06275 samples: Bluetooth: df: Fix possible stack overflow issue
Host receive thread has small default stack size.
Attempt to convert data from binany to string requires
large array. Allocation of such array on stack could
cause stack overflow.

To limit the scope of the array and avoid stack overflow
the array is changed to be static local variable in a function.

Also the array has been prepared to accept max advertising
data sieze of 1650 bytes.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-01-17 12:54:10 -05:00
Lukasz Majewski
c9902412e6 fs: Extend the littlefs code to support block devices
Up till now the littlefs only has been supporting the flash medium in
Zephyr.

This change provides code to also use littlefs stored on the block
devices - like SD card (accessed via SPI).

When FS_LITTLEFS_BLK_DEV Kconfig option is defined, the support for
using littlefs on block devices is enabled.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-01-17 12:53:43 -05:00
Lukasz Majewski
6fa771f2d0 fs: littlefs: Rename *area (struct flash_area*) to *backend void pointer
The struct flash_area *area pointer has been renamed to void *backend
pointer.

This change is enabling further rework of the littlefs subsystem to work
with other backend devices (like block ones - i.e. SD card).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-01-17 12:53:43 -05:00
Gerard Marull-Paretas
d2538475c6 doc: fix PDF build issue due to extlink references
LaTeX code generated by Sphinx causes problems when using extlinks in
references. Mitigate the problem by just using the extlink role
directly.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-17 12:48:43 -05:00
Henrik Brix Andersen
2c0e0a74af doc: use extlink for github issue links
Use extlink for GitHub issue links in documentation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-17 12:48:43 -05:00
Trond Einar Snekvik
eadf04af82 Bluetooth: Mesh: Return a boolean from subnet_find callback
bt_mesh_subnet_find calls a callback for every subnet, and returns the
subnet that got a non-zero return code from the callback. As pointed out
in #41693, the callback should return a boolean, not an int.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2022-01-17 11:52:57 -05:00
Tim Lin
013bc73e40 ITE: cleanup: drivers/bbram: correct the default configuration format
1. Rename DT_COMPAT_ST_BBRAM_IT8XXX2 to COMAPT_ITE_IT8XXX2_BBRAM
2. The default configuration "$( )" should be a parentheses instead
   of curly brackets. The BBRAM for it8xxx2 can be driven after
   correcting.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-01-17 11:52:13 -05:00