Lines Matching refs:gameport
35 struct gameport *gameport; member
72 static int interact_read_packet(struct gameport *gameport, int length, u32 *data) in interact_read_packet() argument
81 t = gameport_time(gameport, INTERACT_MAX_START); in interact_read_packet()
82 s = gameport_time(gameport, INTERACT_MAX_STROBE); in interact_read_packet()
85 gameport_trigger(gameport); in interact_read_packet()
86 v = gameport_read(gameport); in interact_read_packet()
90 u = v; v = gameport_read(gameport); in interact_read_packet()
109 static void interact_poll(struct gameport *gameport) in interact_poll() argument
111 struct interact *interact = gameport_get_drvdata(gameport); in interact_poll()
118 if (interact_read_packet(interact->gameport, interact->length, data) < interact->length) { in interact_poll()
168 gameport_start_polling(interact->gameport); in interact_open()
180 gameport_stop_polling(interact->gameport); in interact_close()
187 static int interact_connect(struct gameport *gameport, struct gameport_driver *drv) in interact_connect() argument
202 interact->gameport = gameport; in interact_connect()
205 gameport_set_drvdata(gameport, interact); in interact_connect()
207 err = gameport_open(gameport, drv, GAMEPORT_MODE_RAW); in interact_connect()
211 i = interact_read_packet(gameport, INTERACT_MAX_LENGTH * 2, data); in interact_connect()
224 gameport->phys, i, data[0], data[1], data[2]); in interact_connect()
229 gameport_set_poll_handler(gameport, interact_poll); in interact_connect()
230 gameport_set_poll_interval(gameport, 20); in interact_connect()
232 snprintf(interact->phys, sizeof(interact->phys), "%s/input0", gameport->phys); in interact_connect()
243 input_dev->dev.parent = &gameport->dev; in interact_connect()
268 fail2: gameport_close(gameport); in interact_connect()
269 fail1: gameport_set_drvdata(gameport, NULL); in interact_connect()
275 static void interact_disconnect(struct gameport *gameport) in interact_disconnect() argument
277 struct interact *interact = gameport_get_drvdata(gameport); in interact_disconnect()
280 gameport_close(gameport); in interact_disconnect()
281 gameport_set_drvdata(gameport, NULL); in interact_disconnect()