Lines Matching refs:dev

47     pub fn device_attach(&self, dev: &Arc<dyn Device>) -> Result<bool, SystemError> {  in device_attach()
48 return self.do_device_attach(dev, false); in device_attach()
51 pub fn device_initial_probe(&self, dev: &Arc<dyn Device>) -> Result<bool, SystemError> { in device_initial_probe()
52 return self.do_device_attach(dev, true); in device_initial_probe()
58 dev: &Arc<dyn Device>, in do_device_attach()
65 if dev.is_dead() { in do_device_attach()
69 warn!("do_device_attach: dev: '{}'", dev.name()); in do_device_attach()
74 if dev.driver().is_some() { in do_device_attach()
75 if self.device_is_bound(dev) { in do_device_attach()
78 dev.name() in do_device_attach()
83 if self.device_bind_driver(dev).is_ok() { in do_device_attach()
86 dev.set_driver(None); in do_device_attach()
90 debug!("do_device_attach: device '{}' is not bound.", dev.name()); in do_device_attach()
91 let bus = dev in do_device_attach()
95 let mut data = DeviceAttachData::new(dev.clone(), allow_async, false); in do_device_attach()
122 dev.name() in do_device_attach()
153 let r = bus.match_device(&data.dev, driver); in do_device_attach_driver()
160 data.dev.name(), in do_device_attach_driver()
176 .probe_device(driver, &data.dev) in do_device_attach_driver()
189 pub fn device_is_bound(&self, dev: &Arc<dyn Device>) -> bool { in device_is_bound()
190 return driver_manager().driver_is_bound(dev); in device_is_bound()
206 pub fn device_bind_driver(&self, dev: &Arc<dyn Device>) -> Result<(), SystemError> { in device_bind_driver()
207 let r = driver_manager().driver_sysfs_add(dev); in device_bind_driver()
209 self.device_links_force_bind(dev); in device_bind_driver()
210 driver_manager().driver_bound(dev); in device_bind_driver()
211 } else if let Some(bus) = dev.bus().and_then(|bus| bus.upgrade()) { in device_bind_driver()
214 Some(dev), in device_bind_driver()
222 dev.name(), in device_bind_driver()
230 fn unbind_cleanup(&self, dev: &Arc<dyn Device>) { in unbind_cleanup()
231 dev.set_driver(None); in unbind_cleanup()
240 dev: Arc<dyn Device>, field
267 pub fn new(dev: Arc<dyn Device>, check_async: bool, want_async: bool) -> Self { in new()
269 dev, in new()
293 for dev in bus.subsystem().devices().iter() { in driver_attach()
294 self.do_driver_attach(dev, driver); in driver_attach()
602 let dev = kobj.cast::<dyn Device>().map_err(|kobj| { in show() localVariable
610 let val = dev.state_synced(); in show()
637 let dev = kobj.cast::<dyn Device>().map_err(|kobj| { in store() localVariable
645 let drv = dev.driver().ok_or(SystemError::EINVAL)?; in store()
646 drv.coredump(&dev)?; in store()