我观察到整个设备拓扑基于Buses --> Device + Driver
. linux 提供的电源管理(suspend + resume)
存在于总线中。设备驱动程序中也有类似的功能。
struct bus_type { ***
int (*suspend)(struct device *dev, pm_message_t state);
int (*resume)(struct device *dev);
*** }
struct device_driver { ***
int (*suspend) (struct device *dev, pm_message_t state);
int (*resume) (struct device *dev);
*** }
那么这是如何实现的呢?