Skip to content

Commit

Permalink
doc: drivers: add a paragraph mentioning the initlevels target
Browse files Browse the repository at this point in the history
Add a paragraph mentioning the initlevels target for inspecting the
DEVICE_DEFINE and SYS_INIT sequence.

(cherry picked from commit bc43e89)

Original-Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
GitOrigin-RevId: bc43e89
Change-Id: I706024cecb8dd47f2c42706e0b31f964d17b63e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4987906
Tested-by: Fabio Baltieri <fabiobaltieri@google.com>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
  • Loading branch information
fabiobaltieri authored and Chromeos LUCI committed Oct 30, 2023
1 parent 6b7524a commit d6ec60a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/kernel/drivers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,18 @@ In some cases you may just need to run a function at boot. For such cases, the
data structures and there isn't a way to later get a device pointer by name. The
same device policies for initialization level and priority apply.

Inspecting the initialization sequence
**************************************

Device drivers declared with :c:macro:`DEVICE_DEFINE` (or any variations of it)
and :c:macro:`SYS_INIT` are processed at boot time and the corresponding
initialization functions are called sequentially according to their specified
level and priority.

Sometimes it's useful to inspect the final sequence of initialization function
call as produced by the linker. To do that, use the ``initlevels`` CMake
target, for example ``west build -t initlevels``.

Error handling
**************

Expand Down

0 comments on commit d6ec60a

Please sign in to comment.