Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1420990 > unrolled thread

Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger

Started byJoão Paulo Rechi Vita <jprvita@gmail.com>
First post2016-06-13 17:30 +0200
Last post2016-06-21 11:40 +0200
Articles 7 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger João Paulo Rechi Vita <jprvita@gmail.com> - 2016-06-13 17:30 +0200
    Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED  trigger Pavel Machek <pavel@ucw.cz> - 2016-06-13 21:10 +0200
      Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger João Paulo Rechi Vita <jprvita@gmail.com> - 2016-06-13 22:10 +0200
        Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED  trigger Pavel Machek <pavel@ucw.cz> - 2016-06-13 23:10 +0200
          Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger João Paulo Rechi Vita <jprvita@gmail.com> - 2016-06-13 23:20 +0200
            Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED  trigger Pavel Machek <pavel@ucw.cz> - 2016-06-13 23:30 +0200
              Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED  trigger Johannes Berg <johannes@sipsolutions.net> - 2016-06-21 11:40 +0200

#1420990 — Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger

FromJoão Paulo Rechi Vita <jprvita@gmail.com>
Date2016-06-13 17:30 +0200
SubjectRe: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger
Message-ID<rJBYm-86X-15@gated-at.bofh.it>
On 9 June 2016 at 08:43, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Thu, 2016-05-19 at 09:16 +0200, Pavel Machek wrote:
>

(...)

>> LED
>> subsystem seems to use suffix of LED name to do that. So if we
>> standartize, lets say "::rfkill" suffix for this, it should work and
>> follow existing practice.
> [...]
>> There is one -- suffix in the LED name.
>
> I don't really think that's a good way, and it doesn't seem to be used
> universally, but I suppose it's good enough.
>

The main practical drawback of this approach IMO is that we can't
guarantee that userspace processes will not step on each other's toes
trying to control the LED concurrently. But I guess that is something
that userspace will have to solve for now, I rather get this moving
without the trigger than not moving at all.

> João, that means you should send a patch to add the ::rfkill suffix.
>

IMO "airplane" (or maybe "airplane-mode") is a better suffix, as it
reflects the label on the machine's chassis. I'll name it
"asus-wireless::airplane" and send this through platform-drivers-x86,
as this is now contained in the platform-drivers-x86 subsystem. Thanks
Johannes for your patience and help designing and reviewing the rfkill
changes, even if not all of them made it through in the end. And
thanks everyone else involved for the feedback.

Best regards,

--
João Paulo Rechi Vita
http://about.me/jprvita

[toc] | [next] | [standalone]


#1421212 — Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger

FromPavel Machek <pavel@ucw.cz>
Date2016-06-13 21:10 +0200
SubjectRe: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger
Message-ID<rJFph-22H-75@gated-at.bofh.it>
In reply to#1420990
Hi!

> > João, that means you should send a patch to add the ::rfkill suffix.
> >
> 
> IMO "airplane" (or maybe "airplane-mode") is a better suffix, as it
> reflects the label on the machine's chassis. I'll name it
> "asus-wireless::airplane" and send this through platform-drivers-x86,
> as this is now contained in the platform-drivers-x86 subsystem. Thanks
> Johannes for your patience and help designing and reviewing the rfkill
> changes, even if not all of them made it through in the end. And
> thanks everyone else involved for the feedback.

Actually, I'd do '::rfkill', for consistency with other places in
/sys.

/sys/devices/platform/thinkpad_acpi/rfkill/rfkill1/name
/sys/class/rfkill
/sys/module/rfkill

Thanks for patience,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[toc] | [prev] | [next] | [standalone]


#1421279

FromJoão Paulo Rechi Vita <jprvita@gmail.com>
Date2016-06-13 22:10 +0200
Message-ID<rJGlj-2Gd-13@gated-at.bofh.it>
In reply to#1421212
On 13 June 2016 at 15:00, Pavel Machek <pavel@ucw.cz> wrote:
> Hi!
>
>> > João, that means you should send a patch to add the ::rfkill suffix.
>> >
>>
>> IMO "airplane" (or maybe "airplane-mode") is a better suffix, as it
>> reflects the label on the machine's chassis. I'll name it
>> "asus-wireless::airplane" and send this through platform-drivers-x86,
>> as this is now contained in the platform-drivers-x86 subsystem. Thanks
>> Johannes for your patience and help designing and reviewing the rfkill
>> changes, even if not all of them made it through in the end. And
>> thanks everyone else involved for the feedback.
>
> Actually, I'd do '::rfkill', for consistency with other places in
> /sys.
>
> /sys/devices/platform/thinkpad_acpi/rfkill/rfkill1/name
> /sys/class/rfkill
> /sys/module/rfkill
>

