mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: "Ivo van Doorn" <ivdoorn@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	"John Linville" <linville@tuxdriver.com>,
	"Jiri Benc" <jbenc@suse.cz>,
	"Lennart Poettering" <lennart@poettering.net>,
	"Johannes Berg" <johannes@sipsolutions.net>,
	"Larry Finger" <Larry.Finger@lwfinger.net>
Subject: Re: [RFC] rfkill - Add support for input key to control wireless radio
Date: Mon, 4 Dec 2006 17:15:09 -0500	[thread overview]
Message-ID: <d120d5000612041415r2f471e78s4feb86d22b7706d5@mail.gmail.com> (raw)
In-Reply-To: <200612031936.34343.IvDoorn@gmail.com>

On 12/3/06, Ivo van Doorn <ivdoorn@gmail.com> wrote:
> Hi,
>
> This patch is a resend of a patch I has been send to the linux kernel
> and netdev list earlier. The most recent version of a few weeks back
> didn't compile since I missed 1 line in my patch that changed
> include/linux/input.h.
>
> This patch will offer the handling of radiokeys on a laptop.
> Such keys often control the wireless devices on the radio
> like the wifi, bluetooth and irda.
>
> The rfkill works as follows, when the user presses the hardware key
> to control the wireless (wifi, bluetooth or irda) radio a signal will
> go to rfkill. This happens by the hardware driver sending a signal
> to rfkill, or rfkill polling for the button status.
> The key signal will then be processed by rfkill, each key will have
> its own input device, if this input device has not been openened
> by the user, rfkill will keep the signal and either turn the radio
> on or off based on the key status.
> If the input device has been opened, rfkill will send the signal to
> userspace and do nothing further. The user is in charge of controlling
> the radio.
>
> This driver (if accepted and applied) will be usefull for the rt2x00 drivers
> (rt2400pci, rt2500pci, rt2500usb, rt61pci and rt73usb) in the wireless-dev
> tree and the MSI laptop driver from Lennart Poettering in the main
> linux kernel tree.
>
> Before this patch can be applied to any tree, I first wish to hear
> if the patch is acceptable. Since the previous time it was send I have made
> several fixes based on the feedback like adding the sysfs entries for
> reading the status.
>

Hi Ivo,

I apologize for not responding to your post earlier, it was a busy week.

I am still not sure that tight coupling of input device with rfkill
structure is such a good idea. Quite often the button is separated
from the device itself and radio control is done via BIOS SMM (see
wistron driver) or there is no special button at all and users might
want to assign one of their standard keyboard buttons to be an RF
switch.

I think it would be better if there was an rfkill class listing all
controlled devices (preferrably grouped by their type - WiFi, BT,
IRDA, etc) and if every group would provide an attribute allowing to
control state of the whole group (do we realistically need to kill
just one interface? Wouldn't ifconfig be suitable for that?). The
attribute should be a tri-state on/off/auto, "auto" meaning the driver
itself manages radio state. This would avoid another tacky IMHO point
that in your implementation mere opening of an input device takes over
RF driver. Explicit control allow applications "snoop" RF state
without disturbing it.

If there are concerns that drivers will have to re-implement most of
the button handling you are still free to create a simple
implementation of polled RF button (I don't think that interrupt
driver RF buttons would share alot of code) so that users would only
need to implement a polling function.

-- 
Dmitry

  parent reply	other threads:[~2006-12-04 22:15 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-03 18:36 Ivo van Doorn
2006-12-03 19:18 ` Arjan van de Ven
2006-12-03 22:03   ` Ivo van Doorn
2006-12-03 19:20 ` Arjan van de Ven
2006-12-03 22:05   ` Ivo van Doorn
2006-12-03 22:28   ` Ivo van Doorn
2006-12-05  0:18     ` Randy Dunlap
2006-12-05 21:20       ` Ivo van Doorn
2006-12-03 19:44 ` Dan Williams
2006-12-03 22:16   ` Ivo van Doorn
2006-12-04  8:53   ` Marcel Holtmann
2006-12-04 22:15 ` Dmitry Torokhov [this message]
2006-12-04 23:27   ` Ivo van Doorn
2006-12-06 14:37     ` Dmitry Torokhov
2006-12-06 15:18       ` Dan Williams
2006-12-06 15:24         ` Dmitry Torokhov
2006-12-06 19:31       ` Ivo van Doorn
2006-12-06 20:18         ` Dmitry Torokhov
2006-12-06 21:41           ` Ivo van Doorn
2006-12-06 22:04             ` Dmitry Torokhov
2006-12-07 21:53               ` Ivo van Doorn
2006-12-12  5:12                 ` Dmitry Torokhov
2006-12-12  7:47                   ` Ivo Van Doorn
2006-12-17 17:43                   ` Ivo van Doorn
2007-01-30 16:33                     ` Ivo van Doorn
2006-12-07 13:22             ` Dan Williams
2006-12-07 21:58               ` Ivo van Doorn
2006-12-06 22:05           ` Jiri Benc
2006-12-06 22:10             ` Dmitry Torokhov
2006-12-05 10:32 ` Christoph Hellwig
2006-12-05 21:21   ` Ivo van Doorn
2007-01-31  3:40 ` Stephen Hemminger
2007-01-31 10:39   ` Ivo van Doorn
2007-01-31 11:20   ` Ivo van Doorn
2007-03-30  5:27     ` Dmitry Torokhov
2007-03-30  5:29       ` Dmitry Torokhov
2007-03-30 14:59       ` Ivo van Doorn
2007-03-30 15:28         ` Dmitry Torokhov
2007-03-30 17:13           ` Ivo van Doorn
2007-03-30 18:37             ` Dmitry Torokhov
2007-03-31 12:49               ` Ivo van Doorn
2007-04-02  4:38                 ` Dmitry Torokhov

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=d120d5000612041415r2f471e78s4feb86d22b7706d5@mail.gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=ivdoorn@gmail.com \
    --cc=jbenc@suse.cz \
    --cc=johannes@sipsolutions.net \
    --cc=lennart@poettering.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --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

all inboxes | Powered by JetHome®