)sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}(hhparenthuba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget#/translations/zh_CN/admin-guide/pnpmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}(hhhh2ubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget#/translations/zh_TW/admin-guide/pnpmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}(hhhhFubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget#/translations/it_IT/admin-guide/pnpmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}(hhhhZubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget#/translations/ja_JP/admin-guide/pnpmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}(hhhhnubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget#/translations/ko_KR/admin-guide/pnpmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}(hhhhubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget#/translations/sp_SP/admin-guide/pnpmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h!Linux Plug and Play Documentationh]h!Linux Plug and Play Documentation}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh=/var/lib/git/docbuild/linux/Documentation/admin-guide/pnp.rsthKubh field_list)}(hhh](hfield)}(hhh](h field_name)}(hAuthorh]hAuthor}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh field_body)}(hAdam Belay h]h paragraph)}(hhh](h Adam Belay <}(h Adam Belay }(h>hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Last updatedh]h Last updated}(hjhj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhKubh)}(hOct. 16, 2002 h]h)}(h Oct. 16, 2002h]h Oct. 16, 2002}(hj!hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hOverviewh]hOverview}(hjDhjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hhhhhK ubh)}(hPlug and Play provides a means of detecting and setting resources for legacy or otherwise unconfigurable devices. The Linux Plug and Play Layer provides these services to compatible drivers.h]hPlug and Play provides a means of detecting and setting resources for legacy or otherwise unconfigurable devices. The Linux Plug and Play Layer provides these services to compatible drivers.}(hjRhjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hj?hhubeh}(h]overviewah ]h"]overviewah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hThe User Interfaceh]hThe User Interface}(hjkhjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhhhhhKubh)}(hThe 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 sysfs.h]hThe 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 sysfs.}(hjyhjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjfhhubh)}(hXIn addition to the standard sysfs file the following are created in each device's directory: - id - displays a list of support EISA IDs - options - displays possible resource configurations - resources - displays currently allocated resources and allows resource changesh]hXIn addition to the standard sysfs file the following are created in each device’s directory: - id - displays a list of support EISA IDs - options - displays possible resource configurations - resources - displays currently allocated resources and allows resource changes}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjfhhubh)}(hhh](h)}(hactivating a deviceh]hactivating a device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh literal_block)}(h# echo "auto" > resourcesh]h# echo "auto" > resources}(hhhjubah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK#hjhhubh)}(hLthis will invoke the automatic resource config system to activate the deviceh]hLthis will invoke the automatic resource config system to activate the device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjhhubeh}(h]activating-a-deviceah ]h"]activating a deviceah$]h&]uh1hhjfhhhhhKubh)}(hhh](h)}(hmanually activating a deviceh]hmanually activating a device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK(ubj)}(h# echo "manual " > resources - the configuration number - static or dynamic static = for next boot dynamic = nowh]h# echo "manual " > resources - the configuration number - static or dynamic static = for next boot dynamic = now}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhhhK,hjhhubeh}(h]manually-activating-a-deviceah ]h"]manually activating a deviceah$]h&]uh1hhjfhhhhhK(ubh)}(hhh](h)}(hdisabling a deviceh]hdisabling a device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK4ubj)}(h# echo "disable" > resourcesh]h# echo "disable" > resources}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhhhK8hjhhubh)}(hEXAMPLE:h]hEXAMPLE:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjhhubh)}(h8Suppose you need to activate the floppy disk controller.h]h8Suppose you need to activate the floppy disk controller.}(hj"hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjhhubhenumerated_list)}(hhh](h list_item)}(hchange to the proper directory, in my case it is /driver/bus/pnp/devices/00:0f:: # cd /driver/bus/pnp/devices/00:0f # cat name PC standard floppy disk controller h](h)}(hPchange to the proper directory, in my case it is /driver/bus/pnp/devices/00:0f::h]hOchange to the proper directory, in my case it is /driver/bus/pnp/devices/00:0f:}(hOchange to the proper directory, in my case it is /driver/bus/pnp/devices/00:0f:hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hj5ubj)}(hP# cd /driver/bus/pnp/devices/00:0f # cat name PC standard floppy disk controllerh]hP# cd /driver/bus/pnp/devices/00:0f # cat name PC standard floppy disk controller}(hhhjHubah}(h]h ]h"]h$]h&]jjuh1jhhhKBhj5ubeh}(h]h ]h"]h$]h&]uh1j3hj0hhhhhNubj4)}(hLcheck if the device is already active:: # cat resources DISABLED h](h)}(h'check if the device is already active::h]h&check if the device is already active:}(h&check if the device is already active:hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKFhj\ubj)}(h# cat resources DISABLEDh]h# cat resources DISABLED}(hhhjoubah}(h]h ]h"]h$]h&]jjuh1jhhhKHhj\ubeh}(h]h ]h"]h$]h&]uh1j3hj0hhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1j.hjhhhhhK?ubh block_quote)}(hhh]h bullet_list)}(hhh]j4)}(hDNotice the string "DISABLED". This means the device is not active. h]h)}(hCNotice the string "DISABLED". This means the device is not active.h]hGNotice the string “DISABLED”. This means the device is not active.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjubah}(h]h ]h"]h$]h&]uh1j3hjubah}(h]h ]h"]h$]h&]bullet-uh1jhhhKKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj/)}(hhh](j4)}(hXcheck the device's possible configurations (optional):: # 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 irq 6 dma 2 8-bit compatible Dependent: 02 - Priority acceptable port 0x370-0x370, align 0x7, size 0x6, 16-bit address decoding port 0x377-0x377, align 0x0, size 0x1, 16-bit address decoding irq 6 dma 2 8-bit compatible h](h)}(h7check the device's possible configurations (optional)::h]h8check the device’s possible configurations (optional):}(h6check the device's possible configurations (optional):hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjubj)}(hX# 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 irq 6 dma 2 8-bit compatible Dependent: 02 - Priority acceptable port 0x370-0x370, align 0x7, size 0x6, 16-bit address decoding port 0x377-0x377, align 0x0, size 0x1, 16-bit address decoding irq 6 dma 2 8-bit compatibleh]hX# 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 irq 6 dma 2 8-bit compatible Dependent: 02 - Priority acceptable port 0x370-0x370, align 0x7, size 0x6, 16-bit address decoding port 0x377-0x377, align 0x0, size 0x1, 16-bit address decoding irq 6 dma 2 8-bit compatible}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhhhKOhjubeh}(h]h ]h"]h$]h&]uh1j3hjhhhhhNubj4)}(h:now activate the device:: # echo "auto" > resources h](h)}(hnow activate the device::h]hnow activate the device:}(hnow activate the device:hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hjubj)}(h# echo "auto" > resourcesh]h# echo "auto" > resources}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhhhK]hjubeh}(h]h ]h"]h$]h&]uh1j3hjhhhhhNubj4)}(h|finally check if the device is active:: # cat resources io 0x3f0-0x3f5 io 0x3f7-0x3f7 irq 6 dma 2 h](h)}(h'finally check if the device is active::h]h&finally check if the device is active:}(h&finally check if the device is active:hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hjubj)}(h9# cat resources io 0x3f0-0x3f5 io 0x3f7-0x3f7 irq 6 dma 2h]h9# cat resources io 0x3f0-0x3f5 io 0x3f7-0x3f7 irq 6 dma 2}(hhhj"ubah}(h]h ]h"]h$]h&]jjuh1jhhhKahjubeh}(h]h ]h"]h$]h&]uh1j3hjhhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjstartKuh1j.hjhhhhhKMubh)}(h.also there are a series of kernel parameters::h]h-also there are a series of kernel parameters:}(h-also there are a series of kernel parameters:hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjhhubj)}(hpnp_reserve_irq=irq1[,irq2] .... pnp_reserve_dma=dma1[,dma2] .... pnp_reserve_io=io1,size1[,io2,size2] .... pnp_reserve_mem=mem1,size1[,mem2,size2] ....h]hpnp_reserve_irq=irq1[,irq2] .... pnp_reserve_dma=dma1[,dma2] .... pnp_reserve_io=io1,size1[,io2,size2] .... pnp_reserve_mem=mem1,size1[,mem2,size2] ....}(hhhjLubah}(h]h ]h"]h$]h&]jjuh1jhhhKihjhhubeh}(h]disabling-a-deviceah ]h"]disabling a deviceah$]h&]uh1hhjfhhhhhK4ubeh}(h]the-user-interfaceah ]h"]the user interfaceah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hThe Unified Plug and Play Layerh]hThe Unified Plug and Play Layer}(hjohjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhhhhhKqubh)}(hXFAll 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 writing PnP drivers significantly easier.h]hXFAll 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 writing PnP drivers significantly easier.}(hj}hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjjhhubh)}(hCThe following functions are available from the Plug and Play Layer:h]hCThe following functions are available from the Plug and Play Layer:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhjjhhubhdefinition_list)}(hhh](hdefinition_list_item)}(h6pnp_get_protocol increments the number of uses by one h](hterm)}(hpnp_get_protocolh]hpnp_get_protocol}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK|hjubh definition)}(hhh]h)}(h$increments the number of uses by oneh]h$increments the number of uses by one}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK|hjubj)}(h8pnp_put_protocol deincrements the number of uses by one h](j)}(hpnp_put_protocolh]hpnp_put_protocol}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h&deincrements the number of uses by oneh]h&deincrements the number of uses by one}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(h>pnp_register_protocol use this to register a new PnP protocol h](j)}(hpnp_register_protocolh]hpnp_register_protocol}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h'use this to register a new PnP protocolh]h'use this to register a new PnP protocol}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(h`pnp_unregister_protocol use this function to remove a PnP protocol from the Plug and Play Layer h](j)}(hpnp_unregister_protocolh]hpnp_unregister_protocol}(hj5hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj/ubj)}(hhh]h)}(hGuse this function to remove a PnP protocol from the Plug and Play Layerh]hGuse this function to remove a PnP protocol from the Plug and Play Layer}(hjFhjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hXpnp_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 h](j)}(hpnp_register_driverh]hpnp_register_driver}(hjdhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj^ubj)}(hhh](h)}(h,adds a PnP driver to the Plug and Play Layerh]h,adds a PnP driver to the Plug and Play Layer}(hjuhjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjpubh)}(hthis 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 driverh]hthis 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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjpubeh}(h]h ]h"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hJpnp_unregister_driver removes a PnP driver from the Plug and Play Layer h](j)}(hpnp_unregister_driverh]hpnp_unregister_driver}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h1removes a PnP driver from the Plug and Play Layerh]h1removes a PnP driver from the Plug and Play Layer}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhjjhhhhhNubeh}(h]the-unified-plug-and-play-layerah ]h"]the unified plug and play layerah$]h&]uh1hhhhhhhhKqubh)}(hhh](h)}(hPlug and Play Protocolsh]hPlug and Play Protocols}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h>This section contains information for PnP protocol developers.h]h>This section contains information for PnP protocol developers.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hGThe following Protocols are currently available in the computing world:h]hGThe following Protocols are currently available in the computing world:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](j4)}(hEPNPBIOS: used for system devices such as serial and parallel ports.h]j)}(hhh]j)}(hCPNPBIOS: used for system devices such as serial and parallel ports.h](j)}(hPNPBIOS:h]hPNPBIOS:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h:used for system devices such as serial and parallel ports.h]h:used for system devices such as serial and parallel ports.}(hj&hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj!ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3hjhhhNhNubj4)}(h.ISAPNP: provides PnP support for the ISA bush]j)}(hhh]j)}(h,ISAPNP: provides PnP support for the ISA bush](j)}(hISAPNP:h]hISAPNP:}(hjWhjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjQubj)}(hhh]h)}(h$provides PnP support for the ISA bush]h$provides PnP support for the ISA bus}(hjhhjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjcubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]uh1jhhhKhjNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1j3hjhhhNhNubj4)}(hUACPI: among its many uses, ACPI provides information about system level devices. h]j)}(hhh]j)}(hQACPI: among its many uses, ACPI provides information about system level devices. h](j)}(hACPI:h]hACPI:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hJamong its many uses, ACPI provides information about system level devices.h]hJamong its many uses, ACPI provides information about system level devices.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3hjhhhNhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hIt is meant to replace the PNPBIOS. It is not currently supported by Linux Plug and Play but it is planned to be in the near future.h]hIt is meant to replace the PNPBIOS. It is not currently supported by Linux Plug and Play but it is planned to be in the near future.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hRequirements for a Linux PnP protocol: 1. the protocol must use EISA IDs 2. the protocol must inform the PnP Layer of a device's current configurationh]hRequirements for a Linux PnP protocol: 1. the protocol must use EISA IDs 2. the protocol must inform the PnP Layer of a device’s current configuration}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh]j4)}(h8the ability to set resources is optional but preferred. h]h)}(h7the ability to set resources is optional but preferred.h]h7the ability to set resources is optional but preferred.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j3hjhhhhhNubah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(h1The following are PnP protocol related functions:h]h1The following are PnP protocol related functions:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](j)}(hpnp_add_device use this function to add a PnP device to the PnP layer only call this function when all wanted values are set in the pnp_dev structure h](j)}(hpnp_add_deviceh]hpnp_add_device}(hj(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj"ubj)}(hhh](h)}(h6use this function to add a PnP device to the PnP layerh]h6use this function to add a PnP device to the PnP layer}(hj9hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj4ubh)}(hOonly call this function when all wanted values are set in the pnp_dev structureh]hOonly call this function when all wanted values are set in the pnp_dev structure}(hjGhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj4ubeh}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(h:pnp_init_device call this to initialize the PnP structure h](j)}(hpnp_init_deviceh]hpnp_init_device}(hjehjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj_ubj)}(hhh]h)}(h)call this to initialize the PnP structureh]h)call this to initialize the PnP structure}(hjvhjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjqubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hpnp_remove_device call this to remove a device from the Plug and Play Layer. it will fail if the device is still in use. automatically will free mem used by the device and related structures h](j)}(hpnp_remove_deviceh]hpnp_remove_device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hcall this to remove a device from the Plug and Play Layer. it will fail if the device is still in use. automatically will free mem used by the device and related structuresh]hcall this to remove a device from the Plug and Play Layer. it will fail if the device is still in use. automatically will free mem used by the device and related structures}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hQpnp_add_id adds an EISA ID to the list of supported IDs for the specified device h](j)}(h pnp_add_idh]h pnp_add_id}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hEadds an EISA ID to the list of supported IDs for the specified deviceh]hEadds an EISA ID to the list of supported IDs for the specified device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(hZFor more information consult the source of a protocol such as /drivers/pnp/pnpbios/core.c.h]hZFor more information consult the source of a protocol such as /drivers/pnp/pnpbios/core.c.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]plug-and-play-protocolsah ]h"]plug and play protocolsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hLinux Plug and Play Driversh]hLinux Plug and Play Drivers}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hBThis section contains information for Linux PnP driver developers.h]hBThis section contains information for Linux PnP driver developers.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh](h)}(h The New Wayh]h The New Way}(hj,hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hhhhhKubj/)}(hhh](j4)}(hXfirst make a list of supported EISA IDS ex:: static const struct pnp_id pnp_dev_table[] = { /* Standard LPT Printer Port */ {.id = "PNP0400", .driver_data = 0}, /* ECP Printer Port */ {.id = "PNP0401", .driver_data = 0}, {.id = ""} }; Please note that the character 'X' can be used as a wild card in the function portion (last four characters). ex:: /* Unknown PnP modems */ { "PNPCXXX", UNKNOWN_DEV }, Supported PnP card IDs can optionally be defined. ex:: static const struct pnp_id pnp_card_table[] = { { "ANYDEVS", 0 }, { "", 0 } }; h](h)}(h'first make a list of supported EISA IDSh]h'first make a list of supported EISA IDS}(hjAhj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;ubh)}(hex::h]hex:}(hex:hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;ubj)}(hstatic const struct pnp_id pnp_dev_table[] = { /* Standard LPT Printer Port */ {.id = "PNP0400", .driver_data = 0}, /* ECP Printer Port */ {.id = "PNP0401", .driver_data = 0}, {.id = ""} };h]hstatic const struct pnp_id pnp_dev_table[] = { /* Standard LPT Printer Port */ {.id = "PNP0400", .driver_data = 0}, /* ECP Printer Port */ {.id = "PNP0401", .driver_data = 0}, {.id = ""} };}(hhhj\ubah}(h]h ]h"]h$]h&]jjuh1jhhhKhj;ubh)}(hmPlease note that the character 'X' can be used as a wild card in the function portion (last four characters).h]hqPlease note that the character ‘X’ can be used as a wild card in the function portion (last four characters).}(hjlhjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;ubh)}(hex::h]hex:}(hex:hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;ubj)}(hK/* Unknown PnP modems */ { "PNPCXXX", UNKNOWN_DEV },h]hK/* Unknown PnP modems */ { "PNPCXXX", UNKNOWN_DEV },}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhhhKhj;ubh)}(h6Supported PnP card IDs can optionally be defined. ex::h]h5Supported PnP card IDs can optionally be defined. ex:}(h5Supported PnP card IDs can optionally be defined. ex:hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;ubj)}(hstatic const struct pnp_id pnp_card_table[] = { { "ANYDEVS", 0 }, { "", 0 } };h]hstatic const struct pnp_id pnp_card_table[] = { { "ANYDEVS", 0 }, { "", 0 } };}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhhhKhj;ubeh}(h]h ]h"]h$]h&]uh1j3hj8hhhhhNubj4)}(hXOptionally define probe and remove functions. It may make sense not to define these functions if the driver already has a reliable method of detecting the resources, such as the parport_pc driver. ex:: static int serial_pnp_probe(struct pnp_dev * dev, const struct pnp_id *card_id, const struct pnp_id *dev_id) { . . . ex:: static void serial_pnp_remove(struct pnp_dev * dev) { . . . consult /drivers/serial/8250_pnp.c for more information. h](h)}(hOptionally define probe and remove functions. It may make sense not to define these functions if the driver already has a reliable method of detecting the resources, such as the parport_pc driver.h]hOptionally define probe and remove functions. It may make sense not to define these functions if the driver already has a reliable method of detecting the resources, such as the parport_pc driver.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hex::h]hex:}(hex:hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hstatic int serial_pnp_probe(struct pnp_dev * dev, const struct pnp_id *card_id, const struct pnp_id *dev_id) { . . .h]hstatic int serial_pnp_probe(struct pnp_dev * dev, const struct pnp_id *card_id, const struct pnp_id *dev_id) { . . .}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubh)}(hex::h]hex:}(hex:hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(h;static void serial_pnp_remove(struct pnp_dev * dev) { . . .h]h;static void serial_pnp_remove(struct pnp_dev * dev) { . . .}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubh)}(h8consult /drivers/serial/8250_pnp.c for more information.h]h8consult /drivers/serial/8250_pnp.c for more information.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1j3hj8hhhhhNubj4)}(hXkcreate a driver structure ex:: static struct pnp_driver serial_pnp_driver = { .name = "serial", .card_id_table = pnp_card_table, .id_table = pnp_dev_table, .probe = serial_pnp_probe, .remove = serial_pnp_remove, }; * name and id_table cannot be NULL. h](h)}(hcreate a driver structureh]hcreate a driver structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hex::h]hex:}(hex:hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hXstatic struct pnp_driver serial_pnp_driver = { .name = "serial", .card_id_table = pnp_card_table, .id_table = pnp_dev_table, .probe = serial_pnp_probe, .remove = serial_pnp_remove, };h]hXstatic struct pnp_driver serial_pnp_driver = { .name = "serial", .card_id_table = pnp_card_table, .id_table = pnp_dev_table, .probe = serial_pnp_probe, .remove = serial_pnp_remove, };}(hhhj9ubah}(h]h ]h"]h$]h&]jjuh1jhhhMhjubj)}(hhh]j4)}(h"name and id_table cannot be NULL. h]h)}(h!name and id_table cannot be NULL.h]h!name and id_table cannot be NULL.}(hjPhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjJubah}(h]h ]h"]h$]h&]uh1j3hjGubah}(h]h ]h"]h$]h&]j*uh1jhhhM hjubeh}(h]h ]h"]h$]h&]uh1j3hj8hhhNhNubj4)}(hregister the driver ex:: static int __init serial8250_pnp_init(void) { return pnp_register_driver(&serial_pnp_driver); } h](h)}(hregister the driverh]hregister the driver}(hjuhjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjoubh)}(hex::h]hex:}(hex:hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjoubj)}(hgstatic int __init serial8250_pnp_init(void) { return pnp_register_driver(&serial_pnp_driver); }h]hgstatic int __init serial8250_pnp_init(void) { return pnp_register_driver(&serial_pnp_driver); }}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhhhMhjoubeh}(h]h ]h"]h$]h&]uh1j3hj8hhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1j.hj'hhhhhKubeh}(h] the-new-wayah ]h"] the new wayah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h The Old Wayh]h The Old Way}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hA series of compatibility functions have been created to make it easy to convert ISAPNP drivers. They should serve as a temporary solution only.h]hA series of compatibility functions have been created to make it easy to convert ISAPNP drivers. They should serve as a temporary solution only.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThey are as follows::h]hThey are as follows:}(hThey are as follows:hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hstruct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor, unsigned short function, struct pnp_dev *from)h]hstruct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor, unsigned short function, struct pnp_dev *from)}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhhhMhjhhubeh}(h] the-old-wayah ]h"] the old wayah$]h&]uh1hhjhhhhhMubeh}(h]linux-plug-and-play-driversah ]h"]linux plug and play driversah$]h&]uh1hhhhhhhhKubeh}(h]!linux-plug-and-play-documentationah ]h"]!linux plug and play documentationah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj) error_encodingUTF-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confapep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacefile_insertion_enabled raw_enabledKline_length_limitM'syntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_link embed_imagesenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j j jcj`jgjdjjjjj_j\jjjjjjjjjju nametypes}(j NjcNjgNjNjNj_NjNjNjNjNjNuh}(j hj`j?jdjfjjjjj\jjjjjjjjjj'jju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]hsystem_message)}(hhh]h)}(h:Enumerated list start value not ordinal-1: "3" (ordinal 3)h]h>Enumerated list start value not ordinal-1: “3” (ordinal 3)}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1j hjhhhhhKMubatransform_messages] transformerN include_log] decorationNhhub.