Commit Graph

97181 Commits

Author SHA1 Message Date
Chris Friedt 598b2e11b2 posix: conditionally generate posix_clock syscall header
If POSIX_TIMERS is not configured, there is no reason to
generate syscall headers from posix_clock.h .

Make header generation conditional on POSIX_TIMERS in
this case.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-11 20:27:32 -05:00
Mateusz Holenko 85f9bf9f1c dts: nxp: Fix sramx offset for LPC51U68
The current value is wrong and overlaps with `syscon`.

Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-06-11 20:27:10 -05:00
Juliane Schulze 3c1590cbad drivers: tmag5273: fix documentation of tmag5273_check_device_status
Typos and invalid doxygen documentation.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-06-11 19:47:02 -04:00
Juliane Schulze 7ddbdb23df drivers: tmag5273: remove unneccessary check
If an immediate return on error is used, an additional result check in
sample_fetch can be neglected. Since they are now treated as errors,
also changed logging type.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-06-11 19:47:02 -04:00
Ederson de Souza ba0eef375c cmake: Flag for EDK Makefile.flags was being used on cmake.flags
Another case of subtle typo.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-06-11 19:46:42 -04:00
Ederson de Souza 3caaa19c4b cmake: Remove dead code from EDK generation
This code was supposed to be gone on the patch that handled imacros, but
it was forgotten.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-06-11 19:46:42 -04:00
Ederson de Souza a7ac049406 cmake: Pass path list in a Windows friendly way
When invoking cmake/llext-edk.cmake, CMakeLists.txt was sending the list
of includes as a colon separated list. On Windows, this list was
actually a single item, so it wasn't being parsed properly.

This patch sends the list as a cmake list and uses separate_arguments()
on the receiving side to fix it.

Fixes #73069

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-06-11 19:46:42 -04:00
Ederson de Souza bc9a1be976 cmake: Fix variable casing mixup
A variable called llext_cflags was mixed up with another called
LLEXT_CFLAGS, and that caused some host directories to end up leaking
unnecessarily into the EDK.

Fix by using only the lower case version.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-06-11 19:46:42 -04:00
Daniel DeGrasse 7277c85462 drivers: display: st7796s: remove unused gpio pins
Remove unused includes and gpio pins from st7796s driver, which were
leftover from before this driver used the MIPI DBI API class.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-11 19:46:21 -04:00
Jose Alberto Meza 02272f9b0e doc: releases: Update eSPI section in migration and release
Indicate KConfig and enum value changes with respect to new inclusive
term in eSPI specification 1.5.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-06-11 19:46:08 -04:00
Jose Alberto Meza f854b8b799 drivers: samples: espi: Adjust terms per eSPI specification 1.5
Replace CONFIG_ESPI_SLAVE by CONFIG_ESPI_TARGET
Replace CONFIG_ESPI_SAF by CONFIG_ESPI_TAF
Replace ESPI_BUS_SAF_NOTIFICATION with ESPI_TAF_BUS_NOTIFICATION in API

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-06-11 19:46:08 -04:00
Daniel DeGrasse eff681d50d doc: flash_debug: update NXP flash debug probes section
Update NXP flash debug probes section, to attempt to clarify the
differences between OpenSDA, LPC-Link2, and MCU-Link probes.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-11 19:45:34 -04:00
Johan Hedberg bf363d7c3e Bluetooth: Host: Avoid processing "no change" encryption changes
If the new encryption state is the same as the old one, there's no point in
doing additional processing or callbacks. Simply log a warning and ignore
the HCI event in such a case.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-11 19:45:09 -04:00
Marc Herbert bab7df9f9e .gitignore: do not ignore .\#* files
I just wasted dozens of failed build attempts and more than 5 minutes
staring at this cryptic build error:

```
Traceback (most recent call last):
  File "scripts/build/parse_syscalls.py", line 216, in <module>
    main()
  File "scripts/build/parse_syscalls.py", line 194, in main
    syscalls, tagged = analyze_headers(args.include, args.scan,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "scripts/build/parse_syscalls.py", line 118, in analyze_headers
    with open(one_file, "r", encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory:

                  'zephyr/include/zephyr/pm/.#device.h'
```

Because this file didn't show in `git status`, I kept believing that
building from scratch would make it go away.

`git status` should never hide source files that the build system uses.
Maybe `parse_syscalls.py` should be "Emacs-aware"? Or maybe not. As long
as it's not, `git status` must show every spurious file that might
affect the build and break it.