If we use "rfkill" as a suffix, how do you expect userspace to be able
to differentiate between a LED that indicates airplane-mode (LED ON
when all radios are OFF) and a LED that indicates the state of a
specific radio like WiFi or Bluetooth (LED ON when that specific radio
is ON)? If we're going this route we should provide meaningful
information here.

--
João Paulo Rechi Vita
http://about.me/jprvita

[toc] | [prev] | [next] | [standalone]


#1421327 — Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger

FromPavel Machek <pavel@ucw.cz>
Date2016-06-13 23:10 +0200
SubjectRe: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger
Message-ID<rJHhn-3ij-3@gated-at.bofh.it>
In reply to#1421279
On Mon 2016-06-13 15:59:35, João Paulo Rechi Vita wrote:
> On 13 June 2016 at 15:00, Pavel Machek <pavel@ucw.cz> wrote:
> > Hi!
> >
> >> > João, that means you should send a patch to add the ::rfkill suffix.
> >> >
> >>
> >> IMO "airplane" (or maybe "airplane-mode") is a better suffix, as it
> >> reflects the label on the machine's chassis. I'll name it
> >> "asus-wireless::airplane" and send this through platform-drivers-x86,
> >> as this is now contained in the platform-drivers-x86 subsystem. Thanks
> >> Johannes for your patience and help designing and reviewing the rfkill
> >> changes, even if not all of them made it through in the end. And
> >> thanks everyone else involved for the feedback.
> >
> > Actually, I'd do '::rfkill', for consistency with other places in
> > /sys.
> >
> > /sys/devices/platform/thinkpad_acpi/rfkill/rfkill1/name
> > /sys/class/rfkill
> > /sys/module/rfkill
> >
> 
> If we use "rfkill" as a suffix, how do you expect userspace to be able
> to differentiate between a LED that indicates airplane-mode (LED ON
> when all radios are OFF) and a LED that indicates the state of a
> specific radio like WiFi or Bluetooth (LED ON when that specific radio
> is ON)? If we're going this route we should provide meaningful
> information here.

'::airplane' has same problem, no?

If you want to distinguish that, maybe you can do '::rfkill' for
everything vs '::rfkill-wifi' for wifi-only and '::rfkill-bt' for
bluetooth...

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[toc] | [prev] | [next] | [standalone]


#1421337

FromJoão Paulo Rechi Vita <jprvita@gmail.com>
Date2016-06-13 23:20 +0200
Message-ID<rJHr3-3m2-17@gated-at.bofh.it>
In reply to#1421327
On 13 June 2016 at 17:01, Pavel Machek <pavel@ucw.cz> wrote:
> On Mon 2016-06-13 15:59:35, João Paulo Rechi Vita wrote:
>> On 13 June 2016 at 15:00, Pavel Machek <pavel@ucw.cz> wrote:
>> > Hi!
>> >
>> >> > João, that means you should send a patch to add the ::rfkill suffix.
>> >> >
>> >>
>> >> IMO "airplane" (or maybe "airplane-mode") is a better suffix, as it
>> >> reflects the label on the machine's chassis. I'll name it
>> >> "asus-wireless::airplane" and send this through platform-drivers-x86,
>> >> as this is now contained in the platform-drivers-x86 subsystem. Thanks
>> >> Johannes for your patience and help designing and reviewing the rfkill
>> >> changes, even if not all of them made it through in the end. And
>> >> thanks everyone else involved for the feedback.
>> >
>> > Actually, I'd do '::rfkill', for consistency with other places in
>> > /sys.
>> >
>> > /sys/devices/platform/thinkpad_acpi/rfkill/rfkill1/name
>> > /sys/class/rfkill
>> > /sys/module/rfkill
>> >
>>
>> If we use "rfkill" as a suffix, how do you expect userspace to be able
>> to differentiate between a LED that indicates airplane-mode (LED ON
>> when all radios are OFF) and a LED that indicates the state of a
>> specific radio like WiFi or Bluetooth (LED ON when that specific radio
>> is ON)? If we're going this route we should provide meaningful
>> information here.
>
> '::airplane' has same problem, no?
>

No, because in this case we would not use "airplane" as a suffix for a
LED associated with an individual radio.

