Home
last modified time | relevance | path

Searched refs:devices (Results 1 – 5 of 5) sorted by relevance

/DragonOS-0.1.8/kernel/src/driver/base/platform/
Dmod.rs78 let device_map = &self.0.lock().devices; in get_device()
129 let devices = &mut self.0.lock().devices; in register_platform_device() localVariable
130 if devices.contains_key(&id_table) { in register_platform_device()
133 devices.insert(id_table.clone(), device.clone()); in register_platform_device()
145 self.0.lock().devices.remove(&id_table); in unregister_platform_device()
154 let devices = &self.0.lock().devices; in driver_match_device() localVariable
156 for (_dev_id_table, device) in devices.iter() { in driver_match_device()
210 devices: BTreeMap<IdTable, Arc<dyn PlatformDevice>>, // 总线上所有设备 field
223 devices: BTreeMap::new(), in new()
257 if self.0.lock().devices.is_empty() && self.0.lock().drivers.is_empty() { in is_empty()
/DragonOS-0.1.8/kernel/src/driver/base/device/
Dmod.rs6 devices::{sys_device_register, sys_device_unregister},
214 device_manager.devices.insert(id_table, dev); in add_device()
224 device_manager.devices.remove(id_table); in remove_device()
234 device_manager.devices.get(id_table).cloned() in get_device()
250 devices: BTreeMap<IdTable, Arc<dyn Device>>, // 所有设备 field
261 devices: BTreeMap::new(), in new()
/DragonOS-0.1.8/docs/kernel/filesystem/
Dsysfs.md38 devices: BTreeMap<IdTable, Arc<dyn Device>>, // 所有设备
81 …管理器中均存在sys_info,设备模型通过该成员与sysfs建立联系,sys_info指向sysfs中唯一的inode。对于device而言,对应sysfs下的devices文件夹,其他亦是如此。
94 /// @brief: 总线注册,将总线加入全局总线管理器中,并根据id table在sys/bus和sys/devices下生成文件夹
109 …s_register源码可知,该函数不仅在sysfs/bus下生成总线文件夹,同时内部调用device_register,该函数将总线加入设备管理器中,同时在sys/devices下生成设备文件夹。
/DragonOS-0.1.8/kernel/src/filesystem/sysfs/
Dbus.rs43 Ok(devices) => match lock_bus.add_dir("drivers") { in sys_bus_init()
44 Ok(drivers) => Ok((devices, drivers)), in sys_bus_init()
Dmod.rs21 pub mod devices; module
113 Ok(devices) => unsafe { in new()
114 __SYS_DEVICES_INODE = Box::leak(Box::new(devices)); in new()