When is the Linux Device Tree parsed?

The Linux Device Tree is parsed during the kernel startup phase. When the Linux kernel starts, it reads the device tree file (dtb file) and organizes devices, loads drivers, etc. based on the information in it. In driver code, we usually start parsing device tree-related information during driver initialization (such as the probe function). At this stage the kernel has been started and the device tree has been loaded and parsed. Usually, we need to obtain the required information or resources, such as IO resources, interrupt numbers, clocks, etc., through related APIs, such as of_find_node_by_name, of_get_property, and other functions.of_get_named_gpio

Guess you like

Origin blog.csdn.net/qq_41483419/article/details/133272146