Re: [PATCH 6/8] rfkill: add the WWAN radio type

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Inaky Perez-Gonzalez <inaky@...>
Cc: Ivo van Doorn <ivdoorn@...>, <linux-kernel@...>, John W. Linville <linville@...>, David S. Miller <davem@...>
Date: Sunday, April 13, 2008 - 1:25 pm

On Sat, 12 Apr 2008, Inaky Perez-Gonzalez wrote:

Yeah, and we have to avoid such problems.

But let me ask you one thing.  Are we talking of different rfkill
switches, OR are we talking about different KEYs or BUTTONS in the
keyboard/keypad/console/remote control?

Because one thing has very little to do with the other.  No network
device driver shall generate an input event after I am done with the
next patch set...

On the other hand, if you DO have a WiMax, 3G, or EDGE *key* or
*button*, THEN you need a KEY_WIMAX, KEY_3G, KEY_EDGE, or whatever. Even
if there was no rfkill class in existence :-) and that's only if you
would find more than one of them in a keyboard/console/remote
control/keypad, otherwise KEY_WWAN would be enough.  Adding input events
is *expensive*.

The same idea is also true for switches, which must use EV_SW SW_* and
NEVER try to simulate a switch using KEY_* or BUTTON_*.

So, we CAN keep RFKILL_TYPE_WIMAX, and this is decoupled to keeping
KEY_WIMAX.  These are two different decisions, and are not related to
each other in any way.

Do we *have* devices with WiMAX keys or buttons that ALSO have non-WiMAX
WWAN keys or buttons [that support Linux]?  If so, you need KEY_WIMAX
events (and/or BUTTON_WIMAX, depends on the type of event being
generated).  This has nothing to do with rfkill.   The same question and
rationale applies to devices with switches (i.e. stuff that latches to a
state), and SW_* events.

Is it a good idea to have WiMAX as a separate type for rfkill switches?
Probably.  I'd actually say we should have a two-tier approach:

1. switch class:
   WLAN - (wifi stuff and whatever else looks like a WLAN)
   WWAN - (3G, WiMAX, etch)
   personal devices (or whatever the right name for this is): UWB, Bluetooth
   ALL/ANY - "all radios" button/switches/etc

2. switch type:
   802.11abgn(WiFi), 802.16(WiMAX), EDGE/UMTS/X-RTT(Cell), UWB,
   BLUETOOTH, ANY...  this can certainly be granular to the technology
   level.

That would make it easier for rfkill-input to decide on what switches it
should operate when it gets an specific input event.  We would make it
operate on all WWAN-class rf switches for KEY_WWAN (and that would
include WiMAX), and we could make it operate on all switches of a
specific type, e.g. only bluetooth (and not bluetooth+UWB) for
KEY_BLUETOOTH.


Exactly, and we have to enhance rfkill to address that model properly.

My current idea of how it could work is:

1. "Master" switches: those who are to control an entire class of radios
(i.e. all devices of the same type), or all radios (type "any").  The
most typical example is a RO rfkill switch in a laptop or gadget, and
buttons and hot-keys in laptops or gadgets.  Master switches may issue
input events when needed (it usually is).

2. "slave" switches: this is what you usually have on the chipsets and
their drivers (typically, two of them: a hardware one driven by an input
pin in the hardware that the driver can *read* (i.e. it is read-only),
and a software one in the driver code, which is read-write).  They
*never* issue input events.

