forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
device: only allow PRE_KERNEL_1/2 and POST_KERNEL levels
Because devices share the same underlying infrastructure with SYS_INIT, the same levels have always been available. However, not all of them are needed, and some are not even usable. For example, `EARLY` can't be used because when initialized `z_device_state_init` has not been called yet. `SMP` has never been used by device drivers, and it is now in question, likely to be moved to SMP specific hooks. Finally, `APPLICATION` does not make much sense in the context of Kernel devices. Note that of the 3 levels just mentioned, only one was actively tested (`APPLICATION`) by Kernel tests, meaning others were likely never considered in the context of devices. This patch leaves `PRE_KERNEL_1`, `PRE_KERNEL_2` and `POST_KERNEL` available to devices. Others have been deprecated, and will generate a compiler warning if used. Signed-off-by: Gerard Marull-Paretas <[email protected]>
- Loading branch information
1 parent
634416b
commit beec8b0
Showing
2 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters