Root/
1 | /* |
2 | * Copyright IBM Corp. 2001,2008 |
3 | * |
4 | * This file contains the IRQ specific code for hvc_console |
5 | * |
6 | */ |
7 | |
8 | #include <linux/interrupt.h> |
9 | |
10 | #include "hvc_console.h" |
11 | |
12 | static irqreturn_t hvc_handle_interrupt(int irq, void *dev_instance) |
13 | { |
14 | /* if hvc_poll request a repoll, then kick the hvcd thread */ |
15 | if (hvc_poll(dev_instance)) |
16 | hvc_kick(); |
17 | return IRQ_HANDLED; |
18 | } |
19 | |
20 | /* |
21 | * For IRQ based systems these callbacks can be used |
22 | */ |
23 | int notifier_add_irq(struct hvc_struct *hp, int irq) |
24 | { |
25 | int rc; |
26 | |
27 | if (!irq) { |
28 | hp->irq_requested = 0; |
29 | return 0; |
30 | } |
31 | rc = request_irq(irq, hvc_handle_interrupt, 0, |
32 | "hvc_console", hp); |
33 | if (!rc) |
34 | hp->irq_requested = 1; |
35 | return rc; |
36 | } |
37 | |
38 | void notifier_del_irq(struct hvc_struct *hp, int irq) |
39 | { |
40 | if (!hp->irq_requested) |
41 | return; |
42 | free_irq(irq, hp); |
43 | hp->irq_requested = 0; |
44 | } |
45 | |
46 | void notifier_hangup_irq(struct hvc_struct *hp, int irq) |
47 | { |
48 | notifier_del_irq(hp, irq); |
49 | } |
50 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9