1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 23:51:28 +03:00
systemd/extras/hid2hci/70-hid2hci.rules
Martin Pitt ba854cf8c3 Fix hid2hci rules harder
Commit 2b463cb0 changed the rules to match against hiddev* for all devices in
an attempt to fix Debian #567237/LP #444420. However, this caused regressions
with other devices (e. g. LP #550288) and thus was reverted in commit 8b56ba.

Now use hidraw* for the devices where it's confirmed that they only work with
that, and hiddev* for the others.

https://launchpad.net/bugs/444420
2010-06-11 15:14:55 +02:00

31 lines
1.5 KiB
Plaintext

# do not edit this file, it will be overwritten on update
ACTION=="remove", GOTO="hid2hci_end"
SUBSYSTEM!="usb", GOTO="hid2hci_end"
# 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 --devpath=%p", ENV{HID2HCI_SWITCH}="1"
# Logitech devices (hidraw)
KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345bce]|c71[34bc]", \
RUN+="hid2hci --method=logitech-hid --devpath=%p"
KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70a", \
RUN+="hid2hci --method=logitech-hid --devpath=%p"
ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end"
# 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
ATTR{idVendor}=="0a12|0458|05ac", ATTR{idProduct}=="1000", RUN+="hid2hci --method=csr --devpath=%p"
LABEL="hid2hci_end"