From: Pavel Machek <pavel@ucw.cz>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: rpurdie@rpsys.net, j.anaszewski@samsung.com,
linux-leds@vger.kernel.org,
"João Paulo Rechi Vita" <jprvita@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Darren Hart" <dvhart@infradead.org>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
platform-driver-x86@vger.kernel.org, linux-api@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux@endlessm.com,
"João Paulo Rechi Vita" <jprvita@endlessm.com>
Subject: Re: custom ioctl-based interface to control LED in networking (was Re: [PATCHv2 09/10] rfkill: Userspace control for airplane mode)
Date: Thu, 25 Feb 2016 10:06:36 +0100 [thread overview]
Message-ID: <20160225090636.GA32652@amd> (raw)
In-Reply-To: <1456320693.2050.30.camel@sipsolutions.net>
On Wed 2016-02-24 14:31:33, Johannes Berg wrote:
> On Wed, 2016-02-24 at 13:14 +0100, Pavel Machek wrote:
> >
> > Why would it need to? It could look at default triggers for the led
> > if it really wanted to.
>
> And then it needs to change them; if anything goes wrong error recovery
> is practically impossible since the trigger information is lost
> forever.
Well, conventional way to solve this is to simply name the led
"acer::airplane"... that way it is persistent. We already do that for
display/keyboard backlights.
> It's not my position to decide which combinations some system
> integrator or userspace developer might find useful.
>
> Even when we add parameters to a trigger (I don't see a generic way to
> do that, but please do enlighten me), you're now ignoring the issue of
> the userspace controlled GSM modem...
Take a look at the blinking triggers.
> > > Really what you have here is a concept of "airplane mode", and that
> > > concept is specific to the rfkill subsystem. This happens to affect
> > > mostly an LED trigger, today, but as a concept it's something that
> > > *should* be managed within the rfkill subsystem.
> >
> > How is that concept used outside the LEDs? What semantics does
> > "airplane mode" have? You tried to explain "airplane mode" is not
> > well defined up in this thread...
>
> I'd say it's well-defined for any given set of system software, so if
> e.g. NetworkManager decides to define it one way, and connman another
> way, there's a definition but the kernel need not interfere with it.
So... the LED changes meaning during boot? That's surely not a nice
solution.
So... you rather store bit in a kernel with unclear semantics,
explaining "oh I need to leave the flexibility to userland"? Sorry,
that's just ugly.
> > I'm not saying that. I'm saying that LED maintainers should be Cced,
> > to keep the interfaces consistent.
>
> I pretty much have to read it that way, since the LED API is in no way
> impacted by these changes. Here's a new trigger, with some magic inner
> working. No impact on the LED API.
New LED trigger and new ioctl for LED control... not matching how LEDs
are normally controlled.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
prev parent reply other threads:[~2016-02-25 9:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1456159001-20307-1-git-send-email-jprvita@endlessm.com>
[not found] ` <1456159001-20307-10-git-send-email-jprvita@endlessm.com>
[not found] ` <20160223204525.GC16961@amd>
[not found] ` <1456260914.9910.34.camel@sipsolutions.net>
[not found] ` <20160223214501.GA22501@amd>
[not found] ` <1456304509.2050.15.camel@sipsolutions.net>
2016-02-24 10:46 ` custom ioctl-based interface to control LED in networking (was Re: [PATCHv2 09/10] rfkill: Userspace control for airplane mode) Pavel Machek
2016-02-24 11:01 ` Johannes Berg
2016-02-24 12:14 ` Pavel Machek
2016-02-24 13:31 ` Johannes Berg
2016-02-25 9:06 ` Pavel Machek [this message]
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=20160225090636.GA32652@amd \
--to=pavel@ucw.cz \
--cc=davem@davemloft.net \
--cc=dvhart@infradead.org \
--cc=j.anaszewski@samsung.com \
--cc=johannes@sipsolutions.net \
--cc=jprvita@endlessm.com \
--cc=jprvita@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@endlessm.com \
--cc=netdev@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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).