Re: [PATCH] Explicitly disable BT radio using rfkill interface onsuspend
From: Alan Stern
Date: Wed May 20 2009 - 10:17:37 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/