tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Set USB device ownership based on vedorid/productid



ef%math.uni-bonn.de@localhost (Edgar =?iso-8859-1?B?RnXf?=) writes:

>> devpubd does that in-tree.
>OK. Is there a sane way of obtaining VendorId/ProductId in the devpub script?

Ideally the USB framework would register such things like it already
registers the (optional) serial number.

For now you need to query the autoconfig tree, deduce the USB bus,
enumerate the USB devices on that bus and match things accordingly.

N.B. even with data being registered, you need knowledge to match
entries in /dev with the drivers that devpubd sees, e.g. that
the driver (unit) ucom0 corresponds to ttyU0 in /dev. For ucom
that's easy but for ugen that's more difficult.

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index