lkml.org 
[lkml]   [2010]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/8] [Resend] ideapad: using EC command to control rf/camera power
On Fri, Sep 10, 2010 at 02:44:16PM +0800, Ike Panhc wrote:
> On 09/10/2010 02:17 AM, Mario 'BitKoenig' Holbe wrote:
> > Hmmm, with this version and no_bt_rfkill=1 I run into the same problem
> > as without the ideapad module: If I switch BT off in Windows and reboot
> > to Linux, the device remains invisible and I have no chance to switch it
> > back on again :/
>
> The no_bt_rfkill is a stopgap for dual OS user. when BT is default on, user
> still have the BT sw rfkill registered as hci0. when BT is defualt off, user
> can re-insert module with no_bt_rfkill=0.
>
> > I guess this is because the initial device activation does currently
> > only happen in ideapad_register_rfkill() via rfkill_init_sw_state()
> > which is not called if no_bt_rfkill=1.
> > A manual call to ideapad_rfk_set() (or ideapad_sync_rfk_state()?) in the
> > no_bt_rfkill=1 case would very likely solve this, but I don't know how
> > to provide this call with the correct arguments.
>
> Sorry I do not get the point of a manual call. Could you explain more on this?
>
> ideapad_rfk_set is called when user update /sys/class/rfkill/rfkill?/state and
> ideapad_sync_rfk_state is called when user touch the hw rfkill switch.

ideapad_rfk_set is also called in ideapad_register_rfkill:

static int ideapad_register_rfkill(struct acpi_device *adevice, int dev)
{
...
if (no_bt_rfkill && (ideapad_rfk_data[dev].type == RFKILL_TYPE_BLUETOOTH))
return 0;
...
rfkill_init_sw_state(priv->rfk[dev], 0);
}

The rfkill_init_sw_state call to unblock the device finally calls
ideapad_rfk_set. In the no_bt_rfkill=1 case rfkill_init_sw_state isn't
called, thus the device is not unblocked if it was blocked before.
Hence, if I prior disabled BT in Windows, the device remains invisible.
This is why I think a manual call to ideapad_rfk_set in the
no_bt_rfkill=1 case would make the BT device visible.

"manual" in terms of:
if (no_bt_rfkill && (ideapad_rfk_data[dev].type == RFKILL_TYPE_BLUETOOTH))
{
ideapad_rfk_set(???, 0);
return 0;
}

But I don't know what to provide as "???".


Mario
--
"Why are we hiding from the police, daddy?" | J. E. Guenther
"Because we use SuSE son, they use SYSVR4." | de.alt.sysadmin.recovery
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2010-09-10 09:15    [W:0.549 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site