Hello Richard, Richard Hughes [2009-07-02 9:14 +0100]: > 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 : > 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.
Could you please send the output of udevadm info --attribute-walk --name=/dev/usb/hiddev0 ? This would allow us to look for a better match, and is easier for constructing rules than a DB dump. With the available data my guess is: ---------------- 8< ---------------- ACTION!="add", GOTO="ups_end" # drop this if you need change events, too SUBSYSTEM!="usb", GOTO="ups_end" KERNEL!="hiddev*", GOTO="ups_end" ATTRS{idVendor}=="0463", ATTRS{idProduct}=="ffff", [... your action here ... ] [... similar idVendor/idProduct rules ...] LABEL="ups_end" ---------------- 8< ---------------- If the SUBSYSTEM!="usb" doesn't work (i. e. the hiddev device itself doesn't have SUBSYSTEM, just one of the parents), replace it with SUBSYSTEMS=="usb", GOTO="ups_start" GOTO="ups_end" LABEL="ups_start" HTH, Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
signature.asc
Description: Digital signature
_______________________________________________ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel