lkml.org 
[lkml]   [2009]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Explicitly disable BT radio using rfkill interface on suspend
On Wed, 20 May 2009, Oliver Neukum wrote:

> > Here's another question: Since there is a udev removal event for the
> > radio device, why not add a udev rule to switch back to HID+bluetooth
> > mode every time that event occurs?
>
> 1. You'd have two rules doing the same thing (resume & addition)

That's okay. Inelegant, perhaps, but workable. Besides, as we see
below, the new rule would have to do more than the old rule.

> 2. It is unclean, as the removal event doesn't tell you which device to run
> hid2hci on

I'm sure you could figure it out from the sysfs paths.

> 3. The device might really be physically removed

True. So you'd want to delay for a second or so before trying to do
the switch and check whether the device is still attached.

> 4. You can intentionally run hid2hci to switch back to HID

Does that create the same removal event? If it does then you wouldd be
in an unfortunate state. The script would have to check somehow
whether the removal was deliberate or spontaneous.

> PS: Why, oh why don't people use configurations as they were designed?

I can't answer that. :-)

Alan Stern



\
 
 \ /
  Last update: 2009-05-20 16:21    [W:0.079 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site