X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=extras%2Fhid2hci%2F70-hid2hci.rules;h=3b36629d4b05fe7f33669b8f9f4d2e2b80e3ede4;hp=caf9120f535dd30894941f1ac3f16d56e4bc4762;hb=d5d6a7f3040992f853eb23eb1bafac3b77891c2d;hpb=b53c3a21b9992915f89624f60e85fe50b7aad4ad;ds=sidebyside diff --git a/extras/hid2hci/70-hid2hci.rules b/extras/hid2hci/70-hid2hci.rules index caf9120f5..3b36629d4 100644 --- a/extras/hid2hci/70-hid2hci.rules +++ b/extras/hid2hci/70-hid2hci.rules @@ -1,25 +1,30 @@ # do not edit this file, it will be overwritten on update -ACTION!="add", GOTO="hid2hci_end" +ACTION=="remove", GOTO="hid2hci_end" SUBSYSTEM!="usb", GOTO="hid2hci_end" -# Variety of Dell Bluetooth devices - it looks like a bit of an odd rule, -# because it is matching on a mouse device that is self powered, but that -# is where a HID report needs to be sent to switch modes. -# +# Variety of Dell Bluetooth devices - match on a mouse device that is +# self powered and where a HID report needs to be sent to switch modes # Known supported devices: 413c:8154, 413c:8158, 413c:8162 -ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProtocol}=="02", ATTRS{bDeviceClass}=="00", ATTRS{idVendor}=="413c", ATTRS{bmAttributes}=="e0", \ - RUN+="hid2hci --method dell -v $attr{idVendor} -p $attr{idProduct} --mode hci" +ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProtocol}=="02", \ + ATTRS{bDeviceClass}=="00", ATTRS{idVendor}=="413c", ATTRS{bmAttributes}=="e0", \ + RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_SWITCH}="1" + +# Logitech devices +KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[35e]", \ + RUN+="hid2hci --method=logitech-hid --devpath=%p" +KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[4abc]|c71[34bc]", \ + RUN+="hid2hci --method=logitech-hid --devpath=%p" ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end" -# Logitech devices -ATTR{idVendor}=="046d", ATTR{idProduct}=="c70[345abce]", RUN+="hid2hci --method logitech -v $attr{idVendor} -p $attr{idProduct} --mode hci" -ATTR{idVendor}=="046d", ATTR{idProduct}=="c71[34bc]", RUN+="hid2hci --method logitech -v $attr{idVendor} -p $attr{idProduct} --mode hci" +# When a Dell device recovers from S3, the mouse child needs to be repoked +# Unfortunately the only event seen is the BT device disappearing, so the mouse +# device needs to be chased down on the USB bus. +ATTR{bDeviceClass}=="e0", ATTR{bDeviceSubClass}=="01", ATTR{bDeviceProtocol}=="01", ATTR{idVendor}=="413c", \ + ENV{REMOVE_CMD}="/sbin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1" -# CSR devices (in HID mode) -ATTR{idVendor}=="0a12", ATTR{idProduct}=="1000", RUN+="hid2hci --method csr -v $attr{idVendor} -p $attr{idProduct} --mode hci" -ATTR{idVendor}=="0458", ATTR{idProduct}=="1000", RUN+="hid2hci --method csr -v $attr{idVendor} -p $attr{idProduct} --mode hci" -ATTR{idVendor}=="05ac", ATTR{idProduct}=="1000", RUN+="hid2hci --method csr -v $attr{idVendor} -p $attr{idProduct} --mode hci" +# CSR devices +ATTR{idVendor}=="0a12|0458|05ac", ATTR{idProduct}=="1000", RUN+="hid2hci --method=csr --devpath=%p" LABEL="hid2hci_end"