Commit graph

83923 commits

Author SHA1 Message Date
Johan Lafon 6f0bf76086 modules: fatfs: fix build warnings
Adds a missing include to avoid these warnings :
- zephyr/modules/fatfs/zfs_ffsystem.c:19:16: warning: implicit declaration
  of function 'k_malloc'; did you mean 'ff_memalloc'?
  [-Wimplicit-function-declaration]
- zephyr/modules/fatfs/zfs_ffsystem.c:19:16: warning: returning 'int' from
  a function with return type 'void *' makes pointer from integer without a
  cast [-Wint-conversion]
- zephyr/modules/fatfs/zfs_ffsystem.c:25:9: warning: implicit declaration
  of function 'k_free' [-Wimplicit-function-declaration]

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-14 16:03:13 +02:00
Benedikt Schmidt 24ad40a7f2 CODEOWNERS: add codeowner of MAX11102-17
Add myself as codeowner of the previously committed ADC
driver for the MAX11102-17 series.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-14 08:32:46 -05:00
Benedikt Schmidt 6bc67ba541 tests: drivers: adc: increase RODATA region size
Increase the rodata section for build_all/adc to
successfully build on the platform atsame54_xpro.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-14 08:32:46 -05:00
Benedikt Schmidt 02dabecbd1 tests: drivers: adc: add MAX11102-MAX11117
Add instances of the ADC family MAX11102-MAX11117
to the build all tests.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-14 08:32:46 -05:00
Benedikt Schmidt 413267ea4f drivers: adc: add MAX11102-MAX11117 to ADC shell
Add all available instances of the ADC series
MAX11102-MAX11117 to the ADC shell.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-14 08:32:46 -05:00
Benedikt Schmidt 666520b8b6 drivers: adc: add driver for MAX11102-MAX11117
Add a driver for the following ADCs:
- MAX11102
- MAX11103
- MAX11105
- MAX11106
- MAX11110
- MAX11111
- MAX11115
- MAX11116
- MAX11117

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-14 08:32:46 -05:00
Benedikt Schmidt c3bb1b3c6d dts: bindings: adc: add MAX11102-MAX11117
Add bindings for the following ADCs:
- MAX11102
- MAX11103
- MAX11105
- MAX11106
- MAX11110
- MAX11111
- MAX11115
- MAX11116
- MAX11117

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-14 08:32:46 -05:00
Benjamin Cabé 30cd9a22cf doc: fs: samples: Use new Sphinx extension to document samples
Use the new code-sample directive and roles to document the filesystem
samples so that they show up as "Related samples" when browsing the API
documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-14 15:07:12 +02:00
Donatien Garnier 185a6117c0 Bluetooth: Host: Amend existing L2CAP accept callbacks
This patch amends the existing L2CAP accept callbacks to use the new
accept signature that includes a pointer to the L2CAP server structure.

Signed-off-by: Donatien Garnier <donatien.garnier@blecon.net>
2023-09-14 14:36:34 +02:00
Donatien Garnier 815891643e Bluetooth: Host: Pass pointer to server in L2CAP accept() callback
Add a pointer to the associated server structure in the L2CAP accept()
callback. This allows the callee to know which server an incoming L2CAP
connection is associated with.

Signed-off-by: Donatien Garnier <donatien.garnier@blecon.net>
2023-09-14 14:36:34 +02:00
Emil Gydesen 3f585f527b Bluetooth: Host: Add additional logging for bt_conn_exists_le
The bt_conn_exists_le is commonly hit by users attempting
to connect (either as central or peripheral) to a device
they are already connected to in some way. The current log statement
does not provide particularly much information, so added more.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-14 14:36:09 +02:00
Andrew Sonzogni 9ae9ee7ec4 drivers: flash: stm32: change undefined variable causing build error
Replace an undefined variable.