The big bad thing we need to always keep in mind is that that input pin
in a radio chipset that is exported as a read-only rfkill switch might
be a slave in one gadget/platform, and a master in another
gadget/plaftform.  Let userspace or a platform/gadget-specific platform
driver configure this.  Place all glue related to this in the rfkill
class.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PATCH] rfkill support for r/w and r/o rfkill switches, Henrique de Moraes Holschuh..., (Fri Apr 11, 4:37 pm)
[PATCH 6/8] rfkill: add the WWAN radio type, Henrique de Moraes Holschuh..., (Fri Apr 11, 4:37 pm)
Re: [PATCH 6/8] rfkill: add the WWAN radio type, Ivo van Doorn, (Sat Apr 12, 6:36 am)
Re: [PATCH 6/8] rfkill: add the WWAN radio type, Henrique de Moraes Holschuh..., (Sat Apr 12, 8:15 am)
Re: [PATCH 6/8] rfkill: add the WWAN radio type, Inaky Perez-Gonzalez, (Sat Apr 12, 7:23 pm)
Re: [PATCH 6/8] rfkill: add the WWAN radio type, Henrique de Moraes Holschuh..., (Sun Apr 13, 1:25 pm)
Re: [PATCH 6/8] rfkill: add the WWAN radio type, Ivo van Doorn, (Sun Apr 13, 1:37 pm)
Re: [PATCH 6/8] rfkill: add the WWAN radio type, Henrique de Moraes Holschuh..., (Sun Apr 13, 2:16 pm)
Re: [PATCH 6/8] rfkill: add the WWAN radio type, Dmitry Torokhov, (Mon Apr 14, 12:20 am)
Re: [PATCH 6/8] rfkill: add the WWAN radio type, Ivo van Doorn, (Sat Apr 12, 8:28 am)
Re: [PATCH 6/8] rfkill: add the WWAN radio type, Inaky Perez-Gonzalez, (Fri Apr 11, 4:44 pm)
Re: [PATCH 6/8] rfkill: add the WWAN radio type, Henrique de Moraes Holschuh..., (Fri Apr 11, 4:53 pm)
[PATCH 8/8] rfkill: add parameter to disable radios by default, Henrique de Moraes Holschuh..., (Fri Apr 11, 4:37 pm)
Re: [PATCH 8/8] rfkill: add parameter to disable radios by d..., Henrique de Moraes Holschuh..., (Sat Apr 12, 8:56 am)
Re: [PATCH 8/8] rfkill: add parameter to disable radios by d..., Henrique de Moraes Holschuh..., (Sat Apr 12, 10:43 am)
Re: [PATCH 8/8] rfkill: add parameter to disable radios by d..., Henrique de Moraes Holschuh..., (Sat Apr 12, 2:36 pm)
[PATCH 5/8] rfkill: add read-only rfkill switch support, Henrique de Moraes Holschuh..., (Fri Apr 11, 4:37 pm)
[PATCH 7/8] rfkill: add an "any radio" switch type and funct..., Henrique de Moraes Holschuh..., (Fri Apr 11, 4:37 pm)
Re: [PATCH 7/8] rfkill: add an "any radio" switch type and f..., Henrique de Moraes Holschuh..., (Sun Apr 13, 1:40 pm)
[PATCH 3/8] rfkill: handle KEY_RADIO and SW_RADIO events, Henrique de Moraes Holschuh..., (Fri Apr 11, 4:37 pm)
Re: [PATCH 3/8] rfkill: handle KEY_RADIO and SW_RADIO events, Dmitry Torokhov, (Sat Apr 12, 11:47 am)
Re: [PATCH 3/8] rfkill: handle KEY_RADIO and SW_RADIO events, Henrique de Moraes Holschuh..., (Sat Apr 12, 2:02 pm)
Re: [PATCH 3/8] rfkill: handle KEY_RADIO and SW_RADIO events, Carlos Corbacho, (Sat Apr 12, 3:09 pm)
Re: [PATCH 3/8] rfkill: handle KEY_RADIO and SW_RADIO events, Henrique de Moraes Holschuh..., (Sat Apr 12, 4:36 pm)
Re: [PATCH 3/8] rfkill: handle KEY_RADIO and SW_RADIO events, Henrique de Moraes Holschuh..., (Sat Apr 12, 8:05 am)
Re: [PATCH 3/8] rfkill: handle KEY_RADIO and SW_RADIO events, Henrique de Moraes Holschuh..., (Sat Apr 12, 9:08 am)
[PATCH 2/8] rfkill: fix minor typo in kernel doc, Henrique de Moraes Holschuh..., (Fri Apr 11, 4:37 pm)
[PATCH 4/8] rfkill: add read-write rfkill switch support, Henrique de Moraes Holschuh..., (Fri Apr 11, 4:37 pm)
Re: [PATCH 4/8] rfkill: add read-write rfkill switch support, Henrique de Moraes Holschuh..., (Sun Apr 13, 9:20 pm)
Re: [PATCH 4/8] rfkill: add read-write rfkill switch support, Carlos Corbacho, (Mon Apr 14, 3:06 pm)
Re: [PATCH 4/8] rfkill: add read-write rfkill switch support, Henrique de Moraes Holschuh..., (Mon Apr 14, 5:46 pm)
Re: [PATCH 4/8] rfkill: add read-write rfkill switch support, Dmitry Torokhov, (Mon Apr 14, 4:23 pm)
Re: [PATCH 4/8] rfkill: add read-write rfkill switch support, Carlos Corbacho, (Tue Apr 15, 3:27 am)
Re: [PATCH 4/8] rfkill: add read-write rfkill switch support, Dmitry Torokhov, (Tue Apr 15, 8:58 am)
Re: [PATCH 4/8] rfkill: add read-write rfkill switch support, Dmitry Torokhov, (Mon Apr 14, 10:16 am)
Re: [PATCH 4/8] rfkill: add read-write rfkill switch support, Henrique de Moraes Holschuh..., (Mon Apr 14, 10:36 am)
Re: [PATCH 4/8] rfkill: add read-write rfkill switch support, Dmitry Torokhov, (Mon Apr 14, 11:19 am)
Re: [PATCH 4/8] rfkill: add read-write rfkill switch support, Henrique de Moraes Holschuh..., (Mon Apr 14, 12:33 pm)
Re: [PATCH 4/8] rfkill: add read-write rfkill switch support, Dmitry Torokhov, (Mon Apr 14, 2:05 pm)
Re: [PATCH 4/8] rfkill: add read-write rfkill switch support, Henrique de Moraes Holschuh..., (Mon Apr 14, 5:41 pm)
[PATCH 1/8] rfkill: clarify meaning of rfkill states, Henrique de Moraes Holschuh..., (Fri Apr 11, 4:37 pm)
Re: [PATCH 1/8] rfkill: clarify meaning of rfkill states, Dmitry Torokhov, (Mon Apr 14, 12:22 am)