@@ -144,6 +144,9 @@ request_threaded_irq(unsigned int irq, irq_handler_t handler,
static inline void exit_irq_thread(void) { }
#endif
+extern int raise_threaded_irq(unsigned int irq);
+
+
extern void free_irq(unsigned int, void *);
struct device;
@@ -1088,3 +1088,30 @@ int request_threaded_irq(unsigned int irq, irq_handler_t handler,
return retval;
}
EXPORT_SYMBOL(request_threaded_irq);
+
+/**
+ * raise_threaded_irq - triggers a threded interrupt
+ * @irq: Interrupt line to trigger
+ */
+int raise_threaded_irq(unsigned int irq)
+{
+ struct irq_desc *desc = irq_to_desc(irq);
+ struct irqaction *action;
+
+ if (!desc)
+ return -ENOENT;
+ action = desc->action;
+ if (!action)
+ return -ENOENT;
+ if (unlikely(!action->thread_fn))
+ return -EINVAL;
+ if (likely(!test_bit(IRQTF_DIED,
+ &action->thread_flags))) {
+ set_bit(IRQTF_RUNTHREAD, &action->thread_flags);
+ wake_up_process(action->thread);
+ } else {
+ return -ECHILD;
+ }
+ return 0;
+}
+EXPORT_SYMBOL(raise_threaded_irq);