From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: "Ivo van Doorn" <ivdoorn@gmail.com>
Cc: linux-kernel@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>,
"Jiri Benc" <jbenc@suse.cz>
Subject: Re: [PATCH] RFKILL - Add support for input key to control wireless radio
Date: Mon, 28 Aug 2006 11:47:12 -0400 [thread overview]
Message-ID: <d120d5000608280847n221b6d89y93c8cba747d84890@mail.gmail.com> (raw)
In-Reply-To: <200608271534.58503.IvDoorn@gmail.com>
Hi ivo,
On 8/27/06, Ivo van Doorn <ivdoorn@gmail.com> wrote:
> Hi,
>
> This driver has previously be send to the netdev list for inclusion
> in the wireless-dev tree. But before it can be applied there this
> patch needs an stamp of approoval from the Input layer maintainer.
>
> Modern (and even older) laptops often have a key to enable or disable
> the radio of a wireless device (WIFI, IRDA, Bluetooth, etc).
> It is however not always the case that the button controls the hardware
> directly. The rfkill driver will provide a uniform interface for hardware
> drivers to hook the button on and to provide a single method to report
> the state of the button to userspace.
>
> For each button a input device is created, after which rfkill will start polling
> for the button state. The polling will only occur if the button requires polling,
> but rfkill also provide a handler for the hardware driver to report the button
> status to rfkill. Once the status of any button has changed (detected either
> by polling or by notification from hardware driver) it will go through all
> registered hardware and will enable/disable the radio of the device if the
> input device has not been opened by the user. If the input device has been
> openend by the user the radio will not be touched and the event will be send
> to userspace to allow userspace to deal with the situation.
>
I am not sure if this is a correct approach, kernel should not assume
that the reason why input device was opened is to control the state of
the transmitter. For example one could be happy with hardware toggling
the state but still want to have for example a GKrellm showing state
of the transmitter.
Also please explain how userspace would control the state of
transmitter once KEY_RFKILL is received - there seems to be only
kernel->userspace link, but not userspace->kernel.
I would rather see you implemented a transmitter control framework
that would export couple of sysfs attributes. One attribute would
enable/disable controlling transmitter state automatically by the
driver and another would allow controlling transmitter from
userspace. Then input device would always deliver events to userspace
(btw, it probably shoudl be switch, not a key event) and it would be
up to userspace program to explicitely take control over.
--
Dmitry
next parent reply other threads:[~2006-08-28 15:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200608271534.58503.IvDoorn@gmail.com>
2006-08-28 15:47 ` Dmitry Torokhov [this message]
2006-08-28 20:15 ` Ivo van Doorn
2006-08-31 3:05 ` Dmitry Torokhov
2006-08-31 15:23 ` Ivo van Doorn
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=d120d5000608280847n221b6d89y93c8cba747d84890@mail.gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=ivdoorn@gmail.com \
--cc=jbenc@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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®