diff options
author | David Härdeman <david@hardeman.nu> | 2010-10-29 15:08:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 05:16:35 -0500 |
commit | 62c6503125389763a74911408d984c5dd09eeb97 (patch) | |
tree | a9b419280d25fca5086d82f8992a1d5843da75f1 /include | |
parent | 2997137be8eba5bf9c07a24d5fda1f4225f9ca7d (diff) |
[media] ir-core: remove remaining users of the ir-functions keyhandlers
This patch removes the remaining usages of the ir_input_nokey() and
ir_input_keydown() functions provided by drivers/media/IR/ir-functions.c
by using the corresponding functionality in ir-core instead.
Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/ir-common.h | 31 | ||||
-rw-r--r-- | include/media/ir-core.h | 3 | ||||
-rw-r--r-- | include/media/ir-kbd-i2c.h | 4 |
3 files changed, 7 insertions, 31 deletions
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 415242047b6a..4a32e89a3cfe 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * some common functions to handle infrared remote protocol decoding for |
3 | * some common structs and functions to handle infrared remotes via | 3 | * drivers which have not yet been (or can't be) converted to use the |
4 | * input layer ... | 4 | * regular protocol decoders... |
5 | * | 5 | * |
6 | * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] | 6 | * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] |
7 | * | 7 | * |
@@ -33,30 +33,17 @@ | |||
33 | #define RC5_ADDR(x) (((x)>>6)&31) | 33 | #define RC5_ADDR(x) (((x)>>6)&31) |
34 | #define RC5_INSTR(x) ((x)&63) | 34 | #define RC5_INSTR(x) ((x)&63) |
35 | 35 | ||
36 | struct ir_input_state { | ||
37 | /* configuration */ | ||
38 | u64 ir_type; | ||
39 | |||
40 | /* key info */ | ||
41 | u32 ir_key; /* ir scancode */ | ||
42 | u32 keycode; /* linux key code */ | ||
43 | int keypressed; /* current state */ | ||
44 | }; | ||
45 | |||
46 | /* this was saa7134_ir and bttv_ir, moved here for | 36 | /* this was saa7134_ir and bttv_ir, moved here for |
47 | * rc5 decoding. */ | 37 | * rc5 decoding. */ |
48 | struct card_ir { | 38 | struct card_ir { |
49 | struct input_dev *dev; | 39 | struct input_dev *dev; |
50 | struct ir_input_state ir; | ||
51 | char name[32]; | 40 | char name[32]; |
52 | char phys[32]; | 41 | char phys[32]; |
53 | int users; | 42 | int users; |
54 | |||
55 | u32 running:1; | 43 | u32 running:1; |
56 | struct ir_dev_props props; | 44 | struct ir_dev_props props; |
57 | 45 | ||
58 | /* Usual gpio signalling */ | 46 | /* Usual gpio signalling */ |
59 | |||
60 | u32 mask_keycode; | 47 | u32 mask_keycode; |
61 | u32 mask_keydown; | 48 | u32 mask_keydown; |
62 | u32 mask_keyup; | 49 | u32 mask_keyup; |
@@ -65,7 +52,6 @@ struct card_ir { | |||
65 | int shift_by; | 52 | int shift_by; |
66 | int start; // What should RC5_START() be | 53 | int start; // What should RC5_START() be |
67 | int addr; // What RC5_ADDR() should be. | 54 | int addr; // What RC5_ADDR() should be. |
68 | int rc5_key_timeout; | ||
69 | int rc5_remote_gap; | 55 | int rc5_remote_gap; |
70 | struct work_struct work; | 56 | struct work_struct work; |
71 | struct timer_list timer; | 57 | struct timer_list timer; |
@@ -73,8 +59,6 @@ struct card_ir { | |||
73 | /* RC5 gpio */ | 59 | /* RC5 gpio */ |
74 | u32 rc5_gpio; | 60 | u32 rc5_gpio; |
75 | struct timer_list timer_end; /* timer_end for code completion */ | 61 | struct timer_list timer_end; /* timer_end for code completion */ |
76 | struct timer_list timer_keyup; /* timer_end for key release */ | ||
77 | u32 last_rc5; /* last good rc5 code */ | ||
78 | u32 last_bit; /* last raw bit seen */ | 62 | u32 last_bit; /* last raw bit seen */ |
79 | u32 code; /* raw code under construction */ | 63 | u32 code; /* raw code under construction */ |
80 | struct timeval base_time; /* time of last seen code */ | 64 | struct timeval base_time; /* time of last seen code */ |
@@ -89,16 +73,7 @@ struct card_ir { | |||
89 | }; | 73 | }; |
90 | 74 | ||
91 | /* Routines from ir-functions.c */ | 75 | /* Routines from ir-functions.c */ |
92 | |||
93 | int ir_input_init(struct input_dev *dev, struct ir_input_state *ir, | ||
94 | const u64 ir_type); | ||
95 | void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); | ||
96 | void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir, | ||
97 | u32 ir_key); | ||
98 | u32 ir_extract_bits(u32 data, u32 mask); | 76 | u32 ir_extract_bits(u32 data, u32 mask); |
99 | u32 ir_rc5_decode(unsigned int code); | ||
100 | |||
101 | void ir_rc5_timer_end(unsigned long data); | 77 | void ir_rc5_timer_end(unsigned long data); |
102 | void ir_rc5_timer_keyup(unsigned long data); | ||
103 | 78 | ||
104 | #endif | 79 | #endif |
diff --git a/include/media/ir-core.h b/include/media/ir-core.h index 6dc37fae6606..bff75f258fbc 100644 --- a/include/media/ir-core.h +++ b/include/media/ir-core.h | |||
@@ -159,7 +159,8 @@ void ir_input_unregister(struct input_dev *input_dev); | |||
159 | 159 | ||
160 | void ir_repeat(struct input_dev *dev); | 160 | void ir_repeat(struct input_dev *dev); |
161 | void ir_keydown(struct input_dev *dev, int scancode, u8 toggle); | 161 | void ir_keydown(struct input_dev *dev, int scancode, u8 toggle); |
162 | void ir_keyup(struct ir_input_dev *ir); | 162 | void ir_keydown_notimeout(struct input_dev *dev, int scancode, u8 toggle); |
163 | void ir_keyup(struct input_dev *dev); | ||
163 | u32 ir_g_keycode_from_table(struct input_dev *input_dev, u32 scancode); | 164 | u32 ir_g_keycode_from_table(struct input_dev *input_dev, u32 scancode); |
164 | 165 | ||
165 | /* From ir-raw-event.c */ | 166 | /* From ir-raw-event.c */ |
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index 557c676ab7dc..8c37b5ec0cf6 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h | |||
@@ -12,8 +12,7 @@ struct IR_i2c { | |||
12 | 12 | ||
13 | struct i2c_client *c; | 13 | struct i2c_client *c; |
14 | struct input_dev *input; | 14 | struct input_dev *input; |
15 | struct ir_input_state ir; | 15 | |
16 | u64 ir_type; | ||
17 | /* Used to avoid fast repeating */ | 16 | /* Used to avoid fast repeating */ |
18 | unsigned char old; | 17 | unsigned char old; |
19 | 18 | ||
@@ -41,6 +40,7 @@ struct IR_i2c_init_data { | |||
41 | const char *name; | 40 | const char *name; |
42 | u64 type; /* IR_TYPE_RC5, etc */ | 41 | u64 type; /* IR_TYPE_RC5, etc */ |
43 | u32 polling_interval; /* 0 means DEFAULT_POLLING_INTERVAL */ | 42 | u32 polling_interval; /* 0 means DEFAULT_POLLING_INTERVAL */ |
43 | |||
44 | /* | 44 | /* |
45 | * Specify either a function pointer or a value indicating one of | 45 | * Specify either a function pointer or a value indicating one of |
46 | * ir_kbd_i2c's internal get_key functions | 46 | * ir_kbd_i2c's internal get_key functions |