netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Ivo van Doorn <ivdoorn@gmail.com>
Cc: davem@davemloft.net, Dmitry Torokhov <dtor@insightbb.com>,
	netdev@vger.kernel.org,
	Inaky Perez-Gonzalez <inaky@linux.intel.com>
Subject: Re: [PATCH 3/3 v2] rfkill: Add rfkill documentation
Date: Tue, 11 Sep 2007 12:59:10 -0700	[thread overview]
Message-ID: <20070911125910.3a1ea9c6.randy.dunlap@oracle.com> (raw)
In-Reply-To: <200709111901.02137.IvDoorn@gmail.com>

On Tue, 11 Sep 2007 19:01:01 +0200 Ivo van Doorn wrote:

Almost done.  See below.


>  Documentation/rfkill.txt |   89 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 89 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/rfkill.txt
> 
> diff --git a/Documentation/rfkill.txt b/Documentation/rfkill.txt
> new file mode 100644
> index 0000000..0f35134
> --- /dev/null
> +++ b/Documentation/rfkill.txt
> @@ -0,0 +1,89 @@
+===============================================================================
> +1: Implementation details
> +
> +The rfkill switch subsystem offers support for keys often found on laptops
> +to enable wireless devices like WiFi and Bluetooth.
> +
> +This is done by providing the user 3 possibilities:
> + 1 - The rfkill system handles all events, userspace is not aware of events;
> + 2 - The rfkill system handles all events, userspace is informed about the event;
> + 3 - The rfkill system does not handle events, userspace handles all events;

In the above 3 lines,
change "events," to "events;"
and then end each line with a period (".").


> +The buttons to enable and disable the wireless radios are important in
> +situations where the user is for example using his laptop on a location where
> +wireless radios _must_ be disabled (e.g. airplanes).
> +Because of this requirement, userspace support for the keys should not be
> +made mandatory. Because userspace might want to perform some additional smarter
> +tasks when the key is pressed, rfkill still provides userspace the possibility
> +to take over the task to handle the key events.
> +
> +The system inside the kernel has been split into 2 separate sections:
> +	1 - RFKILL
> +	2 - RFKILL_INPUT
> +
> +The first option enables rfkill support and will make sure userspace will
> +be notified of any events through the input device. It also creates several
> +sysfs entries which can be used by userspace. See section "Userspace support".
> +
> +The second option provides an rfkill input handler. This handler will
> +listen to all rfkill key events and will toggle the radio accordingly.
> +With this option enabled userspace could either do nothing or simply
> +perform monitoring tasks.
> +
> +====================================
> +2: Driver support

...

> +====================================
> +3: Userspace support
> +
> +For each key an input device will be created which will send out the correct
> +key event when the rfkill key has been pressed.
> +
> +The following sysfs entries will be created:
> +
> +	name: Name assigned by driver to this key (interface or driver name).
> +	type: Name of the key type ("wlan", "bluetooth", etc).
> +	state: Current state of the key. 1: On, 0: Off.
> +	claim: 1: Userspace handles events, 0: Kernel handles events
> +
> +Both the "state" and "claim" entries are also writable. For the "state" entry
> +this means that when 1 or 0 is written all radios, not yet in the requested
> +state, will be will be toggled accordingly.
> +For the "claim" entry writing 1 to it means that the kernel no longer handles
> +handle key events even though RFKILL_INPUT input was enabled. When "claim" has

  Drop "handle" above.

> +been set to 0, userspace should make sure that it listens for the input events
> +or check the sysfs "state" entry regularly to correctly perform the required
> +tasks when the rkfill key is pressed.

Thanks.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

  reply	other threads:[~2007-09-11 20:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-10 17:54 [PATCH 1/3] rfkill: Remove IRDA Ivo van Doorn
2007-09-10 17:55 ` [PATCH 2/3] rfkill: Add support for ultrawideband Ivo van Doorn
2007-09-10 17:56 ` [PATCH 3/3] rfkill: Add rfkill documentation Ivo van Doorn
2007-09-10 18:26   ` Randy Dunlap
2007-09-11 16:51     ` Ivo van Doorn
2007-09-11 17:01   ` [PATCH 3/3 v2] " Ivo van Doorn
2007-09-11 19:59     ` Randy Dunlap [this message]
2007-09-11 20:20     ` [PATCH 3/3 v3] " Ivo van Doorn
2007-09-11 20:29       ` Randy Dunlap
2007-09-12 18:14 ` [PATCH 1/3 v4] rfkill: Remove IRDA Ivo van Doorn
2007-09-13  7:23   ` David Miller
2007-09-12 18:14 ` [PATCH 2/3 v4] rfkill: Add support for ultrawideband Ivo van Doorn
2007-09-13  7:23   ` David Miller
2007-09-12 18:14 ` [PATCH 3/3 v4] rfkill: Add rfkill documentation Ivo van Doorn
2007-09-13  7:24   ` David Miller

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=20070911125910.3a1ea9c6.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=davem@davemloft.net \
    --cc=dtor@insightbb.com \
    --cc=inaky@linux.intel.com \
    --cc=ivdoorn@gmail.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;
as well as URLs for NNTP newsgroup(s).