Re: Load hid.o module synchronously?

Greg KH
2004-04-26T20:21:29Z

On Mon, Apr 26, 2004 at 03:50:52PM -0400, Patrick J. LoPresti wrote:
>
> I see how I can scan for a USB keyboard after loading the USB host
> controller module. I think. But what do I look for, exactly, to tell
> when hid.o has hooked itself up to the keyboard?

I can think of at least 2 different ways (there are probably more):
- look at the device in /proc/bus/usb/devices and wait until the
driver is bound to that device "(hid)" will show up as the
driver bound to that interface
- look at the sysfs directory for the hid driver and wait for
the symlink to the device shows up. This should be at
/sys/bus/usb/drivers/hid

Hope this helps,

greg k-h