Commit graph

106433 commits

Author SHA1 Message Date
Akaiwa Wataru
1bb5c34f98 tests: kernel/sched: 32-bit tick wraparound during k_sleep() execution
This test reproduce the issue: https://github.com/zephyrproject-rtos/zephyr/issues/79863

In this test, instead of waiting the 32-bit tick wraparound for several
days, patching the kernel internal tick with the test API.

Signed-off-by: Akaiwa Wataru <akaiwa@sonas.co.jp>
2024-12-03 02:37:03 +01:00
Akaiwa Wataru
feefb7dd35 kernel/sched: correct k_sleep() return value calculation
Fix the issue: https://github.com/zephyrproject-rtos/zephyr/issues/79863

The expected_wakeup_ticks and sys_clock_tick_get_32() are uint32_t values,
and may wrap around individually.
If the expected_wakeup_ticks has a wraparound and sys_clock_tick_get_32()
doesn't, so expected_wakeup_ticks < sys_clock_tick_get_32(), the API return
value will be corrupted.

The API return value, that is the remaining time, should be calculated in
32bit-unsigned-integer manner, and any wraparound will be treated properly.

Signed-off-by: Akaiwa Wataru <akaiwa@sonas.co.jp>
2024-12-03 02:37:03 +01:00
Pieter De Gendt
4fb6ce39df drivers: coredump: Place API into iterable section
Add wrapper DEVICE_API macro to all coredump_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-03 02:36:38 +01:00
Pieter De Gendt
41b0bd12ed drivers: espi: saf: Place API into iterable section
Add wrapper DEVICE_API macro to all espi_saf_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:09:03 +00:00
Pieter De Gendt
e2cde472a7 drivers: mspi: Place API into iterable section
Add wrapper DEVICE_API macro to all mspi_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:09:03 +00:00
Pieter De Gendt
bad2bee941 drivers: espi: Place API into iterable section
Add wrapper DEVICE_API macro to all espi_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:09:03 +00:00
Pieter De Gendt
c896dd370e drivers: serial: Move esp32 serial UART API from DRAM to ROM
The API was placed in RAM to support logging stack unwinding, however
device instances are also placed in ROM, so should the API instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:56 +00:00
Pieter De Gendt
29c9b91340 drivers: serial: Place API into iterable section
Add wrapper DEVICE_API macro to all uart_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:56 +00:00
Pieter De Gendt
84a3d1fd9f drivers: serial: uart_native: Do not change API at runtime
The UART API is known at compile time based on Kconfig options.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:56 +00:00
Pieter De Gendt
9dd07da0a1 drivers: flash: Place API into iterable section
Add wrapper DEVICE_API macro to all flash_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:48 +00:00
Pieter De Gendt
a87274780b drivers: regulator: parent: Place API into iterable section
Add wrapper DEVICE_API macro to all regulator_parent_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:41 +00:00
Pieter De Gendt
d596afc2e7 drivers: regulator: Place API in iterable section
Add wrapper DEVICE_API macro to all regulator_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:41 +00:00
Pieter De Gendt
d0d8158280 tests: drivers: regulator: Test not implemented APIs with dummies
Instead of writing to existing fake APIs, use dummy devices with empty
APIs. This allows us to place APIs in ROM.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:41 +00:00
Axel Le Bourhis
841311330b cmake: linker: ld: fix duplicate LINK_FLAGS
Original implementation of `toolchain_linker_finalize` duplicates
the `LINK_FLAGS` in the link command. This can cause some problems
like duplicate definitions when using link options like
`--whole-archive`.

This commit fixes it by removing the duplicate `LINK_FLAGS`.

