Writing a rule specific to a USB connector

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

 



Hi all,

Sorry if this offtopic is this list, in such case please point me to
correct location.
I am tring to write a rule that will create a specific char device for
every different USB connector (this is an embeeded application, and
the use case is: "please connect the device to the upper connector").
I am using 173 on 2.6.32/arm.

I have two different USB controllers which can be identified by
ATTRS{serial}=="musb_hdrc" and ATTRS{serial}=="ehci-omap.0"


First try:

KERNEL=="hidraw[0-9]*", ATTRS{serial}=="musb_hdrc", SYMLINK+="aaaaaaaaaa"
KERNEL=="hidraw[0-9]*", ATTRS{idVendor}=="c1ca", SYMLINK+="bbbbbbbbbbb"


OK, works. I see both links generated. Now I need to combine them:

KERNEL=="hidraw[0-9]*", ATTRS{idVendor}=="c1ca",
ATTRS{serial}=="musb_hdrc", SYMLINK+="cccccccccc"
KERNEL=="hidraw[0-9]*", ATTRS{serial}=="musb_hdrc",
ATTRS{idVendor}=="c1ca", SYMLINK+="dddddddddd"


None working. What I think in happening is that the idVendor of the
USB hub is matched and not of the device. I need to match:

ATTR{idVendor}=="c1ca" and some parent has ATTRS{serial}=="musb_hdrc"


What is the golden rule I am missing?

- diego
--
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