Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Move the description of struct pci_driver and struct pci_device_id into in-source comments.
Showing the changes to include/linux (2 of 4 files). Show all
Unified · Split
| @@ -16,6 +16,25 @@ typedef unsigned long kernel_ulong_t; · 15 unmodified lines | |||
| 16 | 16 | ||
| 17 | #define PCI_ANY_ID (~0) | 17 | #define PCI_ANY_ID (~0) |
| 18 | 18 | ||
| 19 | /** | ||
| 20 | * struct pci_device_id - PCI device ID structure | ||
| 21 | * @vendor: Vendor ID to match (or PCI_ANY_ID) | ||
| 22 | * @device: Device ID to match (or PCI_ANY_ID) | ||
| 23 | * @subvendor: Subsystem vendor ID to match (or PCI_ANY_ID) | ||
| 24 | * @subdevice: Subsystem device ID to match (or PCI_ANY_ID) | ||
| 25 | * @class: Device class, subclass, and "interface" to match. | ||
| 26 | * See Appendix D of the PCI Local Bus Spec or | ||
| 27 | * include/linux/pci_ids.h for a full list of classes. | ||
| 28 | * Most drivers do not need to specify class/class_mask | ||
| 29 | * as vendor/device is normally sufficient. | ||
| 30 | * @class_mask: Limit which sub-fields of the class field are compared. | ||
| 31 | * See drivers/scsi/sym53c8xx_2/ for example of usage. | ||
| 32 | * @driver_data: Data private to the driver. | ||
| 33 | * Most drivers don't need to use driver_data field. | ||
| 34 | * Best practice is to use driver_data as an index | ||
| 35 | * into a static list of equivalent device types, | ||
| 36 | * instead of using it as a pointer. | ||
| 37 | */ | ||
| 19 | struct pci_device_id { | 38 | struct pci_device_id { |
| 20 | __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/ | 39 | __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/ |
| 21 | __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */ | 40 | __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */ |
| @@ -257,17 +276,17 @@ struct pcmcia_device_id { · 235 unmodified lines | |||
| 257 | __u16 match_flags; | 276 | __u16 match_flags; |
| 258 | 277 | ||
| 259 | __u16 manf_id; | 278 | __u16 manf_id; |
| 260 | __u16 card_id; | 279 | __u16 card_id; |
| 261 | 280 | ||
| 262 | __u8 func_id; | 281 | __u8 func_id; |
| 263 | 282 | ||
| 264 | /* for real multi-function devices */ | 283 | /* for real multi-function devices */ |
| 265 | __u8 function; | 284 | __u8 function; |
| 266 | 285 | ||
| 267 | /* for pseudo multi-function devices */ | 286 | /* for pseudo multi-function devices */ |
| 268 | __u8 device_no; | 287 | __u8 device_no; |
| 269 | 288 | ||
| 270 | __u32 prod_id_hash[4]; | 289 | __u32 prod_id_hash[4]; |
| 271 | 290 | ||
| 272 | /* not matched against in kernelspace */ | 291 | /* not matched against in kernelspace */ |
| 273 | const char * prod_id[4]; | 292 | const char * prod_id[4]; |
| @@ -151,6 +151,8 @@ static inline const char *pci_power_name(pci_power_t state) · 150 unmodified lines | |||
| 151 | #define PCI_PM_BUS_WAIT 50 | 151 | #define PCI_PM_BUS_WAIT 50 |
| 152 | 152 | ||
| 153 | /** | 153 | /** |
| 154 | * typedef pci_channel_state_t | ||
| 155 | * | ||
| 154 | * The pci_channel state describes connectivity between the CPU and | 156 | * The pci_channel state describes connectivity between the CPU and |
| 155 | * the PCI device. If some PCI bus between here and the PCI device | 157 | * the PCI device. If some PCI bus between here and the PCI device |
| 156 | * has crashed or locked up, this info is reflected here. | 158 | * has crashed or locked up, this info is reflected here. |
| @@ -775,6 +777,50 @@ struct pci_error_handlers { · 618 unmodified lines | |||
| 775 | 777 | ||
| 776 | 778 | ||
| 777 | struct module; | 779 | struct module; |
| 780 | |||
| 781 | /** | ||
| 782 | * struct pci_driver - PCI driver structure | ||
| 783 | * @node: List of driver structures. | ||
| 784 | * @name: Driver name. | ||
| 785 | * @id_table: Pointer to table of device IDs the driver is | ||
| 786 | * interested in. Most drivers should export this | ||
| 787 | * table using MODULE_DEVICE_TABLE(pci,...). | ||
| 788 | * @probe: This probing function gets called (during execution | ||
| 789 | * of pci_register_driver() for already existing | ||
| 790 | * devices or later if a new device gets inserted) for | ||
| 791 | * all PCI devices which match the ID table and are not | ||
| 792 | * "owned" by the other drivers yet. This function gets | ||
| 793 | * passed a "struct pci_dev \*" for each device whose | ||
| 794 | * entry in the ID table matches the device. The probe | ||
| 795 | * function returns zero when the driver chooses to | ||
| 796 | * take "ownership" of the device or an error code | ||
| 797 | * (negative number) otherwise. | ||
| 798 | * The probe function always gets called from process | ||
| 799 | * context, so it can sleep. | ||
| 800 | * @remove: The remove() function gets called whenever a device | ||
| 801 | * being handled by this driver is removed (either during | ||
| 802 | * deregistration of the driver or when it's manually | ||
| 803 | * pulled out of a hot-pluggable slot). | ||
| 804 | * The remove function always gets called from process | ||
| 805 | * context, so it can sleep. | ||
| 806 | * @suspend: Put device into low power state. | ||
| 807 | * @suspend_late: Put device into low power state. | ||
| 808 | * @resume_early: Wake device from low power state. | ||
| 809 | * @resume: Wake device from low power state. | ||
| 810 | * (Please see Documentation/power/pci.txt for descriptions | ||
| 811 | * of PCI Power Management and the related functions.) | ||
| 812 | * @shutdown: Hook into reboot_notifier_list (kernel/sys.c). | ||
| 813 | * Intended to stop any idling DMA operations. | ||
| 814 | * Useful for enabling wake-on-lan (NIC) or changing | ||
| 815 | * the power state of a device before reboot. | ||
| 816 | * e.g. drivers/net/e100.c. | ||
| 817 | * @sriov_configure: Optional driver callback to allow configuration of | ||
| 818 | * number of VFs to enable via sysfs "sriov_numvfs" file. | ||
| 819 | * @err_handler: See Documentation/PCI/pci-error-recovery.rst | ||
| 820 | * @groups: Sysfs attribute groups. | ||
| 821 | * @driver: Driver model structure. | ||
| 822 | * @dynids: List of dynamically added device IDs. | ||
| 823 | */ | ||
| 778 | struct pci_driver { | 824 | struct pci_driver { |
| 779 | struct list_head node; | 825 | struct list_head node; |
| 780 | const char *name; | 826 | const char *name; |
| @@ -2206,7 +2252,7 @@ static inline u8 pci_vpd_srdt_tag(const u8 *srdt) · 1425 unmodified lines | |||
| 2206 | 2252 | ||
| 2207 | /** | 2253 | /** |
| 2208 | * pci_vpd_info_field_size - Extracts the information field length | 2254 | * pci_vpd_info_field_size - Extracts the information field length |
| 2209 | * @lrdt: Pointer to the beginning of an information field header | 2255 | * @info_field: Pointer to the beginning of an information field header |
| 2210 | * | 2256 | * |
| 2211 | * Returns the extracted information field length. | 2257 | * Returns the extracted information field length. |
| 2212 | */ | 2258 | */ |