20 #include <linux/hid.h>
22 #include <linux/input.h>
39 #include <linux/module.h>
55 spin_unlock_irqrestore(&data->
lock, flags);
58 spin_unlock_irqrestore(&data->
lock, flags);
70 sz = size > 0 ?
min((
int)raw_data[0], size-1) : 0;
71 for (i = 0; i+1 < sz; i += 2) {
72 init_ir_raw_event(&rawir);
73 w = (raw_data[
i] << 8) | (raw_data[i+1]);
74 rawir.pulse = !!(w & 0x8000);
75 rawir.duration =
US_TO_NS(rawir.pulse ? (65536 - w) : w);
77 if (i == 0 && rawir.duration > 15000000)
78 rawir.duration -= 15000000;
86 static int picolcd_cir_open(
struct rc_dev *
dev)
93 spin_unlock_irqrestore(&data->
lock, flags);
97 static void picolcd_cir_close(
struct rc_dev *
dev)
104 spin_unlock_irqrestore(&data->
lock, flags);
120 rdev->
open = picolcd_cir_open;
121 rdev->
close = picolcd_cir_close;
128 rdev->
dev.parent = &data->
hdev->dev;