Signed-off-by: Andrew Sonzogni <andrew@safehear.fr>
2023-09-14 14:35:58 +02:00
Johan Lafon 24a2b6b004 drivers: rtc: stm32: fix build warning
Use a mem_addr_t cast to avoid build warning.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-14 14:35:19 +02:00
Alberto Escolar Piedras 1c7a6e2679 board nrf52_bsim: Fix build warning with clang
Fix a build warning with clang due to an implicit cast.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-14 14:34:52 +02:00
Filip Kokosinski 806c95163a dts/riscv: add missing riscv,isa fields and modify existing ones
This commit adds/modifies `riscv,isa` strings using the following rules:
* the ISA string is lowercase
* multi-letter extensions are preceded with the underscore mark
* if an extension is implied by another one, it is not specified - e.g. the
  D extension implies the F extension, so writing `rv32ifd` is redundant

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-09-14 14:34:34 +02:00
Filip Kokosinski 9ed51516ed dts/bindings/riscv: don't enforce riscv,isa values with enum array
This commit removes the enum array with allowed values for the `riscv,isa`
field. There are many ways in which RISC-V ISA extension string can be
represented, and listing them all is futile. In addition, custom extensions
can be implemented, meaning every extension would have to be listed in the
enum array as well.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-09-14 14:34:34 +02:00
Piotr Zierhoffer 4edb915c2c dts/arm/st: add SoC compatible string to stm32wba and stm32mb SoCs
While most of the ST family SoCs have the compatible string set, several
targets still miss it.

Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2023-09-14 14:34:22 +02:00
Yicheng Li 6ead139b4b mbox: Add NXP MU as a MBOX device
Add a MBOX driver wrapper around the NXP MU, simular to
the existing wrapper around the NXP S32 MRU. This allows Zephyr IPC
to work based on the MU, on a number of NXP boards.

Also update the SHA of NXP HAL to enable the Kconfig for this driver.

Signed-off-by: Yicheng Li <yichengli@google.com>
2023-09-14 14:34:05 +02:00
Vinayak Kariappa Chettimada f2069530ee Bluetooth: Controller: Fix some compiler instruction re-ordering
Fix some compiler instruction re-ordering. Mayfly code with
cpu_dmb() help avoid stalled memq_ull_rx processing when
rx_demux is to be executed using mayfly.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-09-14 14:30:36 +02:00
Gerard Marull-Paretas 577fd949c2 samples: boards: nrf: system_off: update readme
- Remove obsolete information
- Remove redundant details, e.g. how to flash
- Adjust output

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas 2cbc452d1d samples: boards: nrf: system_off: suspend console
To achieve minimal power consumption, only the console (ie UART) needs
to be suspended. Note that this is a temporary workaround, UART driver
should be using device runtime PM so that this is not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas 1f40012c00 samples: boards: nrf: system_off: use standard GPIO API
Wake-up from pin is already supported when configuring GPIO interrupt as
GPIO_INT_LEVEL_ACTIVE, so there's no need to resort to HAL.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas aa1dd87313 samples: boards: nrf: system_off: add missing dependency
APP_RETENTION depends on having CRC enabled.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas 6b56c9d8e5 samples: boards: nrf: system_off: remove redundant prj.conf comment
Not needed, already mentioned in sample.yaml.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas 7fb662032d samples: boards: nrf: system_off: fix includes
Include only what is needed, also sort includes properly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas d8571ef2a9 samples: boards: nrf: system_off: s/printk/printf
Use printf instead of printk, samples should prefer standard C APIs.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas 691facc20f include: always use <> for Zephyr includes
Double quotes "" should only be used for local headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:49:58 +02:00
Daniel Leung 94cc1bf455 ipm: remove ipm_cavs_idc driver
The ipm_cavs_idc driver was used with the old intel_s1000
board which has been removed. On the audio DSP side,
the IDC under CAVS is being handled by SoC layer code.
Now the ipm_cavs_idc is not needed anymore for anything.
So remove it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-14 06:24:18 -04:00
Grzegorz Chwierut f618522144 twister: pytest: Move fixtures to one file
Fixtures in pytest-twister-harness plugin are moved to one
file to simplify adding new fixtures in the future - no
need to add pytest_plugins entry and register asserts.
Moved also shell fixture from sample dir, because that
fixture can be reused in new tests.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-09-14 05:58:25 -04:00
Marc Herbert a6540164d4 util.h: #include zephyr/toolchain.h, not zephyr/toolchain/common.h
Commit 9c5dafed95 ("util: add type checking to CONTAINER_OF") made
`util.h` #include `toolchain/common.h` in order to get `BUILD_ASSERT()`
used by CONTAINER_OF_VALIDATE() when compiling C code.

