/linux/include/linux/ |
H A D | gameport.h | 14 #include <uapi/linux/gameport.h> 16 struct gameport { struct 18 void *port_data; /* Private pointer for gameport drivers */ argument 26 void (*trigger)(struct gameport *); argument 27 unsigned char (*read)(struct gameport *); argument 28 int (*cooked_read)(struct gameport *, int *, int *); argument 29 int (*calibrate)(struct gameport *, int *, int *); argument 30 int (*open)(struct gameport *, int); argument 31 void (*close)(struct gameport *); argument 37 void (*poll_handler)(struct gameport *); argument 39 childgameport global() argument 41 drvgameport global() argument 48 nodegameport global() argument 70 gameport_register_port(gameport) global() argument 80 gameport_register_port(struct gameport * gameport) gameport_register_port() argument 85 gameport_unregister_port(struct gameport * gameport) gameport_unregister_port() argument 91 gameport_set_phys(struct gameport * gameport,const char * fmt,...) gameport_set_phys() argument 100 struct gameport *gameport = kzalloc(sizeof(struct gameport), GFP_KERNEL); gameport_allocate_port() local 105 gameport_free_port(struct gameport * gameport) gameport_free_port() argument 110 gameport_set_name(struct gameport * gameport,const char * name) gameport_set_name() argument 119 gameport_get_drvdata(struct gameport * gameport) gameport_get_drvdata() argument 124 gameport_set_drvdata(struct gameport * gameport,void * data) gameport_set_drvdata() argument 132 gameport_pin_driver(struct gameport * gameport) gameport_pin_driver() argument 137 gameport_unpin_driver(struct gameport * gameport) gameport_unpin_driver() argument 165 gameport_trigger(struct gameport * gameport) gameport_trigger() argument 170 gameport_read(struct gameport * gameport) gameport_read() argument 175 gameport_cooked_read(struct gameport * gameport,int * axes,int * buttons) gameport_cooked_read() argument 183 gameport_calibrate(struct gameport * gameport,int * axes,int * max) gameport_calibrate() argument 191 gameport_time(struct gameport * gameport,int time) gameport_time() argument 196 gameport_set_poll_handler(struct gameport * gameport,void (* handler)(struct gameport *)) gameport_set_poll_handler() argument 201 gameport_set_poll_interval(struct gameport * gameport,unsigned int msecs) gameport_set_poll_interval() argument [all...] |
/linux/drivers/input/gameport/ |
H A D | gameport.c | 3 * Generic gameport layer 17 #include <linux/gameport.h> 26 MODULE_DESCRIPTION("Generic gameport layer"); 34 * gameport_mutex protects entire gameport subsystem and is taken 35 * every time gameport port or driver registrered or unregistered. 43 static void gameport_add_port(struct gameport *gameport); 45 static void gameport_reconnect_port(struct gameport *gameport); 46 static void gameport_disconnect_port(struct gameport *gamepor 77 gameport_measure_speed(struct gameport * gameport) gameport_measure_speed() argument 109 old_gameport_measure_speed(struct gameport * gameport) old_gameport_measure_speed() argument 175 gameport_start_polling(struct gameport * gameport) gameport_start_polling() argument 189 gameport_stop_polling(struct gameport * gameport) gameport_stop_polling() argument 202 struct gameport *gameport = timer_container_of(gameport, t, gameport_run_poll_handler() local 214 gameport_bind_driver(struct gameport * gameport,struct gameport_driver * drv) gameport_bind_driver() argument 238 gameport_find_driver(struct gameport * gameport) gameport_find_driver() argument 435 struct gameport *gameport, *child = NULL; gameport_get_pending_child() local 460 struct gameport *gameport = to_gameport_port(dev); gameport_description_show() local 468 struct gameport *gameport = to_gameport_port(dev); drvctl_store() local 505 struct gameport *gameport = to_gameport_port(dev); gameport_release_port() local 511 gameport_set_phys(struct gameport * gameport,const char * fmt,...) gameport_set_phys() argument 521 gameport_default_trigger(struct gameport * gameport) gameport_default_trigger() argument 528 gameport_default_read(struct gameport * gameport) gameport_default_read() argument 537 gameport_setup_default_handlers(struct gameport * gameport) gameport_setup_default_handlers() argument 554 gameport_init_port(struct gameport * gameport) gameport_init_port() argument 579 gameport_add_port(struct gameport * gameport) gameport_add_port() argument 610 gameport_destroy_port(struct gameport * gameport) gameport_destroy_port() argument 637 gameport_reconnect_port(struct gameport * gameport) gameport_reconnect_port() argument 654 gameport_disconnect_port(struct gameport * gameport) gameport_disconnect_port() argument 685 __gameport_register_port(struct gameport * gameport,struct module * owner) __gameport_register_port() argument 695 gameport_unregister_port(struct gameport * gameport) gameport_unregister_port() argument 724 struct gameport *gameport = to_gameport_port(dev); gameport_driver_probe() local 733 struct gameport *gameport = to_gameport_port(dev); gameport_driver_remove() local 787 struct gameport *gameport; gameport_unregister_driver() local 826 gameport_set_drv(struct gameport * gameport,struct gameport_driver * drv) gameport_set_drv() argument 833 gameport_open(struct gameport * gameport,struct gameport_driver * drv,int mode) gameport_open() argument 849 gameport_close(struct gameport * gameport) gameport_close() argument [all...] |
H A D | fm801-gp.c | 3 * FM801 gameport driver for Linux 16 #include <linux/gameport.h> 24 struct gameport *gameport; member 29 static int fm801_gp_cooked_read(struct gameport *gameport, int *axes, int *buttons) in fm801_gp_cooked_read() argument 33 w = inw(gameport->io + 2); in fm801_gp_cooked_read() 36 w = inw(gameport->io + 4); in fm801_gp_cooked_read() 38 w = inw(gameport->io + 6); in fm801_gp_cooked_read() 41 w = inw(gameport in fm801_gp_cooked_read() 49 fm801_gp_open(struct gameport * gameport,int mode) fm801_gp_open() argument [all...] |
H A D | lightning.c | 17 #include <linux/gameport.h> 35 struct gameport *gameport; member 57 static int l4_cooked_read(struct gameport *gameport, int *axes, int *buttons) in l4_cooked_read() argument 59 struct l4 *l4 = gameport->port_data; in l4_cooked_read() 90 static int l4_open(struct gameport *gameport, int mode) in l4_open() argument 92 struct l4 *l4 = gameport->port_data; in l4_open() 177 static int l4_calibrate(struct gameport *gamepor argument [all...] |
H A D | emu10k1-gp.c | 7 * EMU10k1 - SB Live / Audigy - gameport driver for Linux 14 #include <linux/gameport.h> 19 MODULE_DESCRIPTION("EMU10k1 gameport driver"); 24 struct gameport *gameport; member 31 { 0x1102, 0x7002, PCI_ANY_ID, PCI_ANY_ID }, /* SB Live gameport */ 32 { 0x1102, 0x7003, PCI_ANY_ID, PCI_ANY_ID }, /* Audigy gameport */ 34 { 0x1102, 0x7005, PCI_ANY_ID, PCI_ANY_ID }, /* Audigy LS gameport */ 43 struct gameport *port; in emu_probe() 62 emu->gameport in emu_probe() [all...] |
H A D | Makefile | 3 # Makefile for the gameport drivers. 8 obj-$(CONFIG_GAMEPORT) += gameport.o
|
/linux/drivers/input/joystick/ |
H A D | gf2k.c | 15 #include <linux/gameport.h> 62 struct gameport *gameport; member 75 static int gf2k_read_packet(struct gameport *gameport, int length, char *data) in gf2k_read_packet() argument 82 t = gameport_time(gameport, GF2K_START); in gf2k_read_packet() 83 p = gameport_time(gameport, GF2K_STROBE); in gf2k_read_packet() 89 gameport_trigger(gameport); in gf2k_read_packet() 90 v = gameport_read(gameport); in gf2k_read_packet() 94 v = gameport_read(gameport); in gf2k_read_packet() 111 gf2k_trigger_seq(struct gameport * gameport,short * seq) gf2k_trigger_seq() argument 186 gf2k_poll(struct gameport * gameport) gf2k_poll() argument 218 gf2k_connect(struct gameport * gameport,struct gameport_driver * drv) gf2k_connect() argument 337 gf2k_disconnect(struct gameport * gameport) gf2k_disconnect() argument [all...] |
H A D | a3d.c | 13 #include <linux/gameport.h> 36 struct gameport *gameport; member 37 struct gameport *adc; 52 static int a3d_read_packet(struct gameport *gameport, int length, char *data) in a3d_read_packet() argument 60 t = gameport_time(gameport, A3D_MAX_START); in a3d_read_packet() 61 s = gameport_time(gameport, A3D_MAX_STROBE); in a3d_read_packet() 64 gameport_trigger(gameport); in a3d_read_packet() 65 v = gameport_read(gameport); in a3d_read_packet() 159 a3d_poll(struct gameport * gameport) a3d_poll() argument 178 a3d_adc_cooked_read(struct gameport * gameport,int * axes,int * buttons) a3d_adc_cooked_read() argument 194 a3d_adc_open(struct gameport * gameport,int mode) a3d_adc_open() argument 209 a3d_adc_close(struct gameport * gameport) a3d_adc_close() argument 243 a3d_connect(struct gameport * gameport,struct gameport_driver * drv) a3d_connect() argument 374 a3d_disconnect(struct gameport * gameport) a3d_disconnect() argument [all...] |
H A D | grip_mp.c | 16 #include <linux/gameport.h> 52 struct gameport *gameport; member 63 #define PACKET_IO_FAST 0x40000000 /* 3 bits per gameport read */ 64 #define PACKET_IO_SLOW 0x20000000 /* 1 bit per gameport read */ 73 #define IO_MODE_FAST 0x0200 /* Used 3 data bits per gameport read */ 130 * Poll gameport; return true if all bits set in 'onbits' are on and 134 static inline int poll_until(u8 onbits, u8 offbits, int u_sec, struct gameport* gp, u8 *data) in poll_until() 145 dbg("gameport timed out after %d microseconds.\n", u_sec); in poll_until() 155 * The multiport clock value is reflected in gameport bi 164 mp_io(struct gameport * gameport,int sendflags,int sendcode,u32 * packet) mp_io() argument 301 multiport_io(struct gameport * gameport,int sendflags,int sendcode,u32 * packet) multiport_io() argument 319 dig_mode_start(struct gameport * gameport,u32 * packet) dig_mode_start() argument 536 grip_poll(struct gameport * gameport) grip_poll() argument 630 grip_connect(struct gameport * gameport,struct gameport_driver * drv) grip_connect() argument 669 grip_disconnect(struct gameport * gameport) grip_disconnect() argument [all...] |
H A D | interact.c | 17 #include <linux/gameport.h> 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 interact_poll(struct gameport * gameport) interact_poll() argument 187 interact_connect(struct gameport * gameport,struct gameport_driver * drv) interact_connect() argument 275 interact_disconnect(struct gameport * gameport) interact_disconnect() argument [all...] |
H A D | cobra.c | 13 #include <linux/gameport.h> 29 struct gameport *gameport; member 37 static unsigned char cobra_read_packet(struct gameport *gameport, unsigned int *data) in cobra_read_packet() argument 45 int strobe = gameport_time(gameport, COBRA_MAX_STROBE); in cobra_read_packet() 54 u = gameport_read(gameport); in cobra_read_packet() 58 v = gameport_read(gameport); in cobra_read_packet() 91 static void cobra_poll(struct gameport *gameport) in cobra_poll() argument 136 cobra_connect(struct gameport * gameport,struct gameport_driver * drv) cobra_connect() argument 222 cobra_disconnect(struct gameport * gameport) cobra_disconnect() argument [all...] |
H A D | sidewinder.c | 15 #include <linux/gameport.h> 97 struct gameport *gameport; member 117 static int sw_read_packet(struct gameport *gameport, unsigned char *buf, int length, int id) in sw_read_packet() argument 124 timeout = id ? gameport_time(gameport, SW_TIMEOUT * 1000) : 0; /* Set up global timeout for ID packet */ in sw_read_packet() 125 kick = id ? gameport_time(gameport, SW_KICK) : 0; /* Set up kick timeout for ID packet */ in sw_read_packet() 126 start = gameport_time(gameport, SW_START); in sw_read_packet() 127 strobe = gameport_time(gameport, SW_STROBE); in sw_read_packet() 134 gameport_trigger(gameport); /* Trigge in sw_read_packet() 222 sw_init_digital(struct gameport * gameport) sw_init_digital() argument 482 sw_poll(struct gameport * gameport) sw_poll() argument 568 sw_connect(struct gameport * gameport,struct gameport_driver * drv) sw_connect() argument 788 sw_disconnect(struct gameport * gameport) sw_disconnect() argument [all...] |
H A D | grip.c | 13 #include <linux/gameport.h> 36 struct gameport *gameport; member 65 static int grip_gpp_read_packet(struct gameport *gameport, int shift, unsigned int *data) in grip_gpp_read_packet() argument 72 int strobe = gameport_time(gameport, GRIP_STROBE_GPP); in grip_gpp_read_packet() 80 v = gameport_read(gameport) >> shift; in grip_gpp_read_packet() 84 u = v; v = (gameport_read(gameport) >> shift) & 3; in grip_gpp_read_packet() 105 static int grip_xt_read_packet(struct gameport *gameport, in argument 163 grip_poll(struct gameport * gameport) grip_poll() argument 279 grip_connect(struct gameport * gameport,struct gameport_driver * drv) grip_connect() argument 385 grip_disconnect(struct gameport * gameport) grip_disconnect() argument [all...] |
H A D | analog.c | 17 #include <linux/gameport.h> 100 struct gameport *gameport; member 169 struct gameport *gameport = port->gameport; in analog_cooked_read() local 180 gameport_trigger(gameport); in analog_cooked_read() 193 this = gameport_read(gameport) & port->mask; in analog_cooked_read() 221 int strobe = gameport_time(port->gameport, ANALOG_SAITEK_TIME); in analog_button_read() 223 u = gameport_read(port->gameport); in analog_button_read() 249 analog_poll(struct gameport * gameport) analog_poll() argument 309 struct gameport *gameport = port->gameport; analog_calibrate_timer() local 516 analog_init_port(struct gameport * gameport,struct gameport_driver * drv,struct analog_port * port) analog_init_port() argument 579 analog_connect(struct gameport * gameport,struct gameport_driver * drv) analog_connect() argument 618 analog_disconnect(struct gameport * gameport) analog_disconnect() argument [all...] |
H A D | joydump.c | 12 #include <linux/gameport.h> 30 static int joydump_connect(struct gameport *gameport, struct gameport_driver *drv) in joydump_connect() argument 40 printk(KERN_INFO "joydump: | Dumping: %30s |\n", gameport->phys); in joydump_connect() 41 printk(KERN_INFO "joydump: | Speed: %28d kHz |\n", gameport->speed); in joydump_connect() 43 if (gameport_open(gameport, drv, GAMEPORT_MODE_RAW)) { in joydump_connect() 47 if (gameport_open(gameport, drv, GAMEPORT_MODE_COOKED)) { in joydump_connect() 54 gameport_cooked_read(gameport, axes, &buttons); in joydump_connect() 62 timeout = gameport_time(gameport, 10000); /* 10 ms */ in joydump_connect() 75 u = gameport_read(gameport); in joydump_connect() 128 joydump_disconnect(struct gameport * gameport) joydump_disconnect() argument [all...] |
H A D | tmdc.c | 17 #include <linux/gameport.h> 105 struct gameport *gameport; member 127 static int tmdc_read_packet(struct gameport *gameport, unsigned char data[2][TMDC_MAX_LENGTH]) in tmdc_read_packet() argument 133 p = gameport_time(gameport, TMDC_MAX_STROBE); in tmdc_read_packet() 136 t[k] = gameport_time(gameport, TMDC_MAX_START); in tmdc_read_packet() 141 gameport_trigger(gameport); in tmdc_read_packet() 143 w = gameport_read(gameport) >> 4; in tmdc_read_packet() 147 w = gameport_read(gameport) >> in tmdc_read_packet() 220 tmdc_poll(struct gameport * gameport) tmdc_poll() argument 344 tmdc_connect(struct gameport * gameport,struct gameport_driver * drv) tmdc_connect() argument 394 tmdc_disconnect(struct gameport * gameport) tmdc_disconnect() argument [all...] |
H A D | Kconfig | 24 gameport. In addition to the usual PC analog joystick, this driver 41 A3D protocol over the PC gameport. 63 protocol over the PC gameport. 92 over the PC gameport. 102 that connects to the gameport and you connect gamepads to it. 112 protocol over the PC gameport. 121 Say Y here if you have an InterAct gameport or joystick 122 communicating digitally over the gameport. 132 Overdrive protocol over PC gameport. 142 DirectConnect (BSP) protocol over the PC gameport [all...] |
/linux/Documentation/input/ |
H A D | gameport-programming.rst | 2 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 addres [all...] |
H A D | input_kapi.rst | 13 gameport-programming
|
/linux/sound/pci/au88x0/ |
H A D | au88x0_game.c | 23 #include <linux/gameport.h> 30 static unsigned char vortex_game_read(struct gameport *gameport) in vortex_game_read() argument 32 vortex_t *vortex = gameport_get_port_data(gameport); in vortex_game_read() 36 static void vortex_game_trigger(struct gameport *gameport) in vortex_game_trigger() argument 38 vortex_t *vortex = gameport_get_port_data(gameport); in vortex_game_trigger() 43 vortex_game_cooked_read(struct gameport *gameport, int *axes, int *buttons) in vortex_game_cooked_read() argument 45 vortex_t *vortex = gameport_get_port_data(gameport); in vortex_game_cooked_read() 59 vortex_game_open(struct gameport * gameport,int mode) vortex_game_open() argument [all...] |
/linux/Documentation/sound/cards/ |
H A D | joystick.rst | 13 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/sound/pci/ymfpci/ |
H A D | ymfpci.c | 64 struct gameport *gp; in snd_ymfpci_create_gameport() 85 r = request_region(io_port, 1, "YMFPCI gameport"); in snd_ymfpci_create_gameport() 91 "no gameport ports available\n"); in snd_ymfpci_create_gameport() 111 "YMFPCI gameport"); in snd_ymfpci_create_gameport() 119 chip->gameport = gp = gameport_allocate_port(); in snd_ymfpci_create_gameport() 122 "cannot allocate memory for gameport\n"); in snd_ymfpci_create_gameport() 138 gameport_register_port(chip->gameport); in snd_ymfpci_create_gameport() 145 if (chip->gameport) { in snd_ymfpci_free_gameport() 146 gameport_unregister_port(chip->gameport); in snd_ymfpci_free_gameport() 147 chip->gameport in snd_ymfpci_free_gameport() [all...] |
/linux/sound/pci/ |
H A D | als4000.c | 22 * ALS100-like SB DSP/mixer, an OPL3 synth, a MPU401 and a gameport 57 #include <linux/gameport.h> 100 struct gameport *gameport; member 740 struct gameport *gp; in snd_als4000_create_gameport() 750 "ALS4000 gameport"); in snd_als4000_create_gameport() 757 "ALS4000 gameport"); in snd_als4000_create_gameport() 765 acard->gameport = gp = gameport_allocate_port(); in snd_als4000_create_gameport() 767 dev_err(&acard->pci->dev, "cannot allocate memory for gameport\n"); in snd_als4000_create_gameport() 779 gameport_register_port(acard->gameport); in snd_als4000_create_gameport() [all...] |
H A D | cs4281.c | 13 #include <linux/gameport.h> 471 struct gameport *gameport; member 1166 static void snd_cs4281_gameport_trigger(struct gameport *gameport) in snd_cs4281_gameport_trigger() argument 1168 struct cs4281 *chip = gameport_get_port_data(gameport); in snd_cs4281_gameport_trigger() 1175 static unsigned char snd_cs4281_gameport_read(struct gameport *gameport) in snd_cs4281_gameport_read() argument 1177 struct cs4281 *chip = gameport_get_port_data(gameport); in snd_cs4281_gameport_read() 1185 static int snd_cs4281_gameport_cooked_read(struct gameport *gamepor argument 1213 snd_cs4281_gameport_open(struct gameport * gameport,int mode) snd_cs4281_gameport_open() argument [all...] |
H A D | azt3328.c | 285 struct gameport *gameport; member 1684 snd_azf3328_gameport_open(struct gameport *gameport, int mode) in snd_azf3328_gameport_open() argument 1686 struct snd_azf3328 *chip = gameport_get_port_data(gameport); in snd_azf3328_gameport_open() 1708 snd_azf3328_gameport_close(struct gameport *gameport) in snd_azf3328_gameport_close() argument 1710 struct snd_azf3328 *chip = gameport_get_port_data(gameport); in snd_azf3328_gameport_close() 1719 snd_azf3328_gameport_cooked_read(struct gameport *gameport, in snd_azf3328_gameport_cooked_read() argument 1724 struct snd_azf3328 *chip = gameport_get_port_data(gameport); in snd_azf3328_gameport_cooked_read() 1786 struct gameport *gp; in snd_azf3328_gameport() 1788 chip->gameport = gp = gameport_allocate_port(); in snd_azf3328_gameport() 1812 gameport_register_port(chip->gameport); in snd_azf3328_gameport() [all …]
|