linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH 2/2] hid2hci: when recovering from S3 use parent devpath
Date: Wed, 05 Aug 2009 07:47:59 +0000	[thread overview]
Message-ID: <1249458479.17415.5.camel@yio.site> (raw)
In-Reply-To: <4A6E19FF.5070207@dell.com>

On Fri, Jul 31, 2009 at 21:35, Mario Limonciello<mario_limonciello@dell.com> wrote:

> The problem is that the device is already gone (and not in the udev
> database) by the time you call the command.

I guess, we can get rid of all these hacks and the search code, by
tagging the mouse device we need to find, with:
..., ENV{HID2HCI_SWITCH}="1", RUN+="hid2hci --methodfill --devpath=%p"

and for the bluetooth device we just let it trigger the
tagged mouse device when it goes away, with:
..., ENV{REMOVE_CMD}="/sbin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1"

That way the disappearing bluetooth device would just cause
a "change" event at the mouse device, which would trigger
the original rule again.
It would not need any further search logic, and the resume case
would run the same rules as the plug-in case.

Kay

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2009-08-05  7:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-27 21:19 [PATCH 2/2] hid2hci: when recovering from S3 use parent devpath Mario Limonciello
2009-07-27 21:35 ` Marcel Holtmann
2009-07-27 22:36 ` Mario Limonciello
2009-07-27 22:42 ` Marcel Holtmann
2009-07-28  0:04 ` Kay Sievers
2009-07-28 18:10 ` Mario Limonciello
2009-07-31 18:53 ` Kay Sievers
2009-07-31 19:35 ` Mario Limonciello
2009-08-05  7:47 ` Kay Sievers [this message]
2009-08-06 22:03 ` Mario Limonciello
2009-08-07  0:27 ` Kay Sievers
2009-08-07  0:44 ` Marcel Holtmann
2009-08-07  0:57 ` Kay Sievers
2009-08-07  1:28 ` Marco d'Itri
2009-08-07  1:47 ` Kay Sievers
2009-08-07  3:48 ` Marco d'Itri
2009-08-11 17:49 ` Karl O. Pinc
2009-08-11 22:22 ` 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=1249458479.17415.5.camel@yio.site \
    --to=kay.sievers@vrfy.org \
    --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).