Lines Matching refs:twidjoy

75 struct twidjoy {  struct
87 static void twidjoy_process_packet(struct twidjoy *twidjoy) in twidjoy_process_packet() argument
89 struct input_dev *dev = twidjoy->dev; in twidjoy_process_packet()
90 unsigned char *data = twidjoy->data; in twidjoy_process_packet()
124 struct twidjoy *twidjoy = serio_get_drvdata(serio); in twidjoy_interrupt() local
131 twidjoy->idx = 0; /* this byte starts a new packet */ in twidjoy_interrupt()
132 else if (twidjoy->idx == 0) in twidjoy_interrupt()
135 if (twidjoy->idx < TWIDJOY_MAX_LENGTH) in twidjoy_interrupt()
136 twidjoy->data[twidjoy->idx++] = data; in twidjoy_interrupt()
138 if (twidjoy->idx == TWIDJOY_MAX_LENGTH) { in twidjoy_interrupt()
139 twidjoy_process_packet(twidjoy); in twidjoy_interrupt()
140 twidjoy->idx = 0; in twidjoy_interrupt()
152 struct twidjoy *twidjoy = serio_get_drvdata(serio); in twidjoy_disconnect() local
156 input_unregister_device(twidjoy->dev); in twidjoy_disconnect()
157 kfree(twidjoy); in twidjoy_disconnect()
169 struct twidjoy *twidjoy; in twidjoy_connect() local
174 twidjoy = kzalloc(sizeof(struct twidjoy), GFP_KERNEL); in twidjoy_connect()
176 if (!twidjoy || !input_dev) in twidjoy_connect()
179 twidjoy->dev = input_dev; in twidjoy_connect()
180 snprintf(twidjoy->phys, sizeof(twidjoy->phys), "%s/input0", serio->phys); in twidjoy_connect()
183 input_dev->phys = twidjoy->phys; in twidjoy_connect()
198 serio_set_drvdata(serio, twidjoy); in twidjoy_connect()
204 err = input_register_device(twidjoy->dev); in twidjoy_connect()
213 kfree(twidjoy); in twidjoy_connect()