/DragonOS/kernel/src/driver/acpi/ |
H A D | bus.rs | 3 bus::{bus_manager, Bus}, 37 .register(acpi_bus as Arc<dyn Bus>) in bus_init() 57 .set_bus(Some(Arc::downgrade(&(bus.clone() as Arc<dyn Bus>)))); in new() 62 impl Bus for AcpiBus {
|
/DragonOS/docs/kernel/filesystem/ |
H A D | sysfs.md | 70 pub trait Bus: Device {} 75 buses: BTreeMap<IdTable, Arc<dyn Bus>>, // 总线设备表 85 …对挂载在其上的设备和驱动进行匹配,并驱动设备。该总线是一类设备,同时也是一类总线,编程时需要创建该设备实例,并为设备实例实现Device trait和Bus trait,以表明该结构是一类总线设备… 95 /// @parameter bus: Bus设备实体 97 pub fn bus_register<T: Bus>(bus: Arc<T>) -> Result<(), DeviceError> {
|
/DragonOS/kernel/src/driver/base/ |
H A D | subsys.rs | 21 bus::{Bus, BusNotifyEvent}, 36 bus: SpinLock<Option<Weak<dyn Bus>>>, 68 bus: Option<Weak<dyn Bus>>, in new() argument 96 pub fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() argument 100 pub fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() argument 206 fn bus(&self) -> Option<Weak<dyn Bus>>; in bus() argument 207 fn set_bus(&self, bus: Option<Weak<dyn Bus>>); in set_bus() argument
|
H A D | cpu.rs | 17 bus::{subsystem_manager, Bus}, 47 &(cpu_subsys as Arc<dyn Bus>), in init() 73 .set_bus(Some(Arc::downgrade(&(bus.clone() as Arc<dyn Bus>)))); in new() 78 impl Bus for CpuSubSystem { 155 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() argument 159 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() argument
|
/DragonOS/kernel/src/driver/input/serio/ |
H A D | mod.rs | 4 use crate::driver::base::device::bus::{bus_register, Bus}; 27 let r = bus_register(serio_bus.clone() as Arc<dyn Bus>); in serio_bus_init()
|
H A D | serio_device.rs | 4 use crate::driver::base::device::{bus::Bus, device_manager, Device}; 66 device.set_bus(Some(Arc::downgrade(&(serio_bus() as Arc<dyn Bus>)))); in init_port()
|
H A D | subsys.rs | 13 device::{bus::Bus, driver::Driver, Device}, 37 .set_bus(Some(Arc::downgrade(&(bus.clone() as Arc<dyn Bus>)))); in new() 43 impl Bus for SerioBus {
|
H A D | serio_driver.rs | 5 bus::Bus, 68 driver.set_bus(Some(Arc::downgrade(&(serio_bus() as Arc<dyn Bus>)))); in register()
|
/DragonOS/kernel/src/driver/base/device/ |
H A D | bus.rs | 104 pub trait Bus: Debug + Send + Sync { trait 180 impl dyn Bus { implementation 242 kset_bus_map: RwLock<HashMap<Arc<KSet>, Arc<dyn Bus>>>, 361 pub fn register(&self, bus: Arc<dyn Bus>) -> Result<(), SystemError> { in register() 385 pub fn unregister(&self, _bus: Arc<dyn Bus>) -> Result<(), SystemError> { in unregister() 389 fn add_probe_files(&self, bus: &Arc<dyn Bus>) -> Result<(), SystemError> { in add_probe_files() 400 fn remove_probe_files(&self, bus: &Arc<dyn Bus>) { in remove_probe_files() argument 407 bus: &Arc<dyn Bus>, in create_file() argument 414 fn remove_file(&self, bus: &Arc<dyn Bus>, attr: &'static dyn Attribute) { in remove_file() argument 422 bus: &Arc<dyn Bus>, in add_groups() argument [all …]
|
H A D | driver.rs | 2 bus::{bus_manager, Bus}, 97 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() argument 101 fn set_bus(&self, bus: Option<Weak<dyn Bus>>); in set_bus() argument 120 pub bus: Option<Weak<dyn Bus>>,
|
/DragonOS/kernel/src/driver/pci/ |
H A D | device.rs | 10 bus::Bus, device_manager, driver::Driver, Device, DeviceCommonData, DeviceType, IdTable, 52 pci_dev.set_bus(Some(Arc::downgrade(&(pci_bus() as Arc<dyn Bus>)))); in device_add() 193 return DeviceType::Bus; in dev_type() 200 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() argument 204 fn set_bus(&self, bus: Option<alloc::sync::Weak<dyn Bus>>) { in set_bus() argument
|
H A D | driver.rs | 5 bus::Bus, 76 driver.set_bus(Some(Arc::downgrade(&(pci_bus() as Arc<dyn Bus>)))); in register()
|
H A D | subsys.rs | 12 bus::{bus_register, Bus}, 73 impl Bus for PciBus { 193 let r = bus_register(pci_bus.clone() as Arc<dyn Bus>); in pci_bus_subsys_init()
|
/DragonOS/kernel/src/driver/base/platform/ |
H A D | platform_driver.rs | 4 bus::Bus, 45 driver.set_bus(Some(Arc::downgrade(&(platform_bus() as Arc<dyn Bus>)))); in register()
|
H A D | subsys.rs | 15 device::{bus::Bus, driver::Driver, Device}, 38 .set_bus(Some(Arc::downgrade(&(bus.clone() as Arc<dyn Bus>)))); in new() 44 impl Bus for PlatformBus {
|
H A D | platform_device.rs | 11 bus::{Bus, BusState}, 89 pdev.set_bus(Some(Arc::downgrade(&(platform_bus() as Arc<dyn Bus>)))); in device_add() 280 return DeviceType::Bus; in dev_type() 288 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() argument 292 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() argument
|
H A D | mod.rs | 5 bus::{bus_register, Bus, BusState}, 91 let r = bus_register(paltform_bus.clone() as Arc<dyn Bus>); in platform_bus_init()
|
/DragonOS/kernel/src/driver/input/serio/i8042/ |
H A D | i8042_driver.rs | 10 device::{bus::Bus, driver::Driver, Device, IdTable}, 60 bus: Option<Weak<dyn Bus>>, 125 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() argument 129 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() argument
|
H A D | i8042_ports.rs | 11 device::{bus::Bus, driver::Driver, Device, DeviceCommonData, DeviceType, IdTable}, 65 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() argument 69 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() argument
|
H A D | i8042_device.rs | 10 bus::Bus, driver::Driver, Device, DeviceCommonData, DeviceState, DeviceType, IdTable, 69 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() argument 73 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() argument
|
/DragonOS/kernel/src/driver/virtio/ |
H A D | sysfs.rs | 15 bus::{bus_manager, Bus}, 56 .set_bus(Some(Arc::downgrade(&(bus.clone() as Arc<dyn Bus>)))); in new() 62 impl Bus for VirtIOBus { 173 driver.set_bus(Some(Arc::downgrade(&(virtio_bus() as Arc<dyn Bus>)))); in register() 192 dev.set_bus(Some(Arc::downgrade(&(virtio_bus() as Arc<dyn Bus>)))); in device_add()
|
H A D | virtio.rs | 4 use crate::driver::base::device::bus::Bus; 43 let bus = pci_bus() as Arc<dyn Bus>; in virtio_probe_pci()
|
/DragonOS/kernel/src/driver/pci/test/ |
H A D | pt_driver.rs | 11 bus::Bus, 106 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() argument 110 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() argument
|
H A D | pt_device.rs | 13 device::{bus::Bus, driver::Driver, Device, DeviceCommonData, DeviceType, IdTable}, 106 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() argument 140 fn set_bus(&self, bus: Option<Weak<dyn Bus>>) { in set_bus() argument
|
/DragonOS/kernel/src/driver/input/ps2_mouse/ |
H A D | ps_mouse_driver.rs | 14 device::{bus::Bus, driver::Driver, Device, DeviceId, IdTable}, 122 bus: Option<Weak<dyn Bus>>, 150 fn set_bus(&self, bus: Option<alloc::sync::Weak<dyn Bus>>) { in set_bus() argument 154 fn bus(&self) -> Option<Weak<dyn Bus>> { in bus() argument
|