Main index | Section 9 | Options |
#include <sys/module.h>
The macro takes a descriptor_string that describes the memory layout of table entries. The string is a series of members separated by semi-colons. Members are identified by a type and a name. They are encoded in the descriptor string by concatenating the type with a colon, followed by the name. (The special type W32 represents two members. The first name is encoded like any other type. The second name is encoded by appending a forward slash and the second name after the first.)
Types are one of the following:
"U8" | |
uint8_t element. | |
"V8" | |
Same as U8, except that the sentinel value 0xFF matches any. | |
"G16" | |
uint16_t element; any value greater than or equal matches. | |
"L16" | |
uint16_t element; any value less than or equal matches. | |
"M16" | |
uint16_t element; mask of which of the following fields to use. | |
"U16" | |
uint16_t element. | |
"V16" | |
Same as U16, except that the sentinel value 0xFFFF matches any. | |
"U32" | |
uint32_t element. | |
"V32" | |
Same as U32, except that the sentinel value 0xFFFFFFFF matches any. | |
"W32" | |
Two uint16_t values; the first named member is in the least significant word and the second named member is in the most significant word. | |
"Z" | |
A pointer to a string to match exactly. | |
"D" | |
A pointer to a human readable description for the device. | |
"P" | |
A pointer that should be ignored. | |
"E" | |
EISA PNP Identifier. | |
"T" | |
PNP info that is true for the whole table. The driver code checks for these condition pragmatically before using this table to match devices. This item must come last in the list. | |
The pseudo-name "#" is reserved for fields that should be ignored. Any member that does not match the parent device's pnpinfo output must be ignored.
The bus parameter is an unquoted word naming the parent bus of the driver. For example, "pci".
The module parameter is also an unquoted word. It must be unique to the driver. Usually the driver's name is used.
The table parameter points to the device matching data with entries matching the descriptor_string.
The num_entries parameter is the number of entries in the table, i.e., ‘nitems(table)’. Note that only valid entries should be included. If the table contains trailing zero or bogus values, they should not be included in num_entries.
Example 1amp;: Using W32 for vendor/device pair | |
The following example shows usage of W32 type when vendor/device values are combined into single uint32_t value: #include <sys/param.h> #include <sys/module.h> | |
Example 2amp;: Using T for common vendor value | |
The following example shows usage of T type when all entries in the table have the same vendor value: #include <sys/param.h> #include <sys/module.h> | |
MODULE_PNP_INFO (9) | May 23, 2019 |
Main index | Section 9 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Using Unix is the computing equivalent of listening only to music by David Cassidy | ” |
— Rob Pike |