Lines Matching refs:sermouse

27 struct sermouse {  struct
42 static void sermouse_process_msc(struct sermouse *sermouse, signed char data) in sermouse_process_msc() argument
44 struct input_dev *dev = sermouse->dev; in sermouse_process_msc()
45 signed char *buf = sermouse->buf; in sermouse_process_msc()
47 switch (sermouse->count) { in sermouse_process_msc()
74 if (++sermouse->count == 5) in sermouse_process_msc()
75 sermouse->count = 0; in sermouse_process_msc()
84 static void sermouse_process_ms(struct sermouse *sermouse, signed char data) in sermouse_process_ms() argument
86 struct input_dev *dev = sermouse->dev; in sermouse_process_ms()
87 signed char *buf = sermouse->buf; in sermouse_process_ms()
90 sermouse->count = 0; in sermouse_process_ms()
91 else if (sermouse->count == 0) in sermouse_process_ms()
94 switch (sermouse->count) { in sermouse_process_ms()
112 if ((sermouse->type == SERIO_MS) && !data && !buf[2] && !((buf[0] & 0xf0) ^ buf[1])) in sermouse_process_ms()
124 switch (sermouse->type) { in sermouse_process_ms()
127 sermouse->type = SERIO_MP; in sermouse_process_ms()
156 if (sermouse->type != SERIO_MZPP) in sermouse_process_ms()
181 sermouse->count++; in sermouse_process_ms()
192 struct sermouse *sermouse = serio_get_drvdata(serio); in sermouse_interrupt() local
194 if (time_after(jiffies, sermouse->last + HZ/10)) in sermouse_interrupt()
195 sermouse->count = 0; in sermouse_interrupt()
197 sermouse->last = jiffies; in sermouse_interrupt()
199 if (sermouse->type > SERIO_SUN) in sermouse_interrupt()
200 sermouse_process_ms(sermouse, data); in sermouse_interrupt()
202 sermouse_process_msc(sermouse, data); in sermouse_interrupt()
214 struct sermouse *sermouse = serio_get_drvdata(serio); in sermouse_disconnect() local
218 input_unregister_device(sermouse->dev); in sermouse_disconnect()
219 kfree(sermouse); in sermouse_disconnect()
229 struct sermouse *sermouse; in sermouse_connect() local
234 sermouse = kzalloc(sizeof(struct sermouse), GFP_KERNEL); in sermouse_connect()
236 if (!sermouse || !input_dev) in sermouse_connect()
239 sermouse->dev = input_dev; in sermouse_connect()
240 snprintf(sermouse->phys, sizeof(sermouse->phys), "%s/input0", serio->phys); in sermouse_connect()
241 sermouse->type = serio->id.proto; in sermouse_connect()
243 input_dev->name = sermouse_protocols[sermouse->type]; in sermouse_connect()
244 input_dev->phys = sermouse->phys; in sermouse_connect()
246 input_dev->id.vendor = sermouse->type; in sermouse_connect()
262 serio_set_drvdata(serio, sermouse); in sermouse_connect()
268 err = input_register_device(sermouse->dev); in sermouse_connect()
277 kfree(sermouse); in sermouse_connect()