> If you want to distinguish that, maybe you can do '::rfkill' for
> everything vs '::rfkill-wifi' for wifi-only and '::rfkill-bt' for
> bluetooth...
>

The problem here is that the "rfkill" name is already associated with
individual rfkill switches under /sys/class/rfkill,
/sys/devices/platform/*/rfkill etc, so I think we're better off
distinguishing "airplane" vs "wifi" vs "bluetooth" etc, to avoid
confusion.

--
João Paulo Rechi Vita
http://about.me/jprvita

[toc] | [prev] | [next] | [standalone]


#1421350 — Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger

FromPavel Machek <pavel@ucw.cz>
Date2016-06-13 23:30 +0200
SubjectRe: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger
Message-ID<rJHAK-3pk-13@gated-at.bofh.it>
In reply to#1421337
On Mon 2016-06-13 17:10:02, João Paulo Rechi Vita wrote:
> On 13 June 2016 at 17:01, Pavel Machek <pavel@ucw.cz> wrote:
> > On Mon 2016-06-13 15:59:35, João Paulo Rechi Vita wrote:
> >> On 13 June 2016 at 15:00, Pavel Machek <pavel@ucw.cz> wrote:
> >> > Hi!
> >> >
> >> >> > João, that means you should send a patch to add the ::rfkill suffix.
> >> >> >
> >> >>
> >> >> IMO "airplane" (or maybe "airplane-mode") is a better suffix, as it
> >> >> reflects the label on the machine's chassis. I'll name it
> >> >> "asus-wireless::airplane" and send this through platform-drivers-x86,
> >> >> as this is now contained in the platform-drivers-x86 subsystem. Thanks
> >> >> Johannes for your patience and help designing and reviewing the rfkill
> >> >> changes, even if not all of them made it through in the end. And
> >> >> thanks everyone else involved for the feedback.
> >> >
> >> > Actually, I'd do '::rfkill', for consistency with other places in
> >> > /sys.
> >> >
> >> > /sys/devices/platform/thinkpad_acpi/rfkill/rfkill1/name
> >> > /sys/class/rfkill
> >> > /sys/module/rfkill
> >> >
> >>
> >> If we use "rfkill" as a suffix, how do you expect userspace to be able
> >> to differentiate between a LED that indicates airplane-mode (LED ON
> >> when all radios are OFF) and a LED that indicates the state of a
> >> specific radio like WiFi or Bluetooth (LED ON when that specific radio
> >> is ON)? If we're going this route we should provide meaningful
> >> information here.
> >
> > '::airplane' has same problem, no?
> >
> 
> No, because in this case we would not use "airplane" as a suffix for a
> LED associated with an individual radio.
> 
> > If you want to distinguish that, maybe you can do '::rfkill' for
> > everything vs '::rfkill-wifi' for wifi-only and '::rfkill-bt' for
> > bluetooth...
> >
> 
> The problem here is that the "rfkill" name is already associated with
> individual rfkill switches under /sys/class/rfkill,
> /sys/devices/platform/*/rfkill etc, so I think we're better off
> distinguishing "airplane" vs "wifi" vs "bluetooth" etc, to avoid
> confusion.

(Actually, "::wifi" is super confusing, I'd expect that to be a led
that blinks when wifi is active.)

Well... "airplane" is quite confusing. I'd we use "rfkill" for
disabling radios, and I believe we should stick with that.

But small problem might be polarity. You may need both "::rfkill" and
"::not-rfkill".

Best regards,
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[toc] | [prev] | [next] | [standalone]


#1427513 — Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger

FromJohannes Berg <johannes@sipsolutions.net>
Date2016-06-21 11:40 +0200
SubjectRe: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger
Message-ID<rMqk1-3Wk-5@gated-at.bofh.it>
In reply to#1421350
On Mon, 2016-06-13 at 23:21 +0200, Pavel Machek wrote:
> 
> (Actually, "::wifi" is super confusing, I'd expect that to be a led
> that blinks when wifi is active.)

Agree with that, yeah, that'd be confusing.

> Well... "airplane" is quite confusing. I'd we use "rfkill" for
> disabling radios, and I believe we should stick with that.
> 
> But small problem might be polarity. You may need both "::rfkill" and
> "::not-rfkill".

I'd argue that "airplane" matches better what you're likely to find on
the chassis of the system.

In either case I think the suffixes should be documented, for both
future kernel and application developers.

johannes

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web