Command Line Configuration
--------------------------
Finding the current configuration of a device can be done by typing:
(echo r <devid> >&5; cat <&5) 5<>/proc/pnpconf
at the command line.

(Where <devid> is a device ID such as PNP0401 or CTL0031 taken from the
/proc/pnp list, or it can be "@<card-num><device-num>" as show on
/proc/pnp). Note that not all devices will necessarily have any configurtation
to speak of, or may not have an adjustable configuration.

Finding the possible configuration of a device can be done by typing:
(echo q <devid> >&5; cat <&5) 5<>/proc/pnpconf

Activating a device can be done by:
echo a <devid> 1 >/proc/pnpconf

and deactivating by:
echo a <devid> 0 >/proc/pnpconf

Configuring a device can be done by:
echo w <devid> [<arg> <arg> <arg> ....] >/proc/pnpconf
or:
(echo w <devid> [<arg> <arg> <arg> ....] >&5; cat <&5) 5<>/proc/pnpconf
where <arg> is one of:
	irq[n]=num[t]		set irq [n] to hex num (0 is off)
				t is one of EeLl indicating hi/lo edge/level
	dma[n]=chan		set dma [n] to hex chan (4 is off)
	io[n]=base		set ioport [n] to hex base (0 is off)
	mm[n]=base[-top][s]	set memory range to hex base and maybe hex top
				s is one of swl indicating 8/16/32-bit
	force			request the kernel's allocated resource lists
				be ignored

Any arguments that are given constrain the potential configuration to those
values, and any not given, give the pnp code free reign over what's chosen. No
args is a viable option, and what's chosen will be what the device thinks is
best.
Note that it may be that no change at all will be made as there isn't a
possible configuration that meets all restraints and doesn't clash with the
kernel. Additionally, the an attached driver might refuse to lock itself or
might reject a configuration.

===============================================================================
Graphical Configuration
-----------------------
Compile up the config tool in ./tools - it should be fairly straight forward
to use, and displays the keypresses required.

===============================================================================
Adding driver support
---------------------
I recommend you look at ./test/sb16pnp.c and ./sound/sound_pnp.c

The main thing is during a reconfiguration, the following happens:

1) pnp tries to lock the driver (which can refuse).
2) pnp deactivates the device and notifies the driver.
3) pnp asks the driver to release its kernel resources (such as IRQs, DMAs).
4) pnp tries any number of configurations, any it decides might be viable are
   presented to the driver for its examination. The driver can return:
	0		OK - use it
	-EAGAIN		try another
	anything else	give up
5) pnp activates the device and notifies the driver.
   (the driver can use pnp_dev_current() to find out the new config).
6) pnp unlocks the driver


