☰
platform_bus_init / device_register / bus_register / device / of_platform_register_reconfig_notifier
2026/10/1 10:22:49 网站建设 项目流程

platform_bus_init

  • 1. platform_bus_init 函数
    • 1.1 device_register 函数
    • 1.2 bus_register 函数
    • 1.3 of_platform_register_reconfig_notifier 函数
    • 1.4 device 结构体

1. platform_bus_init 函数

  1. 通过early_platform_cleanup()函数,清理早期平台设备(将早期启动阶段通过early_platform_driver_register注册的平台设备进行清理或转移)
  2. 通过 device_register 函数

1.1初始化platform_bus结构体(struct device)
1.2创建/sys/devices/platform目录,并将devices_kset->list插入到platform_bus->kobj.entry链表中
1.3创建/sys/devices/platform/uevent文件(uevent 的属性文件)


1.1 device_register 函数

  1. 通过 device_initialize 函数,初始化 platform_bus 虚拟设备结构体

  2. 通过 device_add 函数,完成下列任务:

2.1初始化 device 结构体
2.2kobject_add 函数,创建/sys/devices/platform目录,并将devices_kset->list插入到platform_bus->kobj.entry链表中
2.3device_create_file 函数,创建/sys/devices/platform/uevent文件(uevent 的属性文件)
2.4device_add_class_symlinks 函数,什么都不做
2.5device_add_attrs 函数,什么都不做
2.6bus_add_device 函数,什么都不做
2.7dpm_sysfs_add 函数,什么都不做
2.8device_pm_add 函数,什么都不做
2.9kobject_uevent 函数,什么都不做
2.10bus_probe_device 函数,什么都不做


device_register 函数


1.2 bus_register 函数

1.3 of_platform_register_reconfig_notifier 函数

1.4device 结构体

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询