Re: [PATCHv2 09/10] rfkill: Userspace control for airplane mode
From: Johannes Berg
Date: Tue Feb 23 2016 - 15:55:27 EST
On Tue, 2016-02-23 at 21:45 +0100, Pavel Machek wrote:
> So... you add LED trigger to display the state of the airplane
> mode. Ok, why not.
Yes. However, consider that "the airplane mode" isn't a well-defined
concept; some systems may want to light up that LED even when wifi is
still enabled, since you're nowadays quite likely to be allowed to use
wifi (but not enable e.g. LTE) while in-flight.
> But now you add an way to override it? Why? If someone wants to
> change
> the led state, he can just change trigger to none, and then control
> the LED manually...
Yes, but now you've forced every application that wants to deal with
this to know about every single LED that might be used with this
trigger... that won't work for some generic userland tool that might
want to implement an "airplane-mode policy".
> BTW what happens when the device contains both radios controlled by
> kernel (wifi, bluetooth) and radios controlled by userspace (GSM
> modem)?
You'd better have the userspace to control the LED :)
johannes