Lines Matching refs:gunze
33 struct gunze { struct
41 static void gunze_process_packet(struct gunze *gunze) in gunze_process_packet() argument
43 struct input_dev *dev = gunze->dev; in gunze_process_packet()
45 if (gunze->idx != GUNZE_MAX_LENGTH || gunze->data[5] != ',' || in gunze_process_packet()
46 (gunze->data[0] != 'T' && gunze->data[0] != 'R')) { in gunze_process_packet()
47 printk(KERN_WARNING "gunze.c: bad packet: >%.*s<\n", GUNZE_MAX_LENGTH, gunze->data); in gunze_process_packet()
51 input_report_abs(dev, ABS_X, simple_strtoul(gunze->data + 1, NULL, 10)); in gunze_process_packet()
52 input_report_abs(dev, ABS_Y, 1024 - simple_strtoul(gunze->data + 6, NULL, 10)); in gunze_process_packet()
53 input_report_key(dev, BTN_TOUCH, gunze->data[0] == 'T'); in gunze_process_packet()
60 struct gunze *gunze = serio_get_drvdata(serio); in gunze_interrupt() local
63 gunze_process_packet(gunze); in gunze_interrupt()
64 gunze->idx = 0; in gunze_interrupt()
66 if (gunze->idx < GUNZE_MAX_LENGTH) in gunze_interrupt()
67 gunze->data[gunze->idx++] = data; in gunze_interrupt()
78 struct gunze *gunze = serio_get_drvdata(serio); in gunze_disconnect() local
80 input_get_device(gunze->dev); in gunze_disconnect()
81 input_unregister_device(gunze->dev); in gunze_disconnect()
84 input_put_device(gunze->dev); in gunze_disconnect()
85 kfree(gunze); in gunze_disconnect()
96 struct gunze *gunze; in gunze_connect() local
100 gunze = kzalloc(sizeof(struct gunze), GFP_KERNEL); in gunze_connect()
102 if (!gunze || !input_dev) { in gunze_connect()
107 gunze->serio = serio; in gunze_connect()
108 gunze->dev = input_dev; in gunze_connect()
109 snprintf(gunze->phys, sizeof(serio->phys), "%s/input0", serio->phys); in gunze_connect()
112 input_dev->phys = gunze->phys; in gunze_connect()
123 serio_set_drvdata(serio, gunze); in gunze_connect()
129 err = input_register_device(gunze->dev); in gunze_connect()
138 kfree(gunze); in gunze_connect()