• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/drivers/media/IR/

Lines Matching defs:ir

0 /* ir-keytable.c - handle IR scancode->keycode tables
18 #include "ir-core-priv.h"
78 * @scancode: the scancode for the ir command
79 * @keycode: the keycode for the ir command
106 /* First check if we already have a mapping for this ir command */
282 * @ir: the struct ir_input_dev descriptor of the device
287 static void ir_keyup(struct ir_input_dev *ir)
289 if (!ir->keypressed)
292 IR_dprintk(1, "keyup key 0x%04x\n", ir->last_keycode);
293 input_report_key(ir->input_dev, ir->last_keycode, 0);
294 input_sync(ir->input_dev);
295 ir->keypressed = false;
307 struct ir_input_dev *ir = (struct ir_input_dev *)cookie;
311 * ir->keyup_jiffies is used to prevent a race condition if a
320 spin_lock_irqsave(&ir->keylock, flags);
321 if (time_is_before_eq_jiffies(ir->keyup_jiffies))
322 ir_keyup(ir);
323 spin_unlock_irqrestore(&ir->keylock, flags);
337 struct ir_input_dev *ir = input_get_drvdata(dev);
339 spin_lock_irqsave(&ir->keylock, flags);
341 input_event(dev, EV_MSC, MSC_SCAN, ir->last_scancode);
343 if (!ir->keypressed)
346 ir->keyup_jiffies = jiffies + msecs_to_jiffies(IR_KEYPRESS_TIMEOUT);
347 mod_timer(&ir->timer_keyup, ir->keyup_jiffies);
350 spin_unlock_irqrestore(&ir->keylock, flags);
368 struct ir_input_dev *ir = input_get_drvdata(dev);
372 spin_lock_irqsave(&ir->keylock, flags);
377 if (ir->keypressed &&
378 ir->last_scancode == scancode &&
379 ir->last_toggle == toggle)
383 ir_keyup(ir);
385 ir->last_scancode = scancode;
386 ir->last_toggle = toggle;
387 ir->last_keycode = keycode;
395 ir->keypressed = true;
398 input_report_key(dev, ir->last_keycode, 1);
402 ir->keyup_jiffies = jiffies + msecs_to_jiffies(IR_KEYPRESS_TIMEOUT);
403 mod_timer(&ir->timer_keyup, ir->keyup_jiffies);
405 spin_unlock_irqrestore(&ir->keylock, flags);