如何检查设备树中是否存在适配器设备?在 /proc/device-tree

How to check if adapter device is present in device tree? In /proc/device-tree

如何使用 /proc/device-tree 检查设备是否存在于设备树中?

/proc/device-tree 只会为您提供有关配置信息的信息,而不是有关设备 运行 状态的信息。如果设备驱动程序不是 creating/using /proc 目录中的文件夹,那么我认为您最好在 /sys/class 下查看设备是否可用以及当前状态。