This is the first time that I see an error like this; so Emacs does not
leave files like this behind on a regular basis. Only when there
is a some sort of glitch; and then we definitely want to know about it.

More generally speaking, the choice of an editor is a personal
preference. So patterns matching Emacs files belong to personal
$HOME/.gitignore files; they shouldn't be mass-duplicated into every
single git repo instead. Stuffing every project with editor-specific
configuration of every editor obviously does not scale. But that's
probably for another day.

This is a partial revert of commit 3f4159c5c7 ("gitignore: Ignore
emacs temporary edit files")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-06-11 19:44:54 -04:00
Pisit Sawangvonganan 748367d118 drivers: gpio: stm32: clean up unnecessary code
Removed the unnecessary initialization of the `ret` variable in
`gpio_stm32_clock_request` where its value is guaranteed to be
overwritten by subsequent operations, then simply returned `ret`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-11 19:44:19 -04:00
Pisit Sawangvonganan 944305dc3a drivers: gpio: stm32: improve device instantiation macro
Introduced `GPIO_DEVICE_INIT_STM32_IF_OKAY` which utilizes `COND_CODE_1`
to reduce the chain of #if DT_NODE_HAS_STATUS(...) #endif

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-11 19:44:19 -04:00
Glenn Andrews d5b653a805 Driver: Sensor: HTS221: Remove log message when trigger disabled
My students are using a disco_l475_iot1 board with HTS221 sensor.
When logging is enabled, the following log message is always emitted:
"HTS221: Cannot enable trigger without drdy-gpios"

This message is confusing to my students as they are not using the
HTS221 sensor in their projects. However since HTS221 is enabled in
the devicetree it gets initialized on boot and the log message
appears.

It doesn't seem necessary to tell people that they haven't enabled
CONFIG_HTS221_TRIGGER at log level INF. I'd be amenable to changing
this to LOG_DBG, but I don't think it needs to exist at all.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-06-11 19:43:36 -04:00
Nick Ward 2576458dce drivers: led: shell: print color as string
Human readable.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-06-11 19:43:15 -04:00
Johan Hedberg 4b8aa82801 doc: migration-guide-3.7: Add information about new HCI API
Document the changes coming with the new HCI driver API, and provide
information for how to migrate existing drivers.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 0b8e56120c Bluetooth: doc: Update documentation for the new HCI API
Update references to devicetree chosen properties and how devicetree nodes
should be defined in order to enable the new HCI drivers.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 21356bc7f6 Bluetooth: deprecate old HCI driver APIs
Deprecate the bt_recv() and bt_hci_driver_register() APIs. There are no
more users in the tree itself, but we should let any out of tree users
migrate before removing these APIs completely.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 3ecd7dbd4c Bluetooth: drivers: Convert Silabs HCI driver to new API
Convert the slz_hci.c HCI driver to use the new HCI driver API. This also
fixes the HCI bus type to correctly indicate VIRTUAL instead of UART.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg fcddefd7f0 Bluetooth: drivers: Convert NXP HCI driver to new API
Convert the hci_nxp.c HCI driver to use the new HCI driver API. Also move
the driver binding under dts/bindings/bluetooth, like all other HCI driver
bindings.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg f33aab9889 Bluetooth: drivers: Convert DA1469X HCI driver to new API
Convert the Renesas DA1469X HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 501e7158a8 Bluetooth: drivers: Convert STM32 IPM driver to new API
Convert the ipm_stm32wb.c HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg b7b606bdaf Bluetooth: drivers: Convert ST STM32WBA driver to new API
Convert the hci_stm32wba.c driver to the new HCI API. Unlike in most cases,
the devicetree node is already enabled on the SoC level (rather than board
level). This is in order to mirror how the Kconfig option was originally
enabled, i.e. on the SoC level.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 5a09c17746 Bluetooth: drivers: Convert SPI drivers to use new HCI API
Convert the spi.c and hci_spi_st.c drivers to use the new HCI driver API.
Both drivers are converted in one go since one derives from the other's
devicetree binding.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 8953b4eb63 Bluetooth: drivers: Convert ESP32 HCI driver to new API
Convert the hci_esp32.c HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg e7637413b6 Bluetooth: drivers: Convert psoc6_bless driver to new API
Convert the hci_psoc6_bless.c HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 6e584a4773 Bluetooth: drivers: Convert IPC driver to new API
Convert the ipc.c HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg af750cd5a6 Bluetooth: Use device tree to indicate vendor exension support
Introduce a new bt-hci-vs-ext device tree boolean property to indicate
device tree support.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 589b92baaf Bluetooth: Kconfig: Remove BT_NO_DRIVER
There are no actual users in the main tree anymore, so just remove this
option.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 130ae9e120 Bluetooth: drivers: Convert Ambiq Apollo driver to new API
Convert the Ambiq Apollo HCI driver to the new HCI API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg eddac27c4e Bluetooth: samples: Fix PAwR samples to match board capabilities
These samples were enabled for an nRF board, even though there is no
upstream support for the feature. Additionally the sample.yaml files
were forcefully disabling any in-tree HCI drivers, making it impossible
to use e.g. qemu with an external HCI controller. Simply remove the nRF
board from the list, as well as the odd Kconfig HCI driver options.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg c68770eda8 qemu: Use BT_UART instead of BT_NO_DRIVER to enable serial port
The CONFIG_BT_NO_DRIVER option will be going away. Use the
CONFIG_BT_UART option instead (selected by UART HCI drivers) to
determine whether to enable the qemu serial port for Bluetooth.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 1824dcda7c Bluetooth: tests: Convert to new HCI driver API
Convert all Bluetooth tests that define dummy HCI driver instances to use
the new HCI driver API. This requires both a custom DTS binding as well
as an app-specific overlay file.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 66b53866a7 Bluetooth: drivers: userchan: don't fail everything if driver init fails
With the new HCI driver model it's not always critical if a single
instance fails to initialize. This is especially true for many test
applications which provide their own HCI drivers. Instead of causing a
complete failure, simply fail to initialize the driver instance.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg bb91aa0b7f Bluetooth: drivers: Convert userchan driver to new API
Convert the HCI User Channel driver to use the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg db753c1474 boards: nrf52_bsim: Add support for using UART as HCI
Add support for using an UART instead of the native controller. This is
accomplished with a custom DTS overlay for the tests that require it.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 97c3a1e4be Bluetooth: drivers: hci: Get rid of Kconfig choice
The drivers should be independent after the move to the new HCI driver
API. Having them as a choice also has unexpected consequences with some
drivers being unexpectedly enabled.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 00d66339fc Bluetooth: drivers: h5: Convert to new HCI driver API
Convert the H:5 HCI driver to use the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg f8befbd67a Bluetooth: host: hci_raw: Use existing H4 defines from hci_types.h
Use existing defines instead of redefining our own.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 7a4cd81376 Bluetooth: samples: hci_uart_async: Remove bt_recv() dependency
Apps shouldn't try to call bt_recv() since that's not a public API and
is going completely away with the new HCI driver API. Just inject the
buffer directly into the k_fifo which we anyway have access to in this
app.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 44e0f5fee3 Bluetooth: controller: Update to new HCI driver API
Update the native controller to the new HCI driver API. The devicetree
node is placed under existing `radio` nodes, which seemed like the most
intuitive option.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 3482a3be53 Bluetooth: drivers: Convert H4 (UART) HCI driver to new API
Convert the H4 driver to the new HCI driver API. This includes updating
also any boards that use the driver, i.e. adding the appropriate
devicetree node and chosen property to them.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg dcff0be792 Bluetooth: host: Add support for new-style HCI drivers
Add support for HCI drivers which use the newly defined HCI driver API.
Since Zephyr (currently) only supports a single HCI driver instance,
boards are expected to indicate the instance using a new devicetree
chosen property `zephyr,bt_hci`.

In order to maintain compatibility with not-yet-converted drivers the
code has been placed behind `#if DT_HAS_CHOSEN(zephyr_bt_hci)`
conditionals.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 7fb39a627b Bluetooth: include: Add initial HCI driver API definition
Add the initial HCI driver header file and driver API definition. This
is distinct from drivers/bluetooth/hci_driver.h in order to support
legacy (unconverted) drivers for the time being.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg 8ae074ec18 Bluetooth: Add devicetree base binding for Bluetooth HCI drivers
Add a base binding for Bluetooth HCI drivers. All HCI drivers should
extend this binding (through an include directive) to create their own
binding files.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Lauren Murphy 9ac63390db samples: sensor: update dht_polling to new API
Updates dht_polling sample to new sensor API.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-06-11 19:42:24 -04:00
Johan Hedberg aca152a941 manifest: Update hal_silabs version
Update the hal_silabs version. The only change is an added explicit name
for the module, so that it behaves consistently with other HAL modules.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-11 10:32:21 -07:00