Re: [PATCH v6 3/6] rust: irq: add support for non-threaded IRQs and handlers

Daniel Almeida
2025-07-13T14:10:48Z

On a second look, I wonder how useful this will be.

fn handle(&self, dev: &Device<Bound>) -> IrqReturn

Sorry for borrowing this terminology, but here we offer Device<Bound>, while I
suspect that most drivers will be looking for the most derived Device type
instead. So for drm drivers this will be drm::Device, for example, not the base
dev::Device type. I assume that this pattern will hold for other subsystems as
well.

Which brings me to my second point: drivers can store an ARef<drm::Device> on
the handler itself, and I assume that the same will be possible in other
subsystems.

-- Daniel