From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Thu, 21 Nov 2002 01:50:51 +0000 Subject: Re: Want to use hotplug Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Karl F. Larsen wrote: > I'm working on documentation for installing a scanner in Linux > and now that almost all scanners are USB port users we now need to load > the scanner module and two hex numbers to the kernel as we boot up. I am > doing it with insmod and /etc/modules.conf. > > I'm told hotplug is easier and better, but I don't know how to > do it.Hmm, let's see. There are two basic ways you might be working: - kernel driver. /etc/modules.conf would have the product and vendor ids as module parameters. - user mode driver. how do those get set up? (this seems to be the direction for future scanner support.) In both cases you'd likely create /etc/hotplug/usb/scanner.usermap to list the product and vendor ID for the scanners you're interested in. The 2.5 kernel driver doesn't have a MODULE_DEVICE_TABLE in the driver, which complicates things especially if you've got more than one kind of scanner But presumably you know how to deal with that issue if you're documenting current practice. I'd basically expect some /etc/hotplug/usb/scanner shell script to do whatever magic is needed to let the user mode code know about the scanner. It might use the $REMOVER mechanism, which you'll see in /etc/hotplug/usb.agent, and ensure that specific usbfs device ($DEVICE) is accessible (chown/chmod) and published (symlink killed by $REMOVER?) to the user mode driver. You can see http://linux-hotplug.sourceforge.net/?selected=usb for background, some of which may help you. - Dave ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel