Re: Adding rfkill support to thinkpad_acpi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/22/07, Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> wrote:
> On Tue, 22 May 2007, Dmitry Torokhov wrote:
> > On 5/22/07, Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> wrote:
> > > I can work with that, yes.  In fact I have nothing against it, but current
> > > rfkill does not allow for the above.
> >
> > RFKill sure does not. Rfkill does not support buttons, sliders, knobs
> > or anything else. That is what input layer for. Userspace is supposed
>
> It was beaten into my heads that rfkill has two parts and that one is not to
> try to use one without the other:  The sysfs class, and the input layer
> stuff.

I am sorry if I come out too strong sometimes.

> > Alernatively rfkill-input will do smple on/off toggling on switches
> > that userspace did not claim.
>
> And I was TOLD I cannot even look at rfkill sysfs support without taking
> rfkill-input into the picture.  Which is a dubious design decision IMHO, but
> I am quite willing to go with it.

Not the rfkill-input but input device piece. rfkill-input is an
optional glue that may not be needed is userspace is willing to do
full control.

>
> Correctness is *always* a gain when it is cheap to implement, and in this
> case it IS cheap.  I only asked for TWO things so far, make no mistake about
> it:
>
> 1. a get_radio_state() hook, that gets called when rfkill needs the state.
> I sent a patch implementing it, with 100% backwards compatibility for
> drivers that don't want to implement get_radio_state().
>
> 2. a set_radio_state() method in the class, to change the radio state
> without causing a loop through the underlying driver.  I understand a patch
> for this is not needed, but it would take about 10 minutes to write one and
> QA it, and I will do so if anyone asks for it.

OK, so let's say we have that call. An user pushes the button and you
disable the radio. Now, imagine you have a laptop with a button that
does not directly control radio state, i.e. the driver needs to
explicitely turn the radio off when it detects button press. And the
user who was tored of hittign the button by mistake and turning off
his radio decided to ignore the button. He wrote into "user_claim"
sysfs attribute and thought that that's it. But it would not work
because the driver was way too optimized and smart and decided to go
around rfkill and current system policy and trun the radio off
directly.

I understand that some switches are wired diretcly to radio and can't
be overriden but we need to look at bigger picture.

-- 
Dmitry

-------------------------------------------------------------------------
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/
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux