Lines Matching defs:guillemot
67 struct guillemot {
124 struct guillemot *guillemot = gameport_get_drvdata(gameport);
125 struct input_dev *dev = guillemot->dev;
129 guillemot->reads++;
131 if (guillemot_read_packet(guillemot->gameport, data) != GUILLEMOT_MAX_LENGTH * 8 ||
133 guillemot->bads++;
136 for (i = 0; i < 6 && guillemot->type->abs[i] >= 0; i++)
137 input_report_abs(dev, guillemot->type->abs[i], data[i + 5]);
139 if (guillemot->type->hat) {
144 for (i = 0; i < 16 && guillemot->type->btn[i] >= 0; i++)
145 input_report_key(dev, guillemot->type->btn[i], (data[2 + (i >> 3)] >> (i & 7)) & 1);
157 struct guillemot *guillemot = input_get_drvdata(dev);
159 gameport_start_polling(guillemot->gameport);
169 struct guillemot *guillemot = input_get_drvdata(dev);
171 gameport_stop_polling(guillemot->gameport);
180 struct guillemot *guillemot;
186 guillemot = kzalloc(sizeof(struct guillemot), GFP_KERNEL);
188 if (!guillemot || !input_dev) {
193 guillemot->gameport = gameport;
194 guillemot->dev = input_dev;
196 gameport_set_drvdata(gameport, guillemot);
214 printk(KERN_WARNING "guillemot.c: Unknown joystick on %s. [ %02x%02x:%04x, ver %d.%02d ]\n",
223 snprintf(guillemot->phys, sizeof(guillemot->phys), "%s/input0", gameport->phys);
224 guillemot->type = guillemot_type + i;
227 input_dev->phys = guillemot->phys;
234 input_set_drvdata(input_dev, guillemot);
241 for (i = 0; (t = guillemot->type->abs[i]) >= 0; i++)
244 if (guillemot->type->hat) {
249 for (i = 0; (t = guillemot->type->btn[i]) >= 0; i++)
252 err = input_register_device(guillemot->dev);
261 kfree(guillemot);
267 struct guillemot *guillemot = gameport_get_drvdata(gameport);
269 printk(KERN_INFO "guillemot.c: Failed %d reads out of %d on %s\n", guillemot->reads, guillemot->bads, guillemot->phys);
270 input_unregister_device(guillemot->dev);
272 kfree(guillemot);
277 .name = "guillemot",