Lines Matching refs:grip

38 struct grip {  struct
168 struct grip *grip = gameport_get_drvdata(gameport); in grip_poll() local
175 dev = grip->dev[i]; in grip_poll()
179 grip->reads++; in grip_poll()
181 switch (grip->mode[i]) { in grip_poll()
185 if (grip_gpp_read_packet(grip->gameport, (i << 1) + 4, data)) { in grip_poll()
186 grip->bads++; in grip_poll()
201 if (grip_xt_read_packet(grip->gameport, (i << 1) + 4, data)) { in grip_poll()
202 grip->bads++; in grip_poll()
220 if (grip_xt_read_packet(grip->gameport, (i << 1) + 4, data)) { in grip_poll()
221 grip->bads++; in grip_poll()
242 if (grip_xt_read_packet(grip->gameport, (i << 1) + 4, data)) { in grip_poll()
243 grip->bads++; in grip_poll()
269 struct grip *grip = input_get_drvdata(dev); in grip_open() local
271 gameport_start_polling(grip->gameport); in grip_open()
277 struct grip *grip = input_get_drvdata(dev); in grip_close() local
279 gameport_stop_polling(grip->gameport); in grip_close()
284 struct grip *grip; in grip_connect() local
290 if (!(grip = kzalloc(sizeof(struct grip), GFP_KERNEL))) in grip_connect()
293 grip->gameport = gameport; in grip_connect()
295 gameport_set_drvdata(gameport, grip); in grip_connect()
303 grip->mode[i] = GRIP_MODE_GPP; in grip_connect()
308 grip->mode[i] = GRIP_MODE_BD; in grip_connect()
312 grip->mode[i] = GRIP_MODE_XT; in grip_connect()
315 grip->mode[i] = GRIP_MODE_DC; in grip_connect()
320 if (!grip->mode[0] && !grip->mode[1]) { in grip_connect()
329 if (!grip->mode[i]) in grip_connect()
332 grip->dev[i] = input_dev = input_allocate_device(); in grip_connect()
338 snprintf(grip->phys[i], sizeof(grip->phys[i]), in grip_connect()
341 input_dev->name = grip_name[grip->mode[i]]; in grip_connect()
342 input_dev->phys = grip->phys[i]; in grip_connect()
345 input_dev->id.product = grip->mode[i]; in grip_connect()
349 input_set_drvdata(input_dev, grip); in grip_connect()
356 for (j = 0; (t = grip_abs[grip->mode[i]][j]) >= 0; j++) { in grip_connect()
358 if (j < grip_cen[grip->mode[i]]) in grip_connect()
360 else if (j < grip_anx[grip->mode[i]]) in grip_connect()
366 for (j = 0; (t = grip_btn[grip->mode[i]][j]) >= 0; j++) in grip_connect()
370 err = input_register_device(grip->dev[i]); in grip_connect()
377 fail4: input_free_device(grip->dev[i]); in grip_connect()
379 if (grip->dev[i]) in grip_connect()
380 input_unregister_device(grip->dev[i]); in grip_connect()
383 kfree(grip); in grip_connect()
389 struct grip *grip = gameport_get_drvdata(gameport); in grip_disconnect() local
393 if (grip->dev[i]) in grip_disconnect()
394 input_unregister_device(grip->dev[i]); in grip_disconnect()
397 kfree(grip); in grip_disconnect()