aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
Diffstat (limited to 'include/media')
-rw-r--r--include/media/ir-core.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 7a0be8d4999d..b452a478c12c 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -76,7 +76,6 @@ struct ir_raw_event {
76struct ir_raw_event_ctrl { 76struct ir_raw_event_ctrl {
77 struct kfifo kfifo; /* fifo for the pulse/space events */ 77 struct kfifo kfifo; /* fifo for the pulse/space events */
78 struct timespec last_event; /* when last event occurred */ 78 struct timespec last_event; /* when last event occurred */
79 struct timer_list timer_keyup; /* timer for key release */
80}; 79};
81 80
82struct ir_input_dev { 81struct ir_input_dev {
@@ -86,10 +85,16 @@ struct ir_input_dev {
86 unsigned long devno; /* device number */ 85 unsigned long devno; /* device number */
87 const struct ir_dev_props *props; /* Device properties */ 86 const struct ir_dev_props *props; /* Device properties */
88 struct ir_raw_event_ctrl *raw; /* for raw pulse/space events */ 87 struct ir_raw_event_ctrl *raw; /* for raw pulse/space events */
88 struct input_dev *input_dev; /* the input device associated with this device */
89 89
90 /* key info - needed by IR keycode handlers */ 90 /* key info - needed by IR keycode handlers */
91 u32 keycode; /* linux key code */ 91 spinlock_t keylock; /* protects the below members */
92 int keypressed; /* current state */ 92 bool keypressed; /* current state */
93 unsigned long keyup_jiffies; /* when should the current keypress be released? */
94 struct timer_list timer_keyup; /* timer for releasing a keypress */
95 u32 last_keycode; /* keycode of last command */
96 u32 last_scancode; /* scancode of last command */
97 u8 last_toggle; /* toggle of last command */
93}; 98};
94 99
95struct ir_raw_handler { 100struct ir_raw_handler {
@@ -115,8 +120,8 @@ void rc_map_init(void);
115 120
116u32 ir_g_keycode_from_table(struct input_dev *input_dev, 121u32 ir_g_keycode_from_table(struct input_dev *input_dev,
117 u32 scancode); 122 u32 scancode);
118void ir_keyup(struct input_dev *dev); 123void ir_repeat(struct input_dev *dev);
119void ir_keydown(struct input_dev *dev, int scancode); 124void ir_keydown(struct input_dev *dev, int scancode, u8 toggle);
120int __ir_input_register(struct input_dev *dev, 125int __ir_input_register(struct input_dev *dev,
121 const struct ir_scancode_table *ir_codes, 126 const struct ir_scancode_table *ir_codes,
122 const struct ir_dev_props *props, 127 const struct ir_dev_props *props,