Lines Matching full:registration

4 //! This module provides types like [`Registration`] and
59 /// `Registration`.
125 /// A registration of an IRQ handler for a given IRQ line.
129 /// The following is an example of using `Registration`. It uses a
143 /// use kernel::irq::{self, Flags, IrqRequest, IrqReturn, Registration};
168 /// ) -> Result<Arc<Registration<Data>>> {
169 /// let registration = Registration::new(request, Flags::SHARED, c"my_device", handler);
171 /// let registration = Arc::pin_init(registration, GFP_KERNEL)?;
173 /// registration.handler().completion.wait_for_completion();
175 /// Ok(registration)
184 pub struct Registration<T: Handler> {
197 impl<T: Handler> Registration<T> {
210 // INVARIANT: `this` is a valid pointer to the `Registration` instance
264 // SAFETY: `ptr` is a pointer to `Registration<T>` set in `Registration::new`
265 let registration = unsafe { &*(ptr as *const Registration<T>) };
268 let device = unsafe { registration.inner.device().as_bound() };
270 T::handle(&registration.handler, device) as c_uint
328 /// A registration of a threaded IRQ handler for a given IRQ line.
381 /// let registration =
384 /// let registration = Arc::pin_init(registration, GFP_KERNEL)?;
388 /// let mut data = registration.handler().value.lock();
392 /// Ok(registration)
486 let registration = unsafe { &*(ptr as *const ThreadedRegistration<T>) };
489 let device = unsafe { registration.inner.device().as_bound() };
491 T::handle(&registration.handler, device) as c_uint
499 let registration = unsafe { &*(ptr as *const ThreadedRegistration<T>) };
502 let device = unsafe { registration.inner.device().as_bound() };
504 T::handle_threaded(&registration.handler, device) as c_uint