	USB Manager(usbmgr) 0.3.5

					Shuu Yamaguchi <shuu@wonder.ne.jp>

The usbmgr loads kernel modules according to configuration info in 
usbmgr.conf when USB devices connect into USB HUB.

[Require]
	* Requirement for kernel USB support configuration.
		- USB support
		- Preliminary USB device filesystem
		- kernel modules you need
	* Others
		- To add the configuration of your USB devices to usbmgr.conf.

	If all USB option you want is built in, usbmgr has no job.
	"Preliminary USB device filesystem" can't be a module. So make it
	and build into the kernel.

[Binaries]
	* usbmgr
	    Daemon to load/unload some modules
	* dump_usbdev
	    Command to give hints of configuration for connected USB devices
	* update_usbdb
	    Command to update the data which usbmgr uses.

[How to build]
	1) build the binaries from sources.
		$ make

[How to install]
	1) Become root user
		$ su
	2) Install files 
		# make install
	3) If you'd like to use a USB mouse on X,
		you should install preload.conf.
		# make use_mouse
	4) If you use RedHat distribution, you should 'make redhat'.
	   This command install rc-script for RedHat to your system.
		# make redhat
	   Also if you don't run above command, a general rc-script has
	   already been installed. So there is no ploblem. 

[How to run]
	Here is the RC script file "rcscript" for RedHat and compatible
	distribution.
	If the directory "/etc/rc.d/init.d" exists,"make install" copies
	"rcscript" into "/etc/rc.d/init.d/usbmgr" and link to
	"/etc/rc.d/rc5.d/S46usbmgr".
	So, the user "root" execute "/etc/rc.d/init.d/usbmgr start" or
	you should reboot your machine.
	When you use the another distribution,you can modify "rcscript".

[How to write usbmgr.conf]
	* The comment starts with '#' character, and ends with '\n'.
	* The separator is one or more <space> or <tab> characters.
	* An argument is put after keyword. 
	* Two and more arguments are continued with ","(comma).

    <keyword>
    	"host" <host-controller>
		When USB host controller is module, it is specified 
		after "host". You can select one of "usb-uhci" , "usb-ohci"
		or "uhci".
	"vendor" <vendor-id>
		<vendor-id> is specified the vendor ID of USB device.

	"procuct" <product-id>
		<product-id> is specified the product ID of USB device.

	"class" <class-id>
		<class-id> is specified the class ID of USB device.

	"subclass" <subclass-id>
		<subclass-id> is specified the subclass ID of USB device.

	"protocol" <protocol-id>
		<protocol-id> is specified the protocol ID of USB device.

	"module" <module_name> [, <module_name> [...]]
		<module_name> is specified the kernel module name. 
		If there are two and more modules , <module_name> is added
		after ","(comma). 
		If "none" as <module_name> is specified , the usbmgr 
		loads nothing.
		"module" keyword must be specified as the last keyword in
		a configuration.

	"script" <script_name>
		<script_name> is specified the script name.
		<script_name> is executed after modules are loaded or removed.
		When modules are loaded, <script_name> is executed with the
		first argument "start". Also when modules are removed, 
		<script_name> is executed with the first argument "stop".

	ex) In the case of Let's Note mini(CF-M32)
-------------------------------------------------------------
host usb-uhci
vendor 0x056a product 0x0010 module evdev , mousedev , wacom
vendor 0x056e product 0x0004 module hid , mousedev
class 9 module none
-------------------------------------------------------------
	1st:The kind of Chipset is Intel PIIX4,so "usb-uhci" is specified as
		USB controller(UHCI).
	2nd:It is "Graphire" which made by Wacom. In Japan it's called "FAVO".
	3rd:It is "Cypress USB Mouse" which made by Cypress Sem.
	4th:The class 9 means that no module is loaded.

[How to write usbmgr.conf using dump_usbdev]
	Here is the command "dump_usbdev" to support writing usbmgr.conf.
	Please type "dump_usbdev" after executing "usbmgr".
	If you connect USB devices into USB HUB,you'll see link following.

-------------------------------------------------------------
class 0x9 subclass 0x0 protocol 0x0 module <module_name>
-------------------------------------------------------------

	"class 0x9" means USB HUB. If USB devices do not be connected,
	only root HUB is appeared. If you could modify "<module_name>",
	a configuration about this device(HUB) would be completed.
	In the case HUB, you should change "<module_name>" to "none",
	because the HUB driver is included in usbcore.

	Next,after a USB mouse is connected into HUB, run "dump_usbdev".
	The command said following.
-------------------------------------------------------------
class 0x9 subclass 0x0 protocol 0x0 module <module_name>
vendor 0x56e product 0x4 module <module_name>
-------------------------------------------------------------
	The 2nd line is new output. This is the infomation about the USB 
	mouse. The USB mouse requires the "hid" and "mousedev" drivers.
	So, "<module>" should be changed into "hid , mousedev".

	After all,the usbmgr.conf is this.
-------------------------------------------------------------
class 0x9 subclass 0x0 protocol 0x0 module none
vendor 0x56e product 0x4 module hid , mousedev
-------------------------------------------------------------

	You should copy this into /etc/usbmgr/usbmgr.conf,
	and then run update_usbdb to create the configuration data.

If you have any problems, please let me know by E-mail.
