Skip to content

Commit 64a373f

Browse files
edersondisouzanashif
authored andcommitted
doc/kernel/drivers: Mention deferred initialization
Add a section discussing device deferred initialization on the device model documentation. Signed-off-by: Ederson de Souza <[email protected]>
1 parent 7adc4b6 commit 64a373f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

doc/kernel/drivers/index.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,24 @@ Drivers and other system utilities can determine whether startup is
373373
still in pre-kernel states by using the :c:func:`k_is_pre_kernel`
374374
function.
375375

376+
Deferred initialization
377+
***********************
378+
379+
Initialization of devices can also be deferred to a later time. In this case,
380+
the device is not automatically initialized by Zephyr at boot time. Instead,
381+
the device is initialized when the application calls :c:func:`device_init`.
382+
To defer a device driver initialization, add the property ``zephyr,deferred-init``
383+
to the associated device node in the DTS file. For example:
384+
385+
.. code-block:: devicetree
386+
387+
/ {
388+
a-driver@40000000 {
389+
reg = <0x40000000 0x1000>;
390+
zephyr,deferred-init;
391+
};
392+
};
393+
376394
System Drivers
377395
**************
378396

0 commit comments

Comments
 (0)