diff options
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r-- | drivers/pci/pci.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index eabeb1f2ec99..0a497c1b4227 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -18,6 +18,25 @@ extern int pci_user_write_config_byte(struct pci_dev *dev, int where, u8 val); | |||
18 | extern int pci_user_write_config_word(struct pci_dev *dev, int where, u16 val); | 18 | extern int pci_user_write_config_word(struct pci_dev *dev, int where, u16 val); |
19 | extern int pci_user_write_config_dword(struct pci_dev *dev, int where, u32 val); | 19 | extern int pci_user_write_config_dword(struct pci_dev *dev, int where, u32 val); |
20 | 20 | ||
21 | struct pci_vpd_ops { | ||
22 | int (*read)(struct pci_dev *dev, int pos, int size, char *buf); | ||
23 | int (*write)(struct pci_dev *dev, int pos, int size, const char *buf); | ||
24 | int (*get_size)(struct pci_dev *dev); | ||
25 | void (*release)(struct pci_dev *dev); | ||
26 | }; | ||
27 | |||
28 | struct pci_vpd { | ||
29 | struct pci_vpd_ops *ops; | ||
30 | struct bin_attribute *attr; /* descriptor for sysfs VPD entry */ | ||
31 | }; | ||
32 | |||
33 | extern int pci_vpd_pci22_init(struct pci_dev *dev); | ||
34 | static inline void pci_vpd_release(struct pci_dev *dev) | ||
35 | { | ||
36 | if (dev->vpd) | ||
37 | dev->vpd->ops->release(dev); | ||
38 | } | ||
39 | |||
21 | /* PCI /proc functions */ | 40 | /* PCI /proc functions */ |
22 | #ifdef CONFIG_PROC_FS | 41 | #ifdef CONFIG_PROC_FS |
23 | extern int pci_proc_attach_device(struct pci_dev *dev); | 42 | extern int pci_proc_attach_device(struct pci_dev *dev); |