Help with matching a HID device (udev rules troubles)
Juan Jesús Ojeda Croissier
juanje.ojeda at gmail.com
Thu Jul 2 02:40:46 PDT 2009
On Thu, Jul 2, 2009 at 9:14 AM, Richard Hughes<hughsient at gmail.com> wrote:
> I'm trying to fix UPS support in DeviceKit-power. It's basically all
> down to incorrect udev rules. The device I'm trying to match is the
> last one in the chain, i.e. the one with DEVNAME=/dev/usb/hiddev0 :
>
> P: /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1
[...]
> E: DRIVER=usb
[...]
>
> P: /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0
[...]
> E: DRIVER=usbhid
[...]
>
> P: /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0/0003:0463:FFFF.0002
[...]
> E: DRIVER=generic-usb
[...]
>
> P: /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0/0003:0463:FFFF.0002/hidraw/hidraw1
[...]
>
> P: /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0/usb/hiddev0
> N: usb/hiddev0
> S: char/180:96
> E: DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0/usb/hiddev0
> E: MAJOR=180
> E: MINOR=96
> E: DEVNAME=/dev/usb/hiddev0
> E: DEVLINKS=/dev/char/180:96
>
> It's easy to match all devices with something like SUBSYSTEM=="usb",
> ATTRS{idVendor}=="0463", ATTRS{idProduct}=="ffff", but then this
> matches all devices, and I only want the hiddev0 device, not the
> hidraw1 device. Ideas welcome. Thanks.
Hi Richard,
Hummm... doesn't that device has an DRIVER attr? SUBSYSTEM=="usb" plus
DRIVER=="X" could be a good options if it has one.
I don't see the key there but neither I see the id*, so I guess there
are more attrs than it shows.
Well, just an idea.
Greetings
--
Juanje
More information about the devkit-devel
mailing list