Lines Matching +full:wait +full:- +full:pin

1 // SPDX-License-Identifier: GPL-2.0
25 #[pin]
28 #[pin]
31 #[pin]
66 /// unsafe fn new(paddr: usize) -> Result<Self>{
88 /// fn deref(&self) -> &Self::Target {
93 /// # fn no_run(dev: &Device<Bound>) -> Result<(), Error> {
106 /// `Self::inner` is guaranteed to be initialized and is always accessed read-only.
120 #[pin]
133 ) -> impl PinInit<Self, Error> + 'a in new()
142 inner <- Opaque::pin_init(try_pin_init!(Inner { in new()
143 devm <- Completion::new(), in new()
144 revoke <- Completion::new(), in new()
145 data <- Revocable::new(data), in new()
149 // [1] https://github.com/Rust-for-Linux/pin-init/pull/69 in new()
155 // - `dev.as_raw()` is a pointer to a valid bound device. in new()
156 // - `inner` is guaranteed to be a valid for the duration of the lifetime of `Self`. in new()
157 // - `devm_add_action()` is guaranteed not to call `callback` until `this` has been in new()
173 fn inner(&self) -> &Inner<T> { in inner()
175 // accessed read-only. in inner()
179 fn data(&self) -> &Revocable<T> { in data()
194 // `data` for us. Hence we have to wait until `Devres::drop` signals that it in devres_callback()
200 fn remove_action(&self) -> bool { in remove_action()
202 // - `self.dev` is a valid `Device`, in remove_action()
203 // - the `action` and `data` pointers are the exact same ones as given to in remove_action()
215 pub fn device(&self) -> &Device { in device()
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> { in access()
259 pub fn try_access(&self) -> Option<RevocableGuard<'_, T>> { in try_access()
264 pub fn try_access_with<R, F: FnOnce(&T) -> R>(&self, f: F) -> Option<R> { in try_access_with()
269 pub fn try_access_with_guard<'a>(&'a self, guard: &'a rcu::Guard) -> Option<&'a T> { in try_access_with_guard()
282 fn drop(self: Pin<&mut Self>) { in drop()
284 // anymore, hence it is safe not to wait for the grace period to finish. in drop()
292 // Wait for `Self::devres_callback` to be done using this object. in drop()
296 // `Self::devres_callback` revokes `self.data` for us, hence wait for it to be done in drop()
309 fn register_foreign<P>(dev: &Device<Bound>, data: P) -> Result in register_foreign()
322 // - `dev.as_raw()` is a pointer to a valid and bound device. in register_foreign()
323 // - `ptr` is a valid pointer the `ForeignOwnable` devres takes ownership of. in register_foreign()
342 /// fn new() -> Self {
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 in register()