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

1 // SPDX-License-Identifier: GPL-2.0
2 // SPDX-FileCopyrightText: Copyright 2025 Collabora ltd.
39 fn handle(&self, device: &Device<Bound>) -> IrqReturn;
43 fn handle(&self, device: &Device<Bound>) -> IrqReturn {
49 fn handle(&self, device: &Device<Bound>) -> IrqReturn {
56 /// - `self.irq` is the same as the one passed to `request_{threaded}_irq`.
57 /// - `cookie` was passed to `request_{threaded}_irq` as the cookie. It is guaranteed to be unique
75 fn drop(self: Pin<&mut Self>) {
80 // - The containing struct is `!Unpin` and was initialized using
81 // pin-init, so it occupied the same memory location for the entirety of
101 /// - `ìrq` is the number of an interrupt source of `dev`.
102 /// - `irq` has not been registered yet.
113 /// - `irq` should be a valid IRQ number for `dev`.
114 pub(crate) unsafe fn new(dev: &'a Device<Bound>, irq: u32) -> Self {
120 pub fn irq(&self) -> u32 {
133 /// context can wait with [`Completion::wait_for_completion()`] even though
150 /// #[pin]
156 /// fn handle(&self, _dev: &Device<Bound>) -> IrqReturn {
168 /// ) -> Result<Arc<Registration<Data>>> {
185 #[pin]
188 #[pin]
193 #[pin]
204 ) -> impl PinInit<Self, Error> + 'a {
206 handler <- handler,
207 inner <- Devres::new(
214 // - The callbacks are valid for use with request_irq.
215 // - If this succeeds, the slot is guaranteed to be valid until the
218 // - When request_irq is called, everything that handle_irq_callback will
239 pub fn handler(&self) -> &T {
243 /// Wait for pending IRQ handlers on other CPUs.
246 pub fn try_synchronize(&self) -> Result {
252 /// Wait for pending IRQ handlers on other CPUs.
253 pub fn synchronize(&self, dev: &Device<Bound>) -> Result {
263 unsafe extern "C" fn handle_irq_callback<T: Handler>(_irq: i32, ptr: *mut c_void) -> c_uint {
297 fn handle(&self, device: &Device<Bound>) -> ThreadedIrqReturn {
305 fn handle_threaded(&self, device: &Device<Bound>) -> IrqReturn;
309 fn handle(&self, device: &Device<Bound>) -> ThreadedIrqReturn {
313 fn handle_threaded(&self, device: &Device<Bound>) -> IrqReturn {
319 fn handle(&self, device: &Device<Bound>) -> ThreadedIrqReturn {
323 fn handle_threaded(&self, device: &Device<Bound>) -> IrqReturn {
358 /// #[pin]
366 /// fn handle_threaded(&self, _dev: &Device<Bound>) -> IrqReturn {
380 /// ) -> Result<Arc<ThreadedRegistration<Data>>> {
402 #[pin]
405 #[pin]
410 #[pin]
421 ) -> impl PinInit<Self, Error> + 'a {
423 handler <- handler,
424 inner <- Devres::new(
431 // - The callbacks are valid for use with request_threaded_irq.
432 // - If this succeeds, the slot is guaranteed to be valid until the
435 // - When request_threaded_irq is called, everything that the two callbacks
457 pub fn handler(&self) -> &T {
461 /// Wait for pending IRQ handlers on other CPUs.
464 pub fn try_synchronize(&self) -> Result {
470 /// Wait for pending IRQ handlers on other CPUs.
471 pub fn synchronize(&self, dev: &Device<Bound>) -> Result {
484 ) -> c_uint {
497 unsafe extern "C" fn thread_fn_callback<T: ThreadedHandler>(_irq: i32, ptr: *mut c_void) -> c_uint {