linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Carlos Corbacho <carlos@strangeworlds.co.uk>
To: linux-input@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>, ivdoorn@gmail.com
Subject: rfkill-input understanding help
Date: Tue, 11 Dec 2007 03:33:40 +0000	[thread overview]
Message-ID: <200712110333.40946.carlos@strangeworlds.co.uk> (raw)

Dmitry, Ivo,

I'm trying to get my head around the input part of rfkill, and failing 
miserably here.

Background:

acer-wmi (in development) controls the rfkill switches for wireless and 
bluetooth on many Acer laptops.

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).

I'd like to set it up so that KEY_WLAN will toggle the wireless, and 
KEY_BLUETOOTH toggles bluetooth.

I've been reading through rfkill.txt and linux/rfkill.h and the various 
discussions about rfkill and quite frankly, I'm no-where near understanding 
what it is I need to do for this particular use case.

What I've done so far:

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).

>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)?

-Carlos
-- 
E-Mail: carlos@strangeworlds.co.uk
Web: strangeworlds.co.uk
GPG Key ID: 0x23EE722D

             reply	other threads:[~2007-12-11  3:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-11  3:33 Carlos Corbacho [this message]
2007-12-30 18:59 ` rfkill-input understanding help Ivo van Doorn
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=200712110333.40946.carlos@strangeworlds.co.uk \
    --to=carlos@strangeworlds.co.uk \
    --cc=dmitry.torokhov@gmail.com \
    --cc=ivdoorn@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).