Lines Matching refs:twidjoy

90 struct twidjoy {  struct
102 static void twidjoy_process_packet(struct twidjoy *twidjoy) in twidjoy_process_packet() argument
104 struct input_dev *dev = twidjoy->dev; in twidjoy_process_packet()
105 unsigned char *data = twidjoy->data; in twidjoy_process_packet()
139 struct twidjoy *twidjoy = serio_get_drvdata(serio); in twidjoy_interrupt() local
146 twidjoy->idx = 0; /* this byte starts a new packet */ in twidjoy_interrupt()
147 else if (twidjoy->idx == 0) in twidjoy_interrupt()
150 if (twidjoy->idx < TWIDJOY_MAX_LENGTH) in twidjoy_interrupt()
151 twidjoy->data[twidjoy->idx++] = data; in twidjoy_interrupt()
153 if (twidjoy->idx == TWIDJOY_MAX_LENGTH) { in twidjoy_interrupt()
154 twidjoy_process_packet(twidjoy); in twidjoy_interrupt()
155 twidjoy->idx = 0; in twidjoy_interrupt()
167 struct twidjoy *twidjoy = serio_get_drvdata(serio); in twidjoy_disconnect() local
171 input_unregister_device(twidjoy->dev); in twidjoy_disconnect()
172 kfree(twidjoy); in twidjoy_disconnect()
184 struct twidjoy *twidjoy; in twidjoy_connect() local
189 twidjoy = kzalloc(sizeof(struct twidjoy), GFP_KERNEL); in twidjoy_connect()
191 if (!twidjoy || !input_dev) in twidjoy_connect()
194 twidjoy->dev = input_dev; in twidjoy_connect()
195 snprintf(twidjoy->phys, sizeof(twidjoy->phys), "%s/input0", serio->phys); in twidjoy_connect()
198 input_dev->phys = twidjoy->phys; in twidjoy_connect()
213 serio_set_drvdata(serio, twidjoy); in twidjoy_connect()
219 err = input_register_device(twidjoy->dev); in twidjoy_connect()
228 kfree(twidjoy); in twidjoy_connect()