Home
last modified time | relevance | path

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

123456

/DragonOS-0.1.9/kernel/src/driver/base/device/
Ddriver.rs6 driver::base::kobject::KObject,
176 pub fn register(&self, driver: Arc<dyn Driver>) -> Result<(), SystemError> { in register()
177 let bus = driver in register()
184 driver.name() in register()
189 let drv_name = driver.name(); in register()
199 bus_manager().add_driver(&driver)?; in register()
201 self.add_groups(&driver, driver.groups()).map_err(|e| { in register()
202 bus_manager().remove_driver(&driver); in register()
213 pub fn unregister(&self, driver: &Arc<dyn Driver>) { in unregister()
214 self.remove_groups(driver, driver.groups()); in unregister()
[all …]
Ddd.rs7 driver::base::kobject::KObject,
21 driver::{driver_manager, Driver, DriverManager},
73 if dev.driver().is_some() { in do_device_attach()
92 for driver in bus.subsystem().drivers().iter() { in do_device_attach()
93 let r = self.do_device_attach_driver(&driver, &mut data); in do_device_attach()
145 driver: &Arc<dyn Driver>, in do_device_attach_driver()
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()
168 let async_allowed = driver.allows_async_probing(); in do_device_attach_driver()
174 .probe_device(driver, &data.dev) in do_device_attach_driver()
[all …]
Dbus.rs2 driver::{Driver, DriverMatchName, DriverMatcher},
6 driver::base::{
7 device::{device_manager, driver::driver_manager},
294 pub fn add_driver(&self, driver: &Arc<dyn Driver>) -> Result<(), SystemError> { in add_driver()
295 let bus = driver in add_driver()
300 kdebug!("bus '{}' add driver '{}'", bus.name(), driver.name()); in add_driver()
302 driver.set_kobj_type(Some(&BusDriverKType)); in add_driver()
303 let kobj = driver.clone() as Arc<dyn KObject>; in add_driver()
306 bus.subsystem().add_driver_to_vec(driver)?; in add_driver()
308 let r = driver_manager().driver_attach(driver); in add_driver()
[all …]
/DragonOS-0.1.9/kernel/src/driver/tty/
Dtty_driver.rs8 driver::{
13 driver::Driver,
38 for (index, driver) in drivers_guard.iter().enumerate() { in lookup_tty_driver()
39 let base = DeviceNumber::new(driver.major, driver.minor_start); in lookup_tty_driver()
40 if dev_num < base || dev_num.data() > base.data() + driver.device_count { in lookup_tty_driver()
43 return Some((index, driver.clone())); in lookup_tty_driver()
50 pub fn tty_register_driver(mut driver: TtyDriver) -> Result<(), SystemError> { in tty_register_driver()
52 if driver.major == Major::UNNAMED_MAJOR { in tty_register_driver()
54 driver.minor_start, in tty_register_driver()
55 driver.device_count, in tty_register_driver()
[all …]
Dtty_device.rs10 driver::{
17 driver::Driver,
55 driver: Option<Weak<dyn Driver>>, field
68 driver: None, in new()
128 let driver = tty.core().driver(); in open() localVariable
132 || (driver.tty_driver_type() == TtyDriverType::Pty in open()
133 && driver.tty_driver_sub_type() == TtyDriverSubType::PtyMaster)) in open()
377 fn kset(&self) -> Option<Arc<crate::driver::base::kset::KSet>> { in kset()
381 fn set_kset(&self, kset: Option<Arc<crate::driver::base::kset::KSet>>) { in set_kset()
385 fn kobj_type(&self) -> Option<&'static dyn crate::driver::base::kobject::KObjType> { in kobj_type()
[all …]
Dtty_core.rs10 driver::serial::serial8250::send_to_default_serial8250_port,
41 pub fn new(driver: Arc<TtyDriver>, index: usize) -> Arc<Self> { in new()
42 let name = driver.tty_line_name(index); in new()
43 let termios = driver.init_termios(); in new()
45 tty_driver: driver, in new()
82 .driver() in write_without_serial()
89 let driver = tty_core.driver(); in reopen() localVariable
91 if driver.tty_driver_type() == TtyDriverType::Pty in reopen()
92 && driver.tty_driver_sub_type() == TtyDriverSubType::PtyMaster in reopen()
147 if core.driver().tty_driver_type() == TtyDriverType::Pty in tty_mode_ioctl()
[all …]
/DragonOS-0.1.9/kernel/src/driver/base/platform/
Dplatform_driver.rs3 use crate::driver::base::device::{
5 driver::{driver_manager, Driver},
43 pub fn register(&self, driver: Arc<dyn PlatformDriver>) -> Result<(), SystemError> { in register()
44 driver.set_bus(Some(Arc::downgrade(&(platform_bus() as Arc<dyn Bus>)))); in register()
45 return driver_manager().register(driver as Arc<dyn Driver>); in register()
50 pub fn unregister(&self, driver: &Arc<dyn PlatformDriver>) { in unregister()
51 driver_manager().unregister(&(driver.clone() as Arc<dyn Driver>)); in unregister()
Dsubsys.rs9 driver::{
12 device::{bus::Bus, driver::Driver, Device},
59 let drv = device.driver().ok_or(SystemError::EINVAL)?; in probe()
120 driver: &Arc<dyn Driver>, in match_device()
123 if let Ok(x) = acpi_manager().driver_match_device(driver, device) { in match_device()
130 if let Some(drv_id_table) = driver.id_table() { in match_device()
141 return Ok(device.name().eq(&driver.name())); in match_device()
Dplatform_device.rs8 driver::base::{
13 driver::Driver,
200 driver: Option<Weak<dyn Driver>>, field
215 driver: None, in new()
301 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
302 self.inner.lock().driver.clone()?.upgrade() in driver()
310 fn set_driver(&self, driver: Option<Weak<dyn Driver>>) { in set_driver()
311 self.inner.lock().driver = driver; in set_driver()
/DragonOS-0.1.9/kernel/src/driver/input/serio/
Dserio_driver.rs4 use crate::driver::base::device::{
6 driver::{driver_manager, Driver},
66 pub fn register(&self, driver: Arc<dyn SerioDriver>) -> Result<(), SystemError> { in register()
67 driver.set_bus(Some(Arc::downgrade(&(serio_bus() as Arc<dyn Bus>)))); in register()
68 return driver_manager().register(driver as Arc<dyn Driver>); in register()
80 pub fn unregister(&self, driver: &Arc<dyn SerioDriver>) { in unregister()
81 driver_manager().unregister(&(driver.clone() as Arc<dyn Driver>)); in unregister()
Dsubsys.rs9 driver::{
12 device::{bus::Bus, driver::Driver, Device},
60 let drv = device.driver().ok_or(SystemError::EINVAL)?; in probe()
99 driver: &Arc<dyn Driver>, in match_device()
102 if let Ok(x) = acpi_manager().driver_match_device(driver, device) { in match_device()
109 if let Some(drv_id_table) = driver.id_table() { in match_device()
120 return Ok(device.name().eq(&driver.name())); in match_device()
/DragonOS-0.1.9/kernel/src/driver/net/e1000e/
De1000e_driver.rs4 driver::{
6 device::{bus::Bus, driver::Driver, Device, IdTable},
32 driver: E1000EDriver, field
69 driver: E1000EDriverWrapper, field
92 let mut device = self.driver.inner.lock(); in consume()
137 driver: self.clone(), in receive()
149 driver: self.clone(), in transmit()
172 pub fn new(mut driver: E1000EDriver) -> Arc<Self> { in new()
181 smoltcp::wire::EthernetAddress(driver.inner.lock().mac_address()), in new()
183 let iface = smoltcp::iface::Interface::new(iface_config, &mut driver); in new()
[all …]
/DragonOS-0.1.9/kernel/src/driver/net/
Dvirtio_net.rs16 driver::{
18 device::{bus::Bus, driver::Driver, Device, DeviceId, IdTable},
77 driver: VirtioNICDriverWrapper<T>, field
87 .field("driver", self.driver.deref()) in fmt()
96 pub fn new(mut driver: VirtioNICDriver<T>, dev_id: Arc<DeviceId>) -> Arc<Self> { in new()
105 smoltcp::wire::EthernetAddress(driver.inner.lock().mac_address()), in new()
107 let iface = smoltcp::iface::Interface::new(iface_config, &mut driver); in new()
109 let driver: VirtioNICDriverWrapper<T> = VirtioNICDriverWrapper(UnsafeCell::new(driver)); in new() localVariable
111 driver, in new()
159 driver: VirtioNICDriver<T>, field
[all …]
/DragonOS-0.1.9/kernel/src/driver/input/serio/i8042/
Di8042_device.rs7 driver::base::{
9 device::{bus::Bus, driver::Driver, Device, DeviceState, DeviceType, IdTable},
36 driver: None, in new()
54 driver: Option<Weak<dyn Driver>>, field
85 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
86 self.inner.lock().driver.clone()?.upgrade() in driver()
89 fn set_driver(&self, driver: Option<Weak<dyn Driver>>) { in set_driver()
90 self.inner.lock().driver = driver; in set_driver()
Di8042_ports.rs8 driver::{
11 device::{bus::Bus, driver::Driver, Device, DeviceType, IdTable},
37 driver: Option<Weak<dyn Driver>>, field
51 driver: None, in new()
83 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
84 self.inner.lock().driver.clone()?.upgrade() in driver()
87 fn set_driver(&self, driver: Option<Weak<dyn Driver>>) { in set_driver()
88 self.inner.lock().driver = driver; in set_driver()
/DragonOS-0.1.9/docs/kernel/boot/
Dmultiboot2.md3 &emsp;&emsp;Multiboot2支持模块提供对Multiboot2协议的支持。位于`kernel/driver/multiboot2`文件夹中。
11driver/multiboot2/multiboot2.h`中按照Multiboot2协议的规定,定义了大部分的数据结构,具体细节可查看该文件: [DragonOS/multiboot2.h a…
/DragonOS-0.1.9/kernel/src/driver/video/fbdev/base/fbcon/
Dmod.rs9 driver::{
12 device::{bus::Bus, device_manager, driver::Driver, Device, DeviceType, IdTable},
95 driver: Option<Weak<dyn Driver>>, field
118 driver: None, in new()
209 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
212 .driver in driver()
214 .and_then(|driver| driver.upgrade()) in driver()
217 fn set_driver(&self, driver: Option<Weak<dyn Driver>>) { in set_driver()
218 self.inner.lock().driver = driver; in set_driver()
/DragonOS-0.1.9/kernel/src/driver/base/
Dsubsys.rs22 driver::Driver,
156 pub fn add_driver_to_vec(&self, driver: &Arc<dyn Driver>) -> Result<(), SystemError> { in add_driver_to_vec()
158 if drivers.iter().any(|d| Arc::ptr_eq(d, driver)) { in add_driver_to_vec()
161 drivers.push(driver.clone()); in add_driver_to_vec()
165 pub fn remove_driver_from_vec(&self, driver: &Arc<dyn Driver>) { in remove_driver_from_vec()
167 let index = drivers.iter().position(|d| Arc::ptr_eq(d, driver)); in remove_driver_from_vec()
Dcpu.rs9 driver::acpi::acpi_manager,
20 driver::Driver,
97 driver: &Arc<dyn Driver>, in match_device()
100 return acpi_manager().driver_match_device(driver, device); in match_device()
164 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
/DragonOS-0.1.9/kernel/src/driver/serial/serial8250/
Dmod.rs14 driver::base::{
17 bus::Bus, device_manager, device_number::DeviceNumber, driver::Driver, Device,
180 fn compatible_table(&self) -> crate::driver::base::platform::CompatibleTable { in compatible_table()
232 fn driver(&self) -> Option<Arc<dyn Driver>> { in driver() method
233 self.inner.read().driver.clone()?.upgrade() in driver()
236 fn set_driver(&self, driver: Option<Weak<dyn Driver>>) { in set_driver()
237 self.inner.write().driver = driver; in set_driver()
321 driver: Option<Weak<dyn Driver>>, field
333 driver: None, in new()
536 crate::arch::driver::sbi::console_putstr(s); in send_to_default_serial8250_port()
/DragonOS-0.1.9/kernel/src/driver/disk/ahci/
Dahcidisk.rs2 use crate::driver::base::block::block_device::{BlockDevice, BlockId};
3 use crate::driver::base::block::disk_info::Partition;
4 use crate::driver::base::block::SeekFrom;
5 use crate::driver::base::class::Class;
6 use crate::driver::base::device::bus::Bus;
8 use crate::driver::base::device::driver::Driver;
9 use crate::driver::base::device::{Device, DeviceType, IdTable};
10 use crate::driver::base::kobject::{KObjType, KObject, KObjectState};
11 use crate::driver::base::kset::KSet;
12 use crate::driver::disk::ahci::HBA_PxIS_TFES;
[all …]
/DragonOS-0.1.9/kernel/src/driver/virtio/
Dvirtio.rs3 use crate::driver::base::device::DeviceId;
4 use crate::driver::net::virtio_net::virtio_net;
5 use crate::driver::pci::pci::{
/DragonOS-0.1.9/kernel/src/driver/input/ps2_dev/
Dps2_device.rs1 use crate::driver::{base::device::Device, input::serio::serio_device::SerioDevice};
/DragonOS-0.1.9/kernel/src/driver/acpi/
Dglue.rs3 use crate::driver::base::device::Device;
/DragonOS-0.1.9/kernel/src/arch/x86_64/driver/video/
Dmod.rs3 use crate::driver::video::fbdev::vesafb::vesafb_early_init;

123456