diff options
Diffstat (limited to 'drivers/pnp/base.h')
-rw-r--r-- | drivers/pnp/base.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/drivers/pnp/base.h b/drivers/pnp/base.h index 1667ac3ca45b..3126e4582008 100644 --- a/drivers/pnp/base.h +++ b/drivers/pnp/base.h | |||
@@ -19,6 +19,54 @@ void pnp_remove_card(struct pnp_card *card); | |||
19 | int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev); | 19 | int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev); |
20 | void pnp_remove_card_device(struct pnp_dev *dev); | 20 | void pnp_remove_card_device(struct pnp_dev *dev); |
21 | 21 | ||
22 | struct pnp_port { | ||
23 | unsigned short min; /* min base number */ | ||
24 | unsigned short max; /* max base number */ | ||
25 | unsigned char align; /* align boundary */ | ||
26 | unsigned char size; /* size of range */ | ||
27 | unsigned char flags; /* port flags */ | ||
28 | unsigned char pad; /* pad */ | ||
29 | struct pnp_port *next; /* next port */ | ||
30 | }; | ||
31 | |||
32 | #define PNP_IRQ_NR 256 | ||
33 | struct pnp_irq { | ||
34 | DECLARE_BITMAP(map, PNP_IRQ_NR); /* bitmask for IRQ lines */ | ||
35 | unsigned char flags; /* IRQ flags */ | ||
36 | unsigned char pad; /* pad */ | ||
37 | struct pnp_irq *next; /* next IRQ */ | ||
38 | }; | ||
39 | |||
40 | struct pnp_dma { | ||
41 | unsigned char map; /* bitmask for DMA channels */ | ||
42 | unsigned char flags; /* DMA flags */ | ||
43 | struct pnp_dma *next; /* next port */ | ||
44 | }; | ||
45 | |||
46 | struct pnp_mem { | ||
47 | unsigned int min; /* min base number */ | ||
48 | unsigned int max; /* max base number */ | ||
49 | unsigned int align; /* align boundary */ | ||
50 | unsigned int size; /* size of range */ | ||
51 | unsigned char flags; /* memory flags */ | ||
52 | unsigned char pad; /* pad */ | ||
53 | struct pnp_mem *next; /* next memory resource */ | ||
54 | }; | ||
55 | |||
56 | #define PNP_RES_PRIORITY_PREFERRED 0 | ||
57 | #define PNP_RES_PRIORITY_ACCEPTABLE 1 | ||
58 | #define PNP_RES_PRIORITY_FUNCTIONAL 2 | ||
59 | #define PNP_RES_PRIORITY_INVALID 65535 | ||
60 | |||
61 | struct pnp_option { | ||
62 | unsigned short priority; /* priority */ | ||
63 | struct pnp_port *port; /* first port */ | ||
64 | struct pnp_irq *irq; /* first IRQ */ | ||
65 | struct pnp_dma *dma; /* first DMA */ | ||
66 | struct pnp_mem *mem; /* first memory resource */ | ||
67 | struct pnp_option *next; /* used to chain dependent resources */ | ||
68 | }; | ||
69 | |||
22 | struct pnp_option *pnp_build_option(int priority); | 70 | struct pnp_option *pnp_build_option(int priority); |
23 | struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev); | 71 | struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev); |
24 | struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, | 72 | struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, |