summaryrefslogtreecommitdiff
path: root/release/src/linux/linux/include/linux/pci_gameport.h
blob: ec0675485cce70dd9facd978ee71bab45e77502f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __LINUX_PCI_GAMEPORT_H
#define __LINUX_PCI_GAMEPORT_H

/*
 *	Public interfaces for attaching a PCI gameport directly to the
 *	soundcard when it shares the same PCI ident
 */
 
#define PCIGAME_4DWAVE		0
#define PCIGAME_VORTEX		1
#define PCIGAME_VORTEX2		2


struct pcigame_data {
	int gcr;	/* Gameport control register */
	int legacy;	/* Legacy port location */
	int axes;	/* Axes start */
	int axsize;	/* Axis field size */
	int axmax;	/* Axis field max value */
	int adcmode;	/* Value to enable ADC mode in GCR */
};

struct pcigame {
	struct gameport gameport;
	struct pci_dev *dev;
        unsigned char *base;
	struct pcigame_data *data;
};


#if defined(CONFIG_INPUT_PCIGAME) || defined(CONFIG_INPUT_PCIGAME_MODULE)
extern struct pcigame *pcigame_attach(struct pci_dev *dev, int type);
extern void pcigame_detach(struct pcigame *game);
#else
#define pcigame_attach(a,b)	NULL
#define pcigame_detach(a)
#endif

#endif