netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Marcel Holtmann" <marcel@holtmann.org>,
	"João Paulo Rechi Vita" <jprvita@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"Network Development" <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"João Paulo Rechi Vita" <jprvita@endlessm.com>
Subject: Re: [PATCH] net/rfkill: Create "airplane mode" LED trigger
Date: Wed, 06 Jan 2016 11:31:59 +0100	[thread overview]
Message-ID: <1452076319.2541.3.camel@sipsolutions.net> (raw)
In-Reply-To: <6DC3AA8C-DDE9-44B8-91C5-94B1EB0DBE9A@holtmann.org>

On Tue, 2016-01-05 at 22:55 -0800, Marcel Holtmann wrote:
> 
> so I am not convinced the kernel should have the concept of airplane
> mode at all.

[snip long story]

This is true, but that doesn't mean the patch is bad, just the naming
could be different.

I think the patch could name this "rfkill-all" (or so) instead, and
replace all the "airplane_mode" identifiers as well.

Then the driver can still default to "rfkill-all" trigger, or a
suitably interested userspace could remove the trigger and manage the
LED state itself.

Then again - if I think about that more - perhaps the kernel *should*
have a concept of airplane mode, just one that's not necessarily tied
to the "rfkill_all" setting, but could be controlled by userspace. That
way, userspace wouldn't have to know about the LED, just about the
airplane mode indicator (for which rfkill would probably be an
appropriate place)

Two comments on the patch itself:

> +#ifdef CONFIG_RFKILL_LEDS
> +       led_trigger_register(&amp;airplane_mode_led_trigger);
> +#endif

Everything else uses inlines to avoid ifdefs, you can do the same here.
Also, error handling seems necessary.

johannes

  reply	other threads:[~2016-01-06 10:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-26 15:05 [PATCH] RFKill airplane mode LED trigger João Paulo Rechi Vita
     [not found] ` <1451142303-1872-1-git-send-email-jprvita-6IF/jdPJHihWk0Htik3J/w@public.gmane.org>
2015-12-26 15:05   ` [PATCH] net/rfkill: Create "airplane mode" " João Paulo Rechi Vita
     [not found]     ` <1451142303-1872-2-git-send-email-jprvita-6IF/jdPJHihWk0Htik3J/w@public.gmane.org>
2016-01-06  2:22       ` João Paulo Rechi Vita
2016-01-06  6:55     ` Marcel Holtmann
2016-01-06 10:31       ` Johannes Berg [this message]
2016-01-07 16:19         ` João Paulo Rechi Vita
2016-01-07 21:01           ` Johannes Berg
2016-01-15 15:04             ` João Paulo Rechi Vita
2016-01-19 20:08               ` Johannes Berg
2016-01-19 20:27                 ` João Paulo Rechi Vita

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=1452076319.2541.3.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=davem@davemloft.net \
    --cc=jprvita@endlessm.com \
    --cc=jprvita@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=netdev@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).