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