However `toolchain/common.h` is not supposed to be included directly but
indirectly through `toolchain/<your_toolchain>.h` and in a very specific
order.

The direct inclusion caused the following warning when compiling C++:

```
toolchain/gcc.h:87: error: "ZRESTRICT" redefined [-Werror]
   87 | #define ZRESTRICT __restrict
      |
In file included from include/zephyr/sys/util.h:18:
note: this is the location of the previous definition:
include/zephyr/toolchain/common.h:33:
   33 | #define ZRESTRICT
```

Fix this issue #62464 by including `zephyr/toolchain.h` instead, as done
by 350 other files.

Fixes commit 9c5dafed95 ("util: add type checking to CONTAINER_OF")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-09-14 09:31:37 +01:00
Fabio Baltieri 7b8b5620fa board: az3166_iotdevkit: update SSD1306_REVERSE_MODE option
The SSD1306_REVERSE_MODE is now a devicetree property.

Update the board config, fix a:

warning: SSD1306_REVERSE_MODE (defined at
boards/arm/az3166_iotdevkit/Kconfig.defconfig:15) defined without a type

compliance warning.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-14 09:24:48 +01:00
Hang Fan 3fb434a653 Bluetooth: Shell: Fix bt adv-data command
Fix wrong adv elements length for bt adv-data command

Signed-off-by: Hang Fan <fanhang8@gmail.com>
2023-09-14 08:35:40 +02:00
Laurentiu Mihalcea ff1bb65793 doc: release: 3.5: Add note about shared interrupt support
Add a note that shared interrupts are now supported.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea b1111d9de4 doc: interrupts: Document support for shared interrupts
This commit adds the documentation for shared interrupts.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea 127696383f tests: kernel: interrupt: Add testcase for shared interrupts
This commit introduces a new testcase for shared interrupts.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea b8d487e54b arch: Add support for dynamically disconnecting shared interrupts
This commit provides the users a way to disconnect dynamic
interrupts. This is needed because we don't want to keep
piling up ISR/arg pairs until the number of registrable
clients is reached.

This feature is only relevant for shared and dynamic interrupts.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea 02f52503bb arch: Add support for dynamic shared interrupts
This works by overwriting z_isr_install()'s definition
(possible since the symbol is now weak) with our own definiton.

Whenever trying to register a new ISR/arg pair, z_isr_install()
will check to see if the interrupt line is already in use. If it's
not then it will not share the interrupt and will work exactly
as the old z_isr_install(), meaning it will just write the new
ISR/arg pair to _sw_isr_table.

If the interrupt line is already being used by an ISR/arg pair
then that line will become shared, meaning we'll overwrite
_sw_isr_table with our own (z_shared_isr, z_shared_sw_isr_table[irq])
pair.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea 30d362dbac arch: common: sw_isr_common: Move table index computing logic to function
Since the shared IRQ code will also use the same logic to compute
the _sw_isr_table index, move the computing logic to a separate
function: z_get_sw_isr_table_idx(), which can be used by other
modules.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea 017cf89a83 arch: Add support for static shared interrupts
This commit introduces all the necessary changes for
enabling the usage of shared interrupts.

