Re: uDev - multiple of same device

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

 



Hi Chris,

> I've noted that the 7-port hub I am using to connect everything is
> simply 2 4-port hubs chained together. As such, I am able to use the
> LEVEL= directive to distinguish between the ports on the first hub vs.
> the second hub. However, using udevinfo, I have not found a unique and
> constant SYSFS attribute that allows further granularity.

$ udevinfo --attribute-walk --name=/dev/input/mouse1  | grep phys
    ATTRS{phys}=="usb-0000:00:1a.7-3.2.4/input0"

That's the physical address for the device.  The 3.2.4 indicates
that you're on port 3 of the root hub, then port 2 of the first hub,
and port 4 of the second hub.

You could also just use the existing /dev/input/by-path links, which
are similar.

> I know that
> I can get port information from /proc/bus/usb/devices, but I still run
> into the problem of not having
> a SYSFS attribute (or some other uDev directive) to cross reference
> with that information.

If you want info from /proc/bus/usb/devices, you could have udev run a
script and have that script output variables that udev can use for
matching.

-jim
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux