linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Anything against a new EV_SW SW_RADIO event ?
@ 2007-06-24 10:55 Henrique de Moraes Holschuh
  2007-06-25  4:22 ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Henrique de Moraes Holschuh @ 2007-06-24 10:55 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input, ibm-acpi-devel, Ivo van Doorn, Richard Hughes

Dmitry,

Could you ACK the attached patch?  I am about to send in code that would
benefit a damn great deal from it (thinkpad-acpi support for the
T60/X60/newer radio-kill slider switch)...  So I thought it would be best to
check with you first if I can have an EV_SW SW_RADIO...

-- 
  "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

commit f5752eca1ffed72ce32c42f15b16cb4d240901c1
Author: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Date:   Sat Jun 23 23:55:22 2007 -0300

    INPUT: add a new EV_SW SW_RADIO event, for radio switches on laptops
    
    Many laptops have rf-kill physical switches that are not keys, but slider
    or rocker switches.  Often (like in all ThinkPads with a radio kill slider
    switch), they have both a slider/rocker switch and a hot key.
    
    Trying to kludge a real switch to act like a key is not a very smart thing
    to do if you can help it, and it gets specially bad when you are going to
    have both in the same machine.  So, we do the right thing and add an input
    EV_SW event for radio kill switches.
    
    The EV_SW SW_RADIO event is defined with positive logic, i.e. when the
    switch is active, the radios are to be enabled.  When the switch is
    inactive, the radios are to be disabled.
    
    Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
    Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Cc: Ivo van Doorn <ivdoorn@gmail.com>
    Cc: Richard Hughes <hughsient@gmail.com>

diff --git a/include/linux/input.h b/include/linux/input.h
index bde65c8..b530678 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -602,6 +602,7 @@ struct input_absinfo {
 #define SW_LID			0x00  /* set = lid shut */
 #define SW_TABLET_MODE		0x01  /* set = tablet mode */
 #define SW_HEADPHONE_INSERT	0x02  /* set = inserted */
+#define SW_RADIO		0x03  /* set = radio enabled */
 #define SW_MAX			0x0f
 
 /*

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Anything against a new EV_SW SW_RADIO event ?
  2007-06-24 10:55 Anything against a new EV_SW SW_RADIO event ? Henrique de Moraes Holschuh
@ 2007-06-25  4:22 ` Dmitry Torokhov
       [not found]   ` <200706250022.15244.dtor-xOqKmqBdiMhF6kxbq+BtvQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2007-06-25  4:22 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh
  Cc: linux-input, ibm-acpi-devel, Ivo van Doorn, Richard Hughes

Hi Henrique,

On Sunday 24 June 2007 06:55, Henrique de Moraes Holschuh wrote:
> Dmitry,
> 
> Could you ACK the attached patch?  I am about to send in code that would
> benefit a damn great deal from it (thinkpad-acpi support for the
> T60/X60/newer radio-kill slider switch)...  So I thought it would be best to
> check with you first if I can have an EV_SW SW_RADIO...
> 

Adding SW_RADIO would be fine. My only question is if SW_ARDIO is enough or
if we would need SW_WIFI/SW_BLUETOOTH/SW_ETC down the road...

-- 
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Anything against a new EV_SW SW_RADIO event ?
       [not found]   ` <200706250022.15244.dtor-xOqKmqBdiMhF6kxbq+BtvQ@public.gmane.org>
@ 2007-06-25  9:05     ` Henrique de Moraes Holschuh
  0 siblings, 0 replies; 3+ messages in thread
From: Henrique de Moraes Holschuh @ 2007-06-25  9:05 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/,
	ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Ivo van Doorn,
	Richard Hughes

On Mon, 25 Jun 2007, Dmitry Torokhov wrote:
> On Sunday 24 June 2007 06:55, Henrique de Moraes Holschuh wrote:
> > Could you ACK the attached patch?  I am about to send in code that would
> > benefit a damn great deal from it (thinkpad-acpi support for the
> > T60/X60/newer radio-kill slider switch)...  So I thought it would be best to
> > check with you first if I can have an EV_SW SW_RADIO...
> 
> Adding SW_RADIO would be fine. My only question is if SW_ARDIO is enough or
> if we would need SW_WIFI/SW_BLUETOOTH/SW_ETC down the road...

I will add an ACK from you to the EV_SW SW_RADIO patch, then.

As for a rabbit-breeding of radio switches, well, that should not happen on
ThinkPads, at least.  They might have other types of switches (on the
docks), but I don't see a risk of SW_WIFI/SW_BLUETOOTH ever happening
there... or in any other normal laptop, the regulations ask for a way to
kill *all* radios on airplanes and explosive atmosphere areas, and they're
the reason for the switches.

The thinkpad radio hot key (not the switch) may be bluetooth-only in
firmware, but it is supposed to be overriden by any O.S. with a driver, and
the "reference" usercase for it (IBM/Lenovo's ThinkVantage suite) offers to
switch on/off all radios or to apply a given radio profile, etc.  I.e. the
key is used as an application launch key.  Again, the trend is not for
separate radio-type switches or keys, there.

I'd say we should cross the multiple radio-types bridge if we ever happen
upon it, but not to waste much brain resources over it at this time.  And it
still looks like we'd need a generic radio switch anyway, that all radio
types are to obey...

-- 
  "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

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-25  9:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-24 10:55 Anything against a new EV_SW SW_RADIO event ? Henrique de Moraes Holschuh
2007-06-25  4:22 ` Dmitry Torokhov
     [not found]   ` <200706250022.15244.dtor-xOqKmqBdiMhF6kxbq+BtvQ@public.gmane.org>
2007-06-25  9:05     ` Henrique de Moraes Holschuh

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