blob: b888a5fb6b7f2dbf62a661030950a1982780dab9 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001extern spinlock_t pnp_lock;
2void *pnp_alloc(long size);
Bjorn Helgaas25eb8462008-04-28 16:33:53 -06003#define PNP_EISA_ID_MASK 0x7fffffff
4void pnp_eisa_id_to_string(u32 id, char *str);
Bjorn Helgaasbda1e4e2008-04-28 16:33:54 -06005struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *, int id, char *pnpid);
Bjorn Helgaas6bf2aab2008-04-28 16:33:58 -06006struct pnp_card *pnp_alloc_card(struct pnp_protocol *, int id, char *pnpid);
Bjorn Helgaas772defc2008-04-28 16:33:52 -06007struct pnp_id *pnp_add_id(struct pnp_dev *dev, char *id);
Bjorn Helgaase4366752008-04-28 16:33:56 -06008struct pnp_id *pnp_add_card_id(struct pnp_card *card, char *id);
Linus Torvalds1da177e2005-04-16 15:20:36 -07009int pnp_interface_attach_device(struct pnp_dev *dev);
10void pnp_fixup_device(struct pnp_dev *dev);
11void pnp_free_option(struct pnp_option *option);
12int __pnp_add_device(struct pnp_dev *dev);
13void __pnp_remove_device(struct pnp_dev *dev);
14
Bjorn Helgaasf5d94ff2008-04-28 16:34:22 -060015int pnp_check_port(struct pnp_dev *dev, struct resource *res);
16int pnp_check_mem(struct pnp_dev *dev, struct resource *res);
17int pnp_check_irq(struct pnp_dev *dev, struct resource *res);
18int pnp_check_dma(struct pnp_dev *dev, struct resource *res);
Bjorn Helgaas81b5c752008-04-28 16:34:08 -060019
20void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc);
Bjorn Helgaasd948a8d2008-04-28 16:34:13 -060021
22void pnp_init_resource(struct resource *res);
Bjorn Helgaas02d83b52008-04-28 16:34:28 -060023
24#define PNP_MAX_PORT 40
25#define PNP_MAX_MEM 24
26#define PNP_MAX_IRQ 2
27#define PNP_MAX_DMA 2
28
29struct pnp_resource_table {
30 struct resource port_resource[PNP_MAX_PORT];
31 struct resource mem_resource[PNP_MAX_MEM];
32 struct resource dma_resource[PNP_MAX_DMA];
33 struct resource irq_resource[PNP_MAX_IRQ];
34};