Find Vendor/Product ID from uhid device

Martin Laabs mailinglists at
Sat Mar 20 19:52:43 UTC 2010


I'am currently porting the linux-js joystick driver to the new USB stack. 
Since this driver operates on top other drivers (in the case of USB ontop 
the uhid driver) it needs to figure out whether /dev/uhid* is a device it 
can operate on.
The driver scans all /dev/uhidX entries and compares the vendor and product 
id against a table. In the old stack this was possible through scanning all 
/dev/ugenX devices, get the device_info struct and compare the 
udi_devnames[] against the "uhidX" string.
However - the udi_devname string disappeared in the new usb stack and this 
way seems to be not open anymore for me.
Can you give me a hint how to figure the vendor and product id of a 
/dev/uhidX device.

Thank you,
  Martin Laabs

More information about the freebsd-usb mailing list