Fixes #82281

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2024-12-02 22:08:21 +00:00
Pieter De Gendt
1a0c852e0d drivers: interrupt_controller: Place API into iterable section
Add wrapper DEVICE_API macro to all vtd_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:07 +00:00
Pieter De Gendt
ec205e77e5 drivers: timeaware_gpio: Place API into iterable section
Add wrapper DEVICE_API macro to all tgpio_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:07 +00:00
Pieter De Gendt
a113baa4d5 drivers: tee: Place API into iterable section
Add wrapper DEVICE_API macro to all tee_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:07 +00:00
Pieter De Gendt
4432d9c1fe drivers: syscon: Place API into iterable section
Add wrapper DEVICE_API macro to all syscon_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:07 +00:00
Pieter De Gendt
36a785aaa7 drivers: sip_svc: Place API into iterable section
Add wrapper DEVICE_API macro to all svc_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:07 +00:00
Pieter De Gendt
c0adf726ff drivers: stepper: Place API into iterable section
Add wrapper DEVICE_API macro to all stepper_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:07 +00:00
Pieter De Gendt
80537d9b85 drivers: smbus: Place API into iterable section
Add wrapper DEVICE_API macro to all smbus_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:07 +00:00
Pieter De Gendt
74fc1b171d drivers: interrupt_controller: Place API into iterable section
Add wrapper DEVICE_API macro to all shared_irq_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:07 +00:00
Pieter De Gendt
6cfb14c823 drivers: reset: Place API into iterable section
Add wrapper DEVICE_API macro to all reset_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:07 +00:00
Pieter De Gendt
6e81a3e490 drivers: ps2: Place API into iterable section
Add wrapper DEVICE_API macro to all ps2_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:07 +00:00
Pieter De Gendt
dd2a9bc344 drivers: peci: Place API into iterable sections
Add wrapper DEVICE_API macro to all peci_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:07 +00:00
Pieter De Gendt
566c12228e drivers: mipi_dsi: Place API into iterable section
Add wrapper DEVICE_API macro to all mipi_dsi_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:07:56 +00:00
Yishai Jaffe
812347fae8 drivers: spi: Place API into iterable section
Add wrapper DEVICE_API macro to all spi_driver_api instances.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-02 22:07:50 +00:00
Yishai Jaffe
458b2881d3 drivers: led_strip: Place API into iterable section
Add wrapper DEVICE_API macro to all led_strip_driver_api instances.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-02 22:07:42 +00:00
Yishai Jaffe
589be4e49c led: shell: filter device lookup using DEVICE_API macros
Filter for led devices when looking them up in dynamic shell commands.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-02 22:07:36 +00:00
Yishai Jaffe
c09930ed30 drivers: led: Place API into iterable section
Add wrapper DEVICE_API macro to all led_driver_api instances.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-02 22:07:36 +00:00
Pieter De Gendt
710aee823e drivers: kscan: Place API into iterable section
Add wrapper DEVICE_API macro to all kscan_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:07:29 +00:00
Pieter De Gendt
856ed9188c drivers: virtualization: Place API into iterable section
Add wrapper DEVICE_API macro to all ivshmem_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:07:18 +00:00
Pieter De Gendt
0668151a2f drivers: ipm: Place API into iterable section
Add wrapper DEVICE_API macro to all ipm_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:07:08 +00:00
Manuel Argüelles
82f4fd5469 doc: migration-guide-4.1: add note about nxp,imx-lpspi change
Add note about compatible change for nxp,imx-lpspi.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-02 22:06:47 +00:00
Manuel Argüelles
4ab9172c92 dts: bindings: rename nxp,imx-lpspi compatible
Rename "nxp,imx-lpspi" compatible to "nxp,lpspi" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-02 22:06:47 +00:00
Manuel Argüelles
97bb2343b0 doc: migration-guide-4.1: add note about nxp,kinetis-wdog32 change
Add note about compatible change for nxp,kinetis-wdog32.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-02 22:06:39 +00:00
Manuel Argüelles
dbd20bd039 dts: bindings: rename nxp,kinetis-wdog32 compatible
Rename "nxp,kinetis-wdog32" compatible to "nxp,wdog32" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-02 22:06:39 +00:00
Bjarki Arge Andreasen
ef2fde857e comparator: shell: filter device lookup using DEVICE_API macros
Filter for comparator devices when looking them up in dynamic shell
commands.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-12-02 22:06:32 +00:00
Bjarki Arge Andreasen
957ece8bc2 drivers: comparator: update API to use DEIVCE_API macros
Update comparator API and device drivers to use DEVICE_API macros.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-12-02 22:06:32 +00:00
Pieter De Gendt
3e87587fd8 drivers: haptics: Place API into iterable section
Add wrapper DEVICE_API macro to all haptics_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:06:06 +00:00
Pieter De Gendt
6d178f9cd9 drivers: gpio: Place API into iterable section
Add wrapper DEVICE_API macro to all gpio_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:05:59 +00:00
Pieter De Gendt
548958de05 drivers: eeprom: Place API into iterable section
Add wrapper DEVICE_API macro to all eeprom_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:05:47 +00:00
Pieter De Gendt
39a49431c7 drivers: display: Place API into iterable section
Add wrapper DEVICE_API macro to all display_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:05:41 +00:00
Pieter De Gendt
454cc58246 drivers: dac: Place API into iterable section
Add wrapper DEVICE_API macro to all dac_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:05:33 +00:00
Tomasz Chyrowicz
866e690dda scripts: nrf_common: Move MPI to sysbuild Kconfig
Use sysbuild to build and configure SUIT Manifest Provisioning
Information.

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
2024-12-02 22:05:27 +00:00
Tomasz Chyrowicz
811ff1f209 compliance: Remove SUIT MPI symbols
Remove SUIT MPI symbols from compliance exclusion list.

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
2024-12-02 22:05:27 +00:00
McAtee Maxwell
3024392d35 SOC: Remove config PINCTRL from xmc4xxx soc
- Move selection of CONFIG_PINCTRL from soc to individual
	  drivers
	- in accordance with issue #78619

Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
2024-12-02 22:05:16 +00:00
Grzegorz Swiderski
f76c7e3a9a scripts: ci: check_compliance: Account for board & SoC extensions
When a given board or SoC is extended, it has more than one directory
associated with it, where the build system can look for Kconfig files.
Make sure all of them are also included for Kconfig compliance checks.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-12-02 22:05:10 +00:00
Jilay Pandya
9bca4921e4 drivers: w1: place api in iterable sections
this commit places w1 driver class in iterable sections

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-02 23:04:59 +01:00
Pieter De Gendt
e16dece057 drivers: sensor: shell: Check sensor API type
Update sensor shell commands to filter and verify the device's API type.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:04:55 +00:00