一、平台设备注册流程
1、ACPI平台设备枚举
acpi_init
-> acpi_scan_init
-> acpi_bus_scan
-> acpi_bus_attach
-> acpi_scan_attach_handler
-> acpi_generic_device_attach
-> acpi_default_enumeration
-> acpi_create_platform_device
-> platform_device_register_full
-> platform_device_alloc
-> platform_device_add_resources
-> platform_device_add_data
-> platform_device_add_properties
-> platform_device_add
2、OF平台设备枚举
2.1、设备数展开
setup_arch
-> setup_machine_fdt
-> early_init_dt_scan
-> early_init_dt_scan_nodes
-> of_scan_flat_dt
-> unflatten_and_copy_device_tree
-> unflatten_device_tree
-> __unflatten_device_tree
-> unflatten_dt_nodes
-> populate_node
-> unflatten_dt_alloc
-> populate_properties
2.2、 生成平台设备
of_platform_default_populate_init
-> of_platform_default_populate
-> of_platform_populate
-> of_platform_bus_create
-> of_dev_lookup
-> of_platform_device_create_pdata
-> of_device_alloc
-> of_device_add
-> device_add