------------------
The Linux Plug and Play user interface provides a means to activate PnP devices
for legacy and user level drivers that do not support Linux Plug and Play. The
-user interface is integrated into driverfs.
+user interface is integrated into sysfs.
-In addition to the standard driverfs file the following are created in each
+In addition to the standard sysfs file the following are created in each
device's directory:
id - displays a list of support EISA IDs
-possible - displays possible resource configurations
+options - displays possible resource configurations
resources - displays currently allocated resources and allows resource changes
-activating a device
# cat resources
DISABLED
-- Notice the string "DISABLED". THis means the device is not active.
+- Notice the string "DISABLED". This means the device is not active.
3.) check the device's possible configurations (optional)
-# cat possible
+# cat options
Dependent: 01 - Priority acceptable
port 0x3f0-0x3f0, align 0x7, size 0x6, 16-bit address decoding
port 0x3f7-0x3f7, align 0x0, size 0x1, 16-bit address decoding
dma 2
also there are a series of kernel parameters:
-allowdma0
pnp_reserve_irq=irq1[,irq2] ....
pnp_reserve_dma=dma1[,dma2] ....
pnp_reserve_io=io1,size1[,io2,size2] ....
All Plug and Play drivers, protocols, and services meet at a central location
called the Plug and Play Layer. This layer is responsible for the exchange of
information between PnP drivers and PnP protocols. Thus it automatically
-forwards commands to the proper protocol. This makes writting PnP drivers
+forwards commands to the proper protocol. This makes writing PnP drivers
significantly easier.
The following functions are available from the Plug and Play Layer:
pnp_register_driver
- adds a PnP driver to the Plug and Play Layer
- this includes driver model integration
+- returns zero for success or a negative error number for failure; count
+ calls to the .add() method if you need to know how many devices bind to
+ the driver
pnp_unregister_driver
- removes a PnP driver from the Plug and Play Layer
Requirements for a Linux PnP protocol:
1.) the protocol must use EISA IDs
-2.) the protocol must inform the PnP Layer of a devices current configuration
-- the ability to set resources is optional but prefered.
+2.) the protocol must inform the PnP Layer of a device's current configuration
+- the ability to set resources is optional but preferred.
The following are PnP protocol related functions:
- automatically will free mem used by the device and related structures
pnp_add_id
-- adds a EISA ID to the list of supported IDs for the specified device
+- adds an EISA ID to the list of supported IDs for the specified device
For more information consult the source of a protocol such as
/drivers/pnp/pnpbios/core.c.
Linux Plug and Play Drivers
---------------------------
- This section contains information for linux PnP driver developers.
+ This section contains information for Linux PnP driver developers.
The New Way
...........
Please note that the character 'X' can be used as a wild card in the function
portion (last four characters).
ex:
- /* Unkown PnP modems */
+ /* Unknown PnP modems */
{ "PNPCXXX", UNKNOWN_DEV },
Supported PnP card IDs can optionally be defined.
.remove = serial_pnp_remove,
};
-* name and id_table can not be NULL.
+* name and id_table cannot be NULL.
4.) register the driver
ex:
The Old Way
...........
-a series of compatability functions have been created to make it easy to convert
-
+A series of compatibility functions have been created to make it easy to convert
ISAPNP drivers. They should serve as a temporary solution only.
-they are as follows:
+They are as follows:
struct pnp_card *pnp_find_card(unsigned short vendor,
unsigned short device,