linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sjoerd Simons <sjoerd@luon.net>
To: linux-hotplug@vger.kernel.org
Subject: [patch] re-trigger hid2hci switching for logitech devices
Date: Tue, 23 Mar 2010 23:48:18 +0000	[thread overview]
Message-ID: <20100323234818.GA13684@night.luon.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

Hey,

  Logitech usb bluetooth dongles that have a HID mode need to be retriggered
  into HCI mode after S3 just like Dell ones otherwise they'll just disappear
  and my bluetooth stops working :/

  See attached patch for a potential fix.

  Sjoerd
-- 
Death is God's way of telling you not to be such a wise guy.

[-- Attachment #2: 0001-hid2hci-re-trigger-switching-for-logitech-devices-af.patch --]
[-- Type: text/x-diff, Size: 1938 bytes --]

From 95c18dd070e00a3a641b70fbedcbccb878e817ad Mon Sep 17 00:00:00 2001
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Date: Tue, 23 Mar 2010 23:31:38 +0000
Subject: [PATCH] hid2hci: re-trigger switching for logitech devices after S3

When going to S3 logitech usb dongles will loose their bluetooth interface, so
the switch needs to be retriggered afterwards in the same way that's needed for
Dell devices.
---
 extras/hid2hci/70-hid2hci.rules |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/extras/hid2hci/70-hid2hci.rules b/extras/hid2hci/70-hid2hci.rules
index 01ff30d..8150419 100644
--- a/extras/hid2hci/70-hid2hci.rules
+++ b/extras/hid2hci/70-hid2hci.rules
@@ -12,14 +12,15 @@ ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProt
 
 # Logitech devices
 KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \
-  RUN+="hid2hci --method=logitech-hid --devpath=%p"
+  RUN+="hid2hci --method=logitech-hid --devpath=%p", ENV{HID2HCI_SWITCH}="1"
 
 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", \
+# When a Dell device recovers from S3 or a logitech usb dongle is connected
+# during 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|046d", \
   ENV{REMOVE_CMD}="/sbin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1"
 
 # CSR devices
-- 
1.7.0.3


             reply	other threads:[~2010-03-23 23:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 23:48 Sjoerd Simons [this message]
2010-03-24  5:10 ` [patch] re-trigger hid2hci switching for logitech devices Kay Sievers
2010-03-24  8:00 ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100323234818.GA13684@night.luon.net \
    --to=sjoerd@luon.net \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).