Lines Matching defs:Device

11     device::{Bound, Device},
35 /// This abstraction is meant to be used by subsystems to containerize [`Device`] bound resources to
38 /// [`Device`] bound resources should be freed when either the resource goes out of scope or the
39 /// [`Device`] is unbound respectively, depending on what happens first. In any case, it is always
40 /// guaranteed that revoking the device resource is completed before the corresponding [`Device`]
44 /// [`Device`] is unbound, revoking access to the encapsulated resource (see also [`Revocable`]).
55 /// # use kernel::{bindings, device::{Bound, Device}, devres::Devres, io::{Io, IoRaw}};
93 /// # fn no_run(dev: &Device<Bound>) -> Result<(), Error> {
109 dev: ARef<Device>,
131 dev: &'a Device<Bound>,
202 // - `self.dev` is a valid `Device`,
214 /// Return a reference of the [`Device`] this [`Devres`] instance has been created with.
215 pub fn device(&self) -> &Device {
222 /// a `&'a Device<Bound>` of the same [`Device`] this [`Devres`] instance has been created with.
226 /// An error is returned if `dev` does not match the same [`Device`] this [`Devres`] instance
235 /// fn from_core(dev: &pci::Device<Core>, devres: Devres<pci::Bar<0x4>>) -> Result {
247 pub fn access<'a>(&'a self, dev: &'a Device<Bound>) -> Result<&'a T> {
309 fn register_foreign<P>(dev: &Device<Bound>, data: P) -> Result
336 /// use kernel::{device::{Bound, Device}, devres};
355 /// fn from_bound_context(dev: &Device<Bound>) -> Result {
359 pub fn register<T, E>(dev: &Device<Bound>, data: impl PinInit<T, E>, flags: Flags) -> Result