This works by using a second interrupt table: _shared_sw_isr_table
which keeps track of all of the ISR/arg pairs sharing the same
interrupt line. Whenever a second ISR/arg pair is registered
on the same interrupt line using IRQ_CONNECT(), the entry in
_sw_isr_table will be overwriten by a
(shared_isr, _shared_sw_isr_table[irq]) pair. In turn, shared_isr()
will invoke all of the ISR/arg pairs registered on the same
interrupt line.

This feature only works statically, meaning you can only make use
of shared interrupts using IRQ_CONNECT(). Attempting to dynamically
register a ISR/arg pair will overwrite the hijacked _sw_isr_table
entry.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Martin Jäger ef77fe3402 tests: canbus: isotp: conformance: fix global variable usage
Even though it was leading to the same result, the function should use
its parameter and not the global variable for desired frames.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-14 08:34:09 +02:00
Martin Jäger a816180b16 tests: canbus: isotp: conformance: add mode_check test
Add a test to check error codes if attempting to use ISO-TP with CAN FD
mode even though the controller supports classical CAN only.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-14 08:34:09 +02:00
Grant Ramsay 9e9cbd8ce4 tests: canbus: isotp: conformance: Add tests for CAN-FD support
Allow existing tests to run with CAN-FD.
Add new CAN-FD specific tests.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-14 08:34:09 +02:00
Grant Ramsay 09912b74e9 samples: canbus: isotp: Add support for CAN-FD
Enable this sample to be used with CAN-FD

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-09-14 08:34:09 +02:00
Grant Ramsay a4383c2fd1 canbus: isotp: add CAN-FD support
ISO-TP CAN-FD support can be enabled at runtime.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-14 08:34:09 +02:00
Pavel Vasilyev 422cfeeb1a doc: Bluetooth: Mesh: Align wording for models instantiation req
According to https://github.com/zephyrproject-rtos/zephyr/pull/61886#issuecomment-1713302331
we need to use "must only" for models that spec states:
`If supported, ... shall be supported by the primary element and shall
not be supported by any secondary element`.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-09-14 08:33:46 +02:00
Jonathan Rico db52d27eb5 scripts: Update CFB font generator
Update CFB font generator so it works with Pillow version 10. They
deprecated some methods, with no direct replacements, so the generated
fonts might be slightly different.

Signed-off-by: Jonathan Rico <jonathan@rico.live>
2023-09-13 14:40:00 -07:00
Daniel Leung 26ffa9f59a doc: picolibc: a few words about building without native support
This adds a few words about using Picolibc without native support
from toolchain, and how to enable this behavior for toolchain.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-13 17:36:46 -04:00
Daniel Leung b21d35d357 libc: picolibc: disable prompt for PICOLIBC_USE_MODULE...
...when toolchain does not have native picolibc support.
Without native support, picolibc needs to be built from
the module. Disabling the prompt means this kconfig
takes on whatever default value specified, which is
to build source from module when there is no native
support.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-13 17:36:46 -04:00
Daniel Leung 01dd2f0897 libc: picolibc: extend support beyond Zephyr SDK
The picolibc kconfigs were tied to ZEPHYR_TOOLCHAIN_VARIANT
and it only supported the Zephyr SDK, which is the only
toolchain having picolibc built-in at the moment. This
commit generalizes that to use TOOLCHAIN_HAS_PICOLIBC
cmake variable the same way as newlib: TOOLCHAIN_HAS_NEWLIB.
This provides the ability for other toolchains to declare
their support for picolibc.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-13 17:36:46 -04:00
Daniel Leung 718a219bf1 cmake: expose TOOLCHAIN_HAS_PICOLIBC to kconfig
This mirrors TOOLCHAIN_HAS_NEWLIB to picolibc so the cmake
variable TOOLCHAIN_HAS_PICOLIBC can be used in kconfig.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-13 17:36:46 -04:00