Home
last modified time | relevance | path

Searched refs:driver (Results 1 – 25 of 193) sorted by relevance

12345678

/DragonOS/kernel/src/driver/base/device/
H A Ddd.rs8 driver::base::kobject::KObject,
22 driver::{driver_manager, Driver, DriverManager},
74 if dev.driver().is_some() { in do_device_attach()
97 for driver in bus.subsystem().drivers().iter() { in do_device_attach()
98 let r = self.do_device_attach_driver(driver, &mut data); in do_device_attach()
149 driver: &Arc<dyn Driver>, in do_device_attach_driver()
152 if let Some(bus) = driver.bus().and_then(|bus| bus.upgrade()) { in do_device_attach_driver()
153 let r = bus.match_device(&data.dev, driver); in do_device_attach_driver()
170 let async_allowed = driver.allows_async_probing(); in do_device_attach_driver()
176 .probe_device(driver, &data.dev) in do_device_attach_driver()
[all …]
H A Ddriver.rs6 driver::base::{
195 pub fn register(&self, driver: Arc<dyn Driver>) -> Result<(), SystemError> { in register()
196 let bus = driver.bus().and_then(|bus| bus.upgrade()).ok_or_else(|| { in register()
199 driver.name() in register()
204 let drv_name = driver.name(); in register()
214 bus_manager().add_driver(&driver)?; in register()
216 self.add_groups(&driver, driver.groups()) in register()
218 bus_manager().remove_driver(&driver); in register()
228 pub fn unregister(&self, driver: &Arc<dyn Driver>) { in unregister()
229 self.remove_groups(driver, driver.groups()); in unregister()
[all …]
H A Dbus.rs2 driver::{Driver, DriverMatchName, DriverMatcher},
6 driver::base::{
7 device::{device_manager, driver::driver_manager},
295 pub fn add_driver(&self, driver: &Arc<dyn Driver>) -> Result<(), SystemError> { in add_driver()
296 let bus = driver in add_driver()
300 debug!("bus '{}' add driver '{}'", bus.name(), driver.name()); in add_driver()
303 let kobj = driver.clone() as Arc<dyn KObject>; in add_driver()
311 bus.subsystem().add_driver_to_vec(driver)?; in add_driver()
313 let r = driver_manager().driver_attach(driver); in add_driver()
315 bus.subsystem().remove_driver_from_vec(driver); in add_driver()
[all …]
/DragonOS/kernel/src/driver/tty/
H A Dtty_driver.rs14 driver::{
20 driver::Driver,
57 for driver in drivers_guard.iter() { in lookup_tty_driver()
58 let base = DeviceNumber::new(driver.major, driver.minor_start); in lookup_tty_driver()
59 if dev_num < base || dev_num.data() > base.data() + driver.device_count { in lookup_tty_driver()
62 return Some(((dev_num.data() - base.data()) as usize, driver.clone())); in lookup_tty_driver()
69 pub fn tty_register_driver(mut driver: TtyDriver) -> Result<Arc<TtyDriver>, SystemError> { in tty_register_driver()
71 if driver.major == Major::UNNAMED_MAJOR { in tty_register_driver()
73 driver.minor_start, in tty_register_driver()
74 driver.device_count, in tty_register_driver()
[all …]
H A Dtty_device.rs10 driver::{
18 driver::Driver,
61 driver: Option<Weak<dyn Driver>>, field
74 driver: None, in new()
149 let (index, driver) = in open()
152 let tty = driver.open_tty(Some(index))?; in open()
168 let driver = tty.core().driver(); in open() localVariable
172 || (driver.tty_driver_type() == TtyDriverType::Pty in open()
173 && driver.tty_driver_sub_type() == TtyDriverSubType::PtyMaster)) in open()
464 fn kset(&self) -> Option<Arc<crate::driver::base::kset::KSet>> { in kset()
[all …]
H A Dtty_core.rs14 driver::{base::device::device_number::DeviceNumber, tty::pty::ptm_driver},
46 if self.core.driver().tty_driver_sub_type() == TtyDriverSubType::PtySlave { in drop()
53 pub fn new(driver: Arc<TtyDriver>, index: usize) -> Arc<Self> { in new()
54 let name = driver.tty_line_name(index); in new()
55 let device_number = driver in new()
58 let termios = driver.init_termios(); in new()
60 tty_driver: driver, in new()
108 .driver() in write_to_core()
115 let driver = tty_core.driver(); in reopen() localVariable
117 if driver.tty_driver_type() == TtyDriverType::Pty in reopen()
[all …]
/DragonOS/kernel/src/driver/base/platform/
H A Dplatform_driver.rs3 use crate::driver::base::device::{
5 driver::{driver_manager, Driver},
44 pub fn register(&self, driver: Arc<dyn PlatformDriver>) -> Result<(), SystemError> { in register()
45 driver.set_bus(Some(Arc::downgrade(&(platform_bus() as Arc<dyn Bus>)))); in register()
46 return driver_manager().register(driver as Arc<dyn Driver>); in register()
51 pub fn unregister(&self, driver: &Arc<dyn PlatformDriver>) { in unregister()
52 driver_manager().unregister(&(driver.clone() as Arc<dyn Driver>)); in unregister()
H A Dsubsys.rs12 driver::{
15 device::{bus::Bus, driver::Driver, Device},
62 let drv = device.driver().ok_or(SystemError::EINVAL)?; in probe()
123 driver: &Arc<dyn Driver>, in match_device()
126 if let Ok(x) = acpi_manager().driver_match_device(driver, device) { in match_device()
133 if let Some(drv_id_table) = driver.id_table() { in match_device()
144 return Ok(device.name().eq(&driver.name())); in match_device()
/DragonOS/kernel/src/driver/input/serio/
H A Dserio_driver.rs4 use crate::driver::base::device::{
6 driver::{driver_manager, Driver},
67 pub fn register(&self, driver: Arc<dyn SerioDriver>) -> Result<(), SystemError> { in register()
68 driver.set_bus(Some(Arc::downgrade(&(serio_bus() as Arc<dyn Bus>)))); in register()
69 return driver_manager().register(driver as Arc<dyn Driver>); in register()
81 pub fn unregister(&self, driver: &Arc<dyn SerioDriver>) { in unregister()
82 driver_manager().unregister(&(driver.clone() as Arc<dyn Driver>)); in unregister()
H A Dsubsys.rs10 driver::{
13 device::{bus::Bus, driver::Driver, Device},
61 let drv = device.driver().ok_or(SystemError::EINVAL)?; in probe()
100 driver: &Arc<dyn Driver>, in match_device()
103 if let Ok(x) = acpi_manager().driver_match_device(driver, device) { in match_device()
110 if let Some(drv_id_table) = driver.id_table() { in match_device()
121 return Ok(device.name().eq(&driver.name())); in match_device()
/DragonOS/kernel/src/driver/pci/
H A Ddriver.rs4 use crate::driver::base::device::{
6 driver::{driver_manager, Driver},
75 pub fn register(&self, driver: Arc<dyn PciDriver>) -> Result<(), SystemError> { in register()
76 driver.set_bus(Some(Arc::downgrade(&(pci_bus() as Arc<dyn Bus>)))); in register()
77 return driver_manager().register(driver as Arc<dyn Driver>); in register()
81 pub fn unregister(&self, driver: &Arc<dyn PciDriver>) { in unregister()
82 driver_manager().unregister(&(driver.clone() as Arc<dyn Driver>)); in unregister()
H A Dsubsys.rs10 driver::base::{
14 driver::Driver,
25 driver::PciDriver,
91 let drv = device.driver().ok_or(SystemError::EINVAL)?; in probe()
130 driver: &Arc<dyn Driver>, in match_device()
133 let pci_driver = driver.clone().cast::<dyn PciDriver>().map_err(|_| { in match_device()
147 if let Some(driver_id_table) = driver.id_table() { in match_device()
175 _kobj: Arc<dyn crate::driver::base::kobject::KObject>, in is_visible()
H A Ddevice.rs8 driver::base::{
10 bus::Bus, device_manager, driver::Driver, Device, DeviceCommonData, DeviceType, IdTable,
162 ) -> crate::libs::rwlock::RwLockReadGuard<crate::driver::base::kobject::KObjectState> { in kobj_state()
208 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
209 self.inner().device_common.driver.clone()?.upgrade() in driver()
216 fn set_driver(&self, driver: Option<alloc::sync::Weak<dyn Driver>>) { in set_driver()
217 self.inner().device_common.driver = driver; in set_driver()
228 fn set_class(&self, _class: Option<alloc::sync::Weak<dyn crate::driver::base::class::Class>>) { in set_class()
H A Draw_device.rs9 driver::base::{
11 device::{bus::Bus, driver::Driver, Device, DeviceCommonData, DeviceType, IdTable},
128 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
129 self.inner.read().device_common.driver.clone()?.upgrade() in driver()
158 fn set_driver(&self, driver: Option<Weak<dyn Driver>>) { in set_driver()
159 self.inner.write().device_common.driver = driver in set_driver()
/DragonOS/kernel/src/driver/net/e1000e/
H A De1000e_driver.rs5 driver::{
8 device::{bus::Bus, driver::Driver, Device, DeviceCommonData, DeviceType, IdTable},
42 driver: E1000EDriver, field
84 driver: E1000EDriverWrapper, field
117 let mut device = self.driver.inner.lock(); in consume()
159 driver: self.clone(), in receive()
171 driver: self.clone(), in transmit()
194 pub fn new(mut driver: E1000EDriver) -> Arc<Self> { in new()
197 smoltcp::wire::EthernetAddress(driver.inner.lock().mac_address()), in new()
202 smoltcp::iface::Interface::new(iface_config, &mut driver, Instant::now().into()); in new()
[all …]
/DragonOS/kernel/src/driver/net/
H A Dloopback.rs2 use crate::driver::base::class::Class;
3 use crate::driver::base::device::bus::Bus;
4 use crate::driver::base::device::driver::Driver;
5 use crate::driver::base::device::{Device, DeviceCommonData, DeviceType, IdTable};
6 use crate::driver::base::kobject::{
9 use crate::driver::base::kset::KSet;
62 driver: LoopbackDriver, field
82 let mut device = self.driver.inner.lock(); in consume()
227 driver: self.clone(), in receive()
242 driver: self.clone(), in transmit()
[all …]
H A Dvirtio_net.rs22 driver::{
27 driver::{Driver, DriverCommonData},
223 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
224 let r = self.inner().device_common.driver.clone()?.upgrade(); in driver()
226 self.inner().device_common.driver = None; in driver()
232 fn set_driver(&self, driver: Option<Weak<dyn Driver>>) { in set_driver()
233 self.inner().device_common.driver = driver; in set_driver()
475 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
476 let r = self.inner().device_common.driver.clone()?.upgrade(); in driver()
478 self.inner().device_common.driver = None; in driver()
[all …]
/DragonOS/kernel/src/driver/virtio/
H A Dvirtio.rs4 use crate::driver::base::device::bus::Bus;
5 use crate::driver::base::device::{Device, DeviceId};
6 use crate::driver::block::virtio_blk::virtio_blk;
7 use crate::driver::net::virtio_net::virtio_net;
8 use crate::driver::pci::pci::{
12 use crate::driver::pci::subsys::pci_bus;
13 use crate::driver::virtio::transport::VirtIOTransport;
/DragonOS/kernel/src/driver/tty/pty/
H A Dunix98pty.rs5 driver::tty::{
38 fn install(&self, driver: Arc<TtyDriver>, tty: Arc<TtyCore>) -> Result<(), SystemError> { in install()
39 PtyCommon::pty_common_install(driver, tty, false) in install()
78 if core.driver().tty_driver_sub_type() != TtyDriverSubType::PtyMaster { in ioctl()
109 if core.driver().tty_driver_sub_type() != TtyDriverSubType::PtySlave { in set_termios()
162 if core.driver().tty_driver_sub_type() != TtyDriverSubType::PtySlave { in start()
180 if core.driver().tty_driver_sub_type() != TtyDriverSubType::PtySlave { in stop()
218 let driver = tty.core().driver(); in close() localVariable
220 if tty.core().driver().tty_driver_sub_type() == TtyDriverSubType::PtySlave { in close()
221 driver.ttys().remove(&tty.core().index()); in close()
[all …]
/DragonOS/kernel/src/driver/input/serio/i8042/
H A Di8042_ports.rs8 driver::{
11 device::{bus::Bus, driver::Driver, Device, DeviceCommonData, DeviceType, IdTable},
86 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
87 self.inner().device_common.driver.clone()?.upgrade() in driver()
90 fn set_driver(&self, driver: Option<Weak<dyn Driver>>) { in set_driver()
91 self.inner().device_common.driver = driver; in set_driver()
H A Di8042_device.rs7 driver::base::{
10 bus::Bus, driver::Driver, Device, DeviceCommonData, DeviceState, DeviceType, IdTable,
89 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
90 self.inner().device_common.driver.clone()?.upgrade() in driver()
93 fn set_driver(&self, driver: Option<Weak<dyn Driver>>) { in set_driver()
94 self.inner().device_common.driver = driver; in set_driver()
/DragonOS/
H A Dtriagebot.toml75 [autolabel."A-driver"]
77 "kernel/src/driver",
78 "kernel/src/arch/x86_64/driver",
79 "kernel/src/arch/riscv64/driver",
110 [mentions."kernel/src/driver/base"]
114 [mentions."kernel/src/driver/tty"]
131 driver = ["@dragonos/main"]
161 "/kernel/src/driver" = ["main"]
/DragonOS/kernel/src/driver/pci/test/
H A Dpt_device.rs10 driver::{
13 device::{bus::Bus, driver::Driver, Device, DeviceCommonData, DeviceType, IdTable},
88 fn irq_type(&self) -> &RwLock<crate::driver::pci::pci_irq::IrqType> { in irq_type()
120 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
121 self.device_data.read().driver.clone()?.upgrade() in driver()
152 fn set_driver(&self, driver: Option<Weak<dyn Driver>>) { in set_driver()
153 self.device_data.write().driver = driver in set_driver()
/DragonOS/kernel/src/driver/disk/ahci/
H A Dmod.rs5 use crate::driver::base::block::manager::block_dev_manager;
6 use crate::driver::block::cache::cached_block_device::BlockCache;
7 use crate::driver::disk::ahci::ahcidisk::LockedAhciDisk;
8 use crate::driver::pci::pci::{
13 use crate::driver::disk::ahci::{
/DragonOS/kernel/src/arch/x86_64/pci/
H A Dpci.rs3 use crate::driver::acpi::acpi_manager;
4 use crate::driver::pci::ecam::{pci_ecam_root_info_manager, EcamRootInfo};
5 use crate::driver::pci::pci::{
9 use crate::driver::pci::root::{pci_root_manager, PciRoot};

12345678