linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: linux-input@vger.kernel.org, Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: rfkill-input understanding help
Date: Sun, 30 Dec 2007 19:59:42 +0100	[thread overview]
Message-ID: <200712301959.42914.IvDoorn@gmail.com> (raw)
In-Reply-To: <200712110333.40946.carlos@strangeworlds.co.uk>

Hi,

Sorry for the late response..

> There are two buttons which control these, one for wireless, and one for 
> bluetooth. However, the wireless and bluetooth buttons on the laptop are just 
> keys - they generate KEY_WLAN and KEY_BLUETOOTH, but don't toggle the 
> wireless and bluetooth themselves (this is down to acer-wmi).

Which makes rfkill a correct solution. :)

> Registered two rfkill devices - one for wireless, one for bluetooth.
> 
> Problem:
> 
> The sysfs interface works just fine - but nothing is being toggled when I 
> press the wireless or bluetooth buttons (which are just generating KEY_WLAN 
> and KEY_BLUETOOTH).

So using the sysfs interface you can enable and disable the radios?

> From my limited understanding, rfkill_input (which is enabled in my kernel) 
> _should_ just be handling these keycodes (since userspace has not claimed 
> these rfkill devices), and then calling the necessary toggle function - but 
> AFAICT, this is not happening.
> 
> Have I misunderstood this, am I missing something, or is this particular use 
> case supposed to be handled by userspace instead (i.e. a userspace tool is 
> supposed to handle the keypress, then toggle the rfkill device via sysfs)?

Without a code example I can't say much, but have you looked to the examples
in the drivers/net/wireless/rt2x00/ and drivers/net/wireless/b43
Those are at least 2 drivers with a working rfkill implementation for WLAN,
that should give a good example on how the code should look like.

Ivo

  reply	other threads:[~2007-12-30 18:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-11  3:33 rfkill-input understanding help Carlos Corbacho
2007-12-30 18:59 ` Ivo van Doorn [this message]
2007-12-31  1:00   ` Carlos Corbacho
2008-01-02 19:10     ` Ivo van Doorn
2008-01-11  3:23       ` Carlos Corbacho
2008-01-11 19:08         ` Ivo van Doorn
2008-01-11 20:34           ` Dmitry Torokhov
2008-01-12  0:32             ` Carlos Corbacho
2008-01-22  0:55               ` Carlos Corbacho
2008-04-12 17:21                 ` Carlos Corbacho
2008-04-13 11:23                   ` Carlos Corbacho
2008-04-14 18:12                     ` 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=200712301959.42914.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=carlos@strangeworlds.co.uk \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@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).