Home
last modified time | relevance | path

Searched refs:gameport (Results 1 – 25 of 47) sorted by relevance

12

/Linux-v4.19/include/linux/
Dgameport.h20 struct gameport { struct
30 void (*trigger)(struct gameport *); argument
31 unsigned char (*read)(struct gameport *); argument
32 int (*cooked_read)(struct gameport *, int *, int *); argument
33 int (*calibrate)(struct gameport *, int *, int *); argument
34 int (*open)(struct gameport *, int); argument
35 void (*close)(struct gameport *); argument
41 void (*poll_handler)(struct gameport *); argument
43 struct gameport *parent, *child; argument
52 #define to_gameport_port(d) container_of(d, struct gameport, dev) argument
[all …]
/Linux-v4.19/drivers/input/gameport/
Dgameport.c48 static void gameport_add_port(struct gameport *gameport);
50 static void gameport_reconnect_port(struct gameport *gameport);
51 static void gameport_disconnect_port(struct gameport *gameport);
82 static int gameport_measure_speed(struct gameport *gameport) in gameport_measure_speed() argument
88 if (gameport_open(gameport, NULL, GAMEPORT_MODE_RAW)) in gameport_measure_speed()
97 gameport_read(gameport); in gameport_measure_speed()
107 gameport_close(gameport); in gameport_measure_speed()
114 static int old_gameport_measure_speed(struct gameport *gameport) in old_gameport_measure_speed() argument
121 if (gameport_open(gameport, NULL, GAMEPORT_MODE_RAW)) in old_gameport_measure_speed()
129 for (t = 0; t < 50; t++) gameport_read(gameport); in old_gameport_measure_speed()
[all …]
Dfm801-gp.c39 struct gameport *gameport; member
44 static int fm801_gp_cooked_read(struct gameport *gameport, int *axes, int *buttons) in fm801_gp_cooked_read() argument
48 w = inw(gameport->io + 2); in fm801_gp_cooked_read()
51 w = inw(gameport->io + 4); in fm801_gp_cooked_read()
53 w = inw(gameport->io + 6); in fm801_gp_cooked_read()
56 w = inw(gameport->io + 8); in fm801_gp_cooked_read()
58 outw(0xff, gameport->io); /* reset */ in fm801_gp_cooked_read()
64 static int fm801_gp_open(struct gameport *gameport, int mode) in fm801_gp_open() argument
83 struct gameport *port; in fm801_gp_probe()
107 gp->gameport = port; in fm801_gp_probe()
[all …]
Dlightning.c50 struct gameport *gameport; member
72 static int l4_cooked_read(struct gameport *gameport, int *axes, int *buttons) in l4_cooked_read() argument
74 struct l4 *l4 = gameport->port_data; in l4_cooked_read()
105 static int l4_open(struct gameport *gameport, int mode) in l4_open() argument
107 struct l4 *l4 = gameport->port_data; in l4_open()
192 static int l4_calibrate(struct gameport *gameport, int *axes, int *max) in l4_calibrate() argument
196 struct l4 *l4 = gameport->port_data; in l4_calibrate()
218 struct gameport *port; in l4_create_ports()
226 if (!(l4->gameport = port = gameport_allocate_port())) { in l4_create_ports()
229 gameport_free_port(l4->gameport); in l4_create_ports()
[all …]
DKconfig7 Gameport support is for the standard 15-pin PC gameport. If you
8 have a joystick, gamepad, gameport card, a soundcard with a gameport
9 or anything else that uses the gameport, say Y or M here and also to
13 S3 SonicVibes, Trident 4DWave, SiS7018, and ALi 5451 gameport
20 module will be called gameport.
25 tristate "Classic ISA and PnP gameport support"
27 Say Y here if you have an ISA or PnP gameport.
43 tristate "SB Live and Audigy gameport support"
47 Audigy card and want to use its gameport.
53 tristate "ForteMedia FM801 gameport support"
[all …]
Demu10k1-gp.c39 struct gameport *gameport; member
58 struct gameport *port; in emu_probe()
77 emu->gameport = port; in emu_probe()
109 gameport_unregister_port(emu->gameport); in emu_remove()
Dns558.c48 struct gameport *gameport; member
65 struct gameport *port; in ns558_isa_probe()
150 ns558->gameport = port; in ns558_isa_probe()
197 struct gameport *port; in ns558_pnp_probe()
222 ns558->gameport = port; in ns558_pnp_probe()
273 gameport_unregister_port(ns558->gameport); in ns558_exit()
/Linux-v4.19/drivers/input/joystick/
Dgf2k.c77 struct gameport *gameport; member
90 static int gf2k_read_packet(struct gameport *gameport, int length, char *data) in gf2k_read_packet() argument
97 t = gameport_time(gameport, GF2K_START); in gf2k_read_packet()
98 p = gameport_time(gameport, GF2K_STROBE); in gf2k_read_packet()
104 gameport_trigger(gameport); in gf2k_read_packet()
105 v = gameport_read(gameport); in gf2k_read_packet()
109 v = gameport_read(gameport); in gf2k_read_packet()
126 static void gf2k_trigger_seq(struct gameport *gameport, short *seq) in gf2k_trigger_seq() argument
136 gameport_trigger(gameport); in gf2k_trigger_seq()
137 t = gameport_time(gameport, GF2K_TIMEOUT * 1000); in gf2k_trigger_seq()
[all …]
Da3d.c51 struct gameport *gameport; member
52 struct gameport *adc;
67 static int a3d_read_packet(struct gameport *gameport, int length, char *data) in a3d_read_packet() argument
75 t = gameport_time(gameport, A3D_MAX_START); in a3d_read_packet()
76 s = gameport_time(gameport, A3D_MAX_STROBE); in a3d_read_packet()
79 gameport_trigger(gameport); in a3d_read_packet()
80 v = gameport_read(gameport); in a3d_read_packet()
84 u = v; v = gameport_read(gameport); in a3d_read_packet()
174 static void a3d_poll(struct gameport *gameport) in a3d_poll() argument
176 struct a3d *a3d = gameport_get_drvdata(gameport); in a3d_poll()
[all …]
Dguillemot.c63 struct gameport *gameport; member
80 static int guillemot_read_packet(struct gameport *gameport, u8 *data) in guillemot_read_packet() argument
91 t = gameport_time(gameport, GUILLEMOT_MAX_START); in guillemot_read_packet()
92 s = gameport_time(gameport, GUILLEMOT_MAX_STROBE); in guillemot_read_packet()
95 gameport_trigger(gameport); in guillemot_read_packet()
96 v = gameport_read(gameport); in guillemot_read_packet()
100 u = v; v = gameport_read(gameport); in guillemot_read_packet()
117 static void guillemot_poll(struct gameport *gameport) in guillemot_poll() argument
119 struct guillemot *guillemot = gameport_get_drvdata(gameport); in guillemot_poll()
126 if (guillemot_read_packet(guillemot->gameport, data) != GUILLEMOT_MAX_LENGTH * 8 || in guillemot_poll()
[all …]
Dgrip_mp.c51 struct gameport *gameport; member
133 static inline int poll_until(u8 onbits, u8 offbits, int u_sec, struct gameport* gp, u8 *data) in poll_until()
163 static int mp_io(struct gameport* gameport, int sendflags, int sendcode, u32 *packet) in mp_io() argument
175 raw_data = gameport_read(gameport); in mp_io()
180 raw_data = gameport_read(gameport); in mp_io()
185 raw_data = gameport_read(gameport); in mp_io()
190 gameport_trigger(gameport); in mp_io()
192 if (!poll_until(0x10, 0, 308, gameport, &raw_data)) in mp_io()
216 if (!poll_until(0, 0x10, 77, gameport, &raw_data)) in mp_io()
224 if (!poll_until(0x10, 0, 77, gameport, &raw_data)) in mp_io()
[all …]
Dinteract.c50 struct gameport *gameport; member
87 static int interact_read_packet(struct gameport *gameport, int length, u32 *data) in interact_read_packet() argument
96 t = gameport_time(gameport, INTERACT_MAX_START); in interact_read_packet()
97 s = gameport_time(gameport, INTERACT_MAX_STROBE); in interact_read_packet()
100 gameport_trigger(gameport); in interact_read_packet()
101 v = gameport_read(gameport); in interact_read_packet()
105 u = v; v = gameport_read(gameport); in interact_read_packet()
124 static void interact_poll(struct gameport *gameport) in interact_poll() argument
126 struct interact *interact = gameport_get_drvdata(gameport); in interact_poll()
133 if (interact_read_packet(interact->gameport, interact->length, data) < interact->length) { in interact_poll()
[all …]
Dcobra.c44 struct gameport *gameport; member
52 static unsigned char cobra_read_packet(struct gameport *gameport, unsigned int *data) in cobra_read_packet() argument
60 int strobe = gameport_time(gameport, COBRA_MAX_STROBE); in cobra_read_packet()
69 u = gameport_read(gameport); in cobra_read_packet()
73 v = gameport_read(gameport); in cobra_read_packet()
106 static void cobra_poll(struct gameport *gameport) in cobra_poll() argument
108 struct cobra *cobra = gameport_get_drvdata(gameport); in cobra_poll()
115 if ((r = cobra_read_packet(gameport, data)) != cobra->exists) { in cobra_poll()
140 gameport_start_polling(cobra->gameport); in cobra_open()
148 gameport_stop_polling(cobra->gameport); in cobra_close()
[all …]
Dgrip.c51 struct gameport *gameport; member
80 static int grip_gpp_read_packet(struct gameport *gameport, int shift, unsigned int *data) in grip_gpp_read_packet() argument
87 int strobe = gameport_time(gameport, GRIP_STROBE_GPP); in grip_gpp_read_packet()
95 v = gameport_read(gameport) >> shift; in grip_gpp_read_packet()
99 u = v; v = (gameport_read(gameport) >> shift) & 3; in grip_gpp_read_packet()
120 static int grip_xt_read_packet(struct gameport *gameport, int shift, unsigned int *data) in grip_xt_read_packet() argument
128 int strobe = gameport_time(gameport, GRIP_STROBE_XT); in grip_xt_read_packet()
136 v = w = (gameport_read(gameport) >> shift) & 3; in grip_xt_read_packet()
140 u = (gameport_read(gameport) >> shift) & 3; in grip_xt_read_packet()
178 static void grip_poll(struct gameport *gameport) in grip_poll() argument
[all …]
Dsidewinder.c111 struct gameport *gameport; member
131 static int sw_read_packet(struct gameport *gameport, unsigned char *buf, int length, int id) in sw_read_packet() argument
138 …timeout = id ? gameport_time(gameport, SW_TIMEOUT * 1000) : 0; /* Set up global timeout for ID pac… in sw_read_packet()
139 kick = id ? gameport_time(gameport, SW_KICK) : 0; /* Set up kick timeout for ID packet */ in sw_read_packet()
140 start = gameport_time(gameport, SW_START); in sw_read_packet()
141 strobe = gameport_time(gameport, SW_STROBE); in sw_read_packet()
148 gameport_trigger(gameport); /* Trigger */ in sw_read_packet()
149 v = gameport_read(gameport); in sw_read_packet()
154 v = gameport_read(gameport); in sw_read_packet()
167 v = gameport_read(gameport); in sw_read_packet()
[all …]
Djoydump.c45 static int joydump_connect(struct gameport *gameport, struct gameport_driver *drv) in joydump_connect() argument
55 printk(KERN_INFO "joydump: | Dumping: %30s |\n", gameport->phys); in joydump_connect()
56 printk(KERN_INFO "joydump: | Speed: %28d kHz |\n", gameport->speed); in joydump_connect()
58 if (gameport_open(gameport, drv, GAMEPORT_MODE_RAW)) { in joydump_connect()
62 if (gameport_open(gameport, drv, GAMEPORT_MODE_COOKED)) { in joydump_connect()
69 gameport_cooked_read(gameport, axes, &buttons); in joydump_connect()
77 timeout = gameport_time(gameport, 10000); /* 10 ms */ in joydump_connect()
90 u = gameport_read(gameport); in joydump_connect()
96 gameport_trigger(gameport); in joydump_connect()
100 dump->data = gameport_read(gameport); in joydump_connect()
[all …]
Danalog.c118 struct gameport *gameport; member
248 struct gameport *gameport = port->gameport; in analog_cooked_read() local
259 gameport_trigger(gameport); in analog_cooked_read()
272 this = gameport_read(gameport) & port->mask; in analog_cooked_read()
300 int strobe = gameport_time(port->gameport, ANALOG_SAITEK_TIME); in analog_button_read()
302 u = gameport_read(port->gameport); in analog_button_read()
316 gameport_trigger(port->gameport); in analog_button_read()
317 while (((u = gameport_read(port->gameport)) & port->mask) && t) t--; in analog_button_read()
328 static void analog_poll(struct gameport *gameport) in analog_poll() argument
330 struct analog_port *port = gameport_get_drvdata(gameport); in analog_poll()
[all …]
Dtmdc.c120 struct gameport *gameport; member
142 static int tmdc_read_packet(struct gameport *gameport, unsigned char data[2][TMDC_MAX_LENGTH]) in tmdc_read_packet() argument
148 p = gameport_time(gameport, TMDC_MAX_STROBE); in tmdc_read_packet()
151 t[k] = gameport_time(gameport, TMDC_MAX_START); in tmdc_read_packet()
156 gameport_trigger(gameport); in tmdc_read_packet()
158 w = gameport_read(gameport) >> 4; in tmdc_read_packet()
162 w = gameport_read(gameport) >> 4; in tmdc_read_packet()
235 static void tmdc_poll(struct gameport *gameport) in tmdc_poll() argument
238 struct tmdc *tmdc = gameport_get_drvdata(gameport); in tmdc_poll()
244 if ((r = tmdc_read_packet(tmdc->gameport, data)) != tmdc->exists) in tmdc_poll()
[all …]
Dadi.c124 struct gameport *gameport; member
137 struct gameport *gameport = port->gameport; in adi_read_packet() local
144 t[i] = gameport_time(gameport, ADI_MAX_START); in adi_read_packet()
150 gameport_trigger(gameport); in adi_read_packet()
151 v = z = gameport_read(gameport); in adi_read_packet()
155 w = u ^ (v = x = gameport_read(gameport)); in adi_read_packet()
161 t[i] = gameport_time(gameport, ADI_MAX_STROBE); in adi_read_packet()
274 static void adi_poll(struct gameport *gameport) in adi_poll() argument
276 struct adi_port *port = gameport_get_drvdata(gameport); in adi_poll()
290 gameport_start_polling(port->gameport); in adi_open()
[all …]
/Linux-v4.19/Documentation/input/
Dgameport-programming.rst2 Programming gameport drivers
5 A basic classic gameport
8 If the gameport doesn't provide more than the inb()/outb() functionality,
11 struct gameport gameport;
13 gameport.io = MY_IO_ADDRESS;
14 gameport_register_port(&gameport);
16 Make sure struct gameport is initialized to 0 in all other fields. The
17 gameport generic code will take care of the rest.
27 If your hardware supports a gameport address that is not mapped to ISA io
31 gameport. Although only one ioport is really used, the gameport usually
[all …]
/Linux-v4.19/sound/pci/au88x0/
Dau88x0_game.c43 static unsigned char vortex_game_read(struct gameport *gameport) in vortex_game_read() argument
45 vortex_t *vortex = gameport_get_port_data(gameport); in vortex_game_read()
49 static void vortex_game_trigger(struct gameport *gameport) in vortex_game_trigger() argument
51 vortex_t *vortex = gameport_get_port_data(gameport); in vortex_game_trigger()
56 vortex_game_cooked_read(struct gameport *gameport, int *axes, int *buttons) in vortex_game_cooked_read() argument
58 vortex_t *vortex = gameport_get_port_data(gameport); in vortex_game_cooked_read()
72 static int vortex_game_open(struct gameport *gameport, int mode) in vortex_game_open() argument
74 vortex_t *vortex = gameport_get_port_data(gameport); in vortex_game_open()
97 struct gameport *gp; in vortex_gameport_register()
99 vortex->gameport = gp = gameport_allocate_port(); in vortex_gameport_register()
[all …]
/Linux-v4.19/sound/isa/
Dcmi8328.c46 static bool gameport[CMI8328_MAX] = {[0 ... (CMI8328_MAX-1)] = true}; variable
68 module_param_array(gameport, bool, NULL, 0444);
69 MODULE_PARM_DESC(gameport, "Enable gameport.");
79 struct gameport *gameport; member
375 if (!gameport[ndev]) in snd_cmi8328_probe()
382 struct gameport *gp = cmi->gameport = gameport_allocate_port(); in snd_cmi8328_probe()
383 if (!cmi->gameport) in snd_cmi8328_probe()
411 if (cmi->gameport) { in snd_cmi8328_remove()
412 struct resource *res = gameport_get_port_data(cmi->gameport); in snd_cmi8328_remove()
413 gameport_unregister_port(cmi->gameport); in snd_cmi8328_remove()
/Linux-v4.19/Documentation/sound/cards/
Djoystick.rst13 using a joystick with the ALSA driver. For the details of gameport
19 built-in gameport support. Hence, when the ALSA PCI driver is built
21 gameport support on that card will be (silently) disabled.
66 The following drivers don't support gameport natively, but there are
67 additional modules. Load the corresponding module to add the gameport
79 built-in gameport support.
81 As mentioned above, ALSA PCI drivers have the built-in gameport
89 ALSA ISA drivers don't have the built-in gameport support.
/Linux-v4.19/sound/pci/ymfpci/
Dymfpci.c85 struct gameport *gp; in snd_ymfpci_create_gameport()
132 chip->gameport = gp = gameport_allocate_port(); in snd_ymfpci_create_gameport()
153 gameport_register_port(chip->gameport); in snd_ymfpci_create_gameport()
160 if (chip->gameport) { in snd_ymfpci_free_gameport()
161 struct resource *r = gameport_get_port_data(chip->gameport); in snd_ymfpci_free_gameport()
163 gameport_unregister_port(chip->gameport); in snd_ymfpci_free_gameport()
164 chip->gameport = NULL; in snd_ymfpci_free_gameport()
/Linux-v4.19/sound/pci/
Dals4000.c115 struct gameport *gameport; member
775 struct gameport *gp; in snd_als4000_create_gameport()
798 acard->gameport = gp = gameport_allocate_port(); in snd_als4000_create_gameport()
814 gameport_register_port(acard->gameport); in snd_als4000_create_gameport()
821 if (acard->gameport) { in snd_als4000_free_gameport()
822 struct resource *r = gameport_get_port_data(acard->gameport); in snd_als4000_free_gameport()
824 gameport_unregister_port(acard->gameport); in snd_als4000_free_gameport()
825 acard->gameport = NULL; in snd_als4000_free_gameport()
1013 if (acard->gameport) in snd_als4000_resume()

12