/DragonOS-0.1.9/kernel/src/driver/base/device/ |
D | bus.rs | 265 let bus = dev.bus().map(|bus| bus.upgrade()).flatten(); in add_device() localVariable 266 if let Some(bus) = bus { in add_device() 267 device_manager().add_groups(dev, bus.dev_groups())?; in add_device() 270 let bus_devices_kset = bus in add_device() 283 &(&bus.subsystem().subsys().as_kobject()), in add_device() 286 bus.subsystem().add_device_to_vec(dev)?; in add_device() 295 let bus = driver in add_driver() localVariable 296 .bus() in add_driver() 297 .map(|bus| bus.upgrade()) in add_driver() 300 kdebug!("bus '{}' add driver '{}'", bus.name(), driver.name()); in add_driver() [all …]
|
D | dd.rs | 19 bus::BusNotifyEvent, 85 let bus = dev in do_device_attach() localVariable 86 .bus() in do_device_attach() 87 .map(|bus| bus.upgrade()) in do_device_attach() 92 for driver in bus.subsystem().drivers().iter() { in do_device_attach() 148 if let Some(bus) = driver.bus().map(|bus| bus.upgrade()).flatten() { in do_device_attach_driver() 149 let r = bus.match_device(&data.dev, driver); in do_device_attach_driver() 215 if let Some(bus) = dev.bus().map(|bus| bus.upgrade()).flatten() { in device_bind_driver() 216 bus.subsystem().bus_notifier().call_chain( in device_bind_driver() 286 let bus = driver in driver_attach() localVariable [all …]
|
D | driver.rs | 2 bus::{bus_manager, Bus}, 92 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method 96 fn set_bus(&self, bus: Option<Weak<dyn Bus>>); in set_bus() 177 let bus = driver in register() localVariable 178 .bus() in register() 179 .map(|bus| bus.upgrade()) in register() 190 let other = bus.find_driver_by_name(&drv_name); in register()
|
D | mod.rs | 27 bus::{bus_add_device, bus_probe_device, Bus}, 39 pub mod bus; module 149 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method 158 fn set_bus(&self, bus: Option<Weak<dyn Bus>>); in set_bus() 470 if let Some(bus) = device.bus().map(|bus| bus.upgrade()).flatten() { in add_device() 471 bus.subsystem().bus_notifier().call_chain( in add_device() 472 bus::BusNotifyEvent::AddDevice, in add_device() 534 if let Some(bus) = device.bus().map(|bus| bus.upgrade()).flatten() { in get_device_parent() 535 if let Some(root) = bus.root_device().map(|x| x.upgrade()).flatten() { in get_device_parent()
|
/DragonOS-0.1.9/docs/kernel/filesystem/ |
D | sysfs.md | 91   对于bus设备而言,需要调用bus_register,将bus注册进系统,并在sysfs中可视化。 94 /// @brief: 总线注册,将总线加入全局总线管理器中,并根据id table在sys/bus和sys/devices下生成文件夹 95 /// @parameter bus: Bus设备实体 97 pub fn bus_register<T: Bus>(bus: Arc<T>) -> Result<(), DeviceError> { 98 BUS_MANAGER.add_bus(bus.get_id_table(), bus.clone()); 99 match sys_bus_register(&bus.get_id_table().to_name()) { 102 return device_register(bus); 109   通过bus_register源码可知,该函数不仅在sysfs/bus下生成总线文件夹,同时内部调用device_register,该函数将总线加入设备管理器中,同时在sys/…
|
/DragonOS-0.1.9/kernel/src/driver/base/ |
D | cpu.rs | 19 bus::{subsystem_manager, Bus}, 64 let bus = Arc::new(Self { in new() localVariable 67 bus.subsystem() in new() 68 .set_bus(Some(Arc::downgrade(&(bus.clone() as Arc<dyn Bus>)))); in new() 69 return bus; in new() 127 bus: Option<Weak<dyn Bus>>, field 138 bus: None, in new() 156 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() 157 self.inner.write().bus = bus; in set_bus() 160 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method [all …]
|
D | subsys.rs | 21 bus::{Bus, BusNotifyEvent}, 35 bus: SpinLock<Option<Weak<dyn Bus>>>, field 67 bus: Option<Weak<dyn Bus>>, in new() 76 bus: SpinLock::new(bus), in new() 91 pub fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method 92 return self.bus.lock().clone(); in bus() 95 pub fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() 96 *self.bus.lock() = bus; in set_bus() 195 fn bus(&self) -> Option<Weak<dyn Bus>>; in bus() method 196 fn set_bus(&self, bus: Option<Weak<dyn Bus>>); in set_bus()
|
D | init.rs | 7 device::{bus::buses_init, init::devices_init},
|
/DragonOS-0.1.9/kernel/src/driver/acpi/ |
D | bus.rs | 3 bus::{bus_manager, Bus}, 53 let bus = Arc::new(Self { in new() localVariable 56 bus.subsystem() in new() 57 .set_bus(Some(Arc::downgrade(&(bus.clone() as Arc<dyn Bus>)))); in new() 58 return bus; in new()
|
/DragonOS-0.1.9/kernel/src/driver/input/serio/i8042/ |
D | i8042_device.rs | 9 device::{bus::Bus, driver::Driver, Device, DeviceState, DeviceType, IdTable}, 34 bus: None, in new() 52 bus: Option<Weak<dyn Bus>>, field 73 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method 74 self.inner.lock().bus.clone() in bus() 77 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() 78 self.inner.lock().bus = bus; in set_bus()
|
D | i8042_ports.rs | 11 device::{bus::Bus, driver::Driver, Device, DeviceType, IdTable}, 35 bus: Option<Weak<dyn Bus>>, field 49 bus: None, in new() 71 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method 72 self.inner.lock().bus.clone() in bus() 75 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() 76 self.inner.lock().bus = bus; in set_bus()
|
D | i8042_driver.rs | 10 device::{bus::Bus, driver::Driver, Device, IdTable}, 41 bus: None, in new() 60 bus: Option<Weak<dyn Bus>>, field 125 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() 126 self.inner.lock().bus = bus; in set_bus() 129 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method 130 self.inner.lock().bus.clone() in bus()
|
/DragonOS-0.1.9/kernel/src/driver/base/platform/ |
D | subsys.rs | 12 device::{bus::Bus, driver::Driver, Device}, 33 let bus = Arc::new(Self { private }); in new() localVariable 34 bus.subsystem() in new() 35 .set_bus(Some(Arc::downgrade(&(bus.clone() as Arc<dyn Bus>)))); in new() 37 return bus; in new()
|
D | platform_device.rs | 11 bus::{Bus, BusState}, 198 bus: Option<Weak<dyn Bus>>, field 214 bus: None, in new() 293 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method 294 self.inner.lock().bus.clone() in bus() 297 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() 298 self.inner.lock().bus = bus; in set_bus()
|
D | platform_driver.rs | 4 bus::Bus,
|
/DragonOS-0.1.9/kernel/src/driver/input/serio/ |
D | subsys.rs | 12 device::{bus::Bus, driver::Driver, Device}, 34 let bus = Arc::new(Self { private }); in new() localVariable 35 bus.subsystem() in new() 36 .set_bus(Some(Arc::downgrade(&(bus.clone() as Arc<dyn Bus>)))); in new() 38 return bus; in new()
|
D | mod.rs | 4 use crate::driver::base::device::bus::{bus_register, Bus};
|
D | serio_device.rs | 4 use crate::driver::base::device::{bus::Bus, device_manager, Device};
|
/DragonOS-0.1.9/kernel/src/driver/serial/serial8250/ |
D | mod.rs | 17 bus::Bus, device_manager, device_number::DeviceNumber, driver::Driver, Device, 216 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method 217 self.inner.read().bus.clone() in bus() 220 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() 221 self.inner.write().bus = bus; in set_bus() 319 bus: Option<Weak<dyn Bus>>, field 331 bus: None, in new() 351 bus: Option<Weak<dyn Bus>>, field 362 bus: None, in new() 461 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method [all …]
|
/DragonOS-0.1.9/kernel/src/driver/input/ps2_mouse/ |
D | ps_mouse_driver.rs | 13 device::{bus::Bus, driver::Driver, Device, DeviceId, IdTable}, 90 bus: None, in new() 121 bus: Option<Weak<dyn Bus>>, field 149 fn set_bus(&self, bus: Option<alloc::sync::Weak<dyn Bus>>) { in set_bus() 150 self.inner.lock().bus = bus; in set_bus() 153 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method 154 self.inner.lock().bus.clone() in bus()
|
D | ps_mouse_device.rs | 17 bus::Bus, device_manager, device_number::DeviceNumber, driver::Driver, Device, 186 bus: None, in new() 414 bus: Option<Weak<dyn Bus>>, field 446 fn set_bus(&self, bus: Option<alloc::sync::Weak<dyn Bus>>) { in set_bus() 447 self.inner.lock_irqsave().bus = bus; in set_bus() 472 fn bus(&self) -> Option<alloc::sync::Weak<dyn Bus>> { in bus() method 473 self.inner.lock_irqsave().bus.clone() in bus()
|
/DragonOS-0.1.9/kernel/src/driver/video/fbdev/base/fbcon/ |
D | mod.rs | 12 device::{bus::Bus, device_manager, driver::Driver, Device, DeviceType, IdTable}, 94 bus: Option<Weak<dyn Bus>>, field 116 bus: None, in new() 192 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() 193 self.inner.lock().bus = bus; in set_bus() 196 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method 197 self.inner.lock().bus.clone() in bus()
|
/DragonOS-0.1.9/kernel/src/arch/x86_64/pci/ |
D | pci.rs | 16 let address = ((bus_device_function.bus as u32) << 16) in read_config() 30 let address = ((bus_device_function.bus as u32) << 16) in write_config()
|
/DragonOS-0.1.9/kernel/src/driver/video/fbdev/ |
D | vesafb.rs | 21 bus::Bus, device_manager, driver::Driver, Device, DeviceState, DeviceType, IdTable, 102 bus: None, in new() 124 bus: Option<Weak<dyn Bus>>, field 184 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() method 185 self.inner.lock().bus.clone() in bus() 188 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() 189 self.inner.lock().bus = bus; in set_bus() 614 bus: None, in new() 633 bus: Option<Weak<dyn Bus>>, field 698 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() [all …]
|
/DragonOS-0.1.9/kernel/src/driver/tty/ |
D | tty_device.rs | 14 bus::Bus, 53 bus: Option<Weak<dyn Bus>>, field 66 bus: None, in new() 425 fn set_bus(&self, bus: Option<alloc::sync::Weak<dyn crate::driver::base::device::bus::Bus>>) { in set_bus() 426 self.inner.write().bus = bus in set_bus()
|