From: Joey Lee on
Hi Matthew,

First, thank's for your kindly review and suggestion to me.

於 二,2010-03-02 於 15:46 -0800,Greg KH 提到:
> On Tue, Mar 02, 2010 at 11:39:29PM +0000, Matthew Garrett wrote:
> > On Tue, Mar 02, 2010 at 03:28:57PM -0800, Greg Kroah-Hartman wrote:
> > > From: Lee, Chun-Yi <jlee(a)novell.com>
> > >
> > > Some MSI 3G netbook only have one fn key to control Wlan/Bluetooth/3G,
> > > those netbook will load the SCM (windows app) to disable the original
> > > Wlan/Bluetooth control by BIOS when user press fn key, then control
> > > Wlan/Bluetooth/3G by SCM (software control by OS). Without SCM, user
> > > cann't on/off 3G module on those 3G netbook.
> > > On Linux, msi-laptop driver will do the same thing to disable the
> > > original BIOS control, then might need use HAL or other userland
> > > application to do the software control that simulate with SCM.
> > > e.g. MSI N034 netbook
> >
> > How does the function key event get reported to userland? This should
> > generate KEY_RFKILL and then just go through rfkill-input.

I developed this driver on 2.6.31 kernel, and I found this key code is
in 2.6.33 kernel and later.
There have one and only one scancode to control 3 devices when end user
press fn+f11 key on MSI N034.
Currently, we setup this mapping in HAL key and mapping it to KEY_WLAN.

Does that means I need mapping the scancode to KEY_RFKILL in msi-laptop
driver for 2.6.33 kernel?
If YES, I will submit another patch to add this scancode/keycode mapping
in msi-laptop.c

> I'm pretty sure that Joey is using rfkill here, but I didn't realize
> that it also supported an input device.
>
> This code is just detecting the keypress, and acting on it, I think,
> right Joey? Isn't that the way this is supposed to work? Or is it
> supposed to use rfkill-input, which then userspace turns around and
> calls the other rfkill interface to then disable the wireless? If so, I
> think a number of laptop drivers need to be changed to do this.
>

There have a serial MSI netbook (like: N034) use only one scancode (one
function key) to control 3 devices (Wlan/Bluetooth/3G). It have a
sequence to control those device and userland application control this
sequence, almost like:
- Bluetooth on, WLAN on, WWAN on
- Bluetooth on, WLAN off, WWAN off
- Bluetooth off, WLAN off, WWAN on
....
- Bluetooth off, WLAN off, WWAN off

Even on Windows platform, this job is also handle by userland
application, not by hardware or driver. And MSI EC provide a address to
turn on/off those devices' power and led light.

This patchset for msi-laptop driver is just to provide Wlan/Bluetooth/3G
rfkill sysfs interface for userland to turn on/off those devices's power
and led.
And this patchset doesn't do:
- setup the wifi function key scancode/keycode mapping.
- control those 3 devices on/off sequence. (userland control it)


Thank's
Joey Lee

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Joey Lee on
Hi Matthew,

於 三,2010-03-03 於 13:45 +0000,Matthew Garrett 提到:
> On Tue, Mar 02, 2010 at 09:52:12PM -0700, Joey Lee wrote:
>
> > I developed this driver on 2.6.31 kernel, and I found this key code is
> > in 2.6.33 kernel and later.
> > There have one and only one scancode to control 3 devices when end user
> > press fn+f11 key on MSI N034.
> > Currently, we setup this mapping in HAL key and mapping it to KEY_WLAN.
>
> Ah! The key comes through the keyboard controller? In that case, yeah,
> just map it to KEY_RFKILL in hal isntead of KEY_WLAN. Everything should
> work fine then. If rfkill-input is configured, it'll kill all the
> radios. If userland claims it instead, it can cycle through with
> whatever policy is desired.
>

Thank's for your review and suggestion.
Per discuss for msi-laptop patchset, I will submit a bit patch for the
following change:
- remove threeg sysfs interface.
- add KEY_RFKILL keymapping to msi-laptop.

Does it make sense? or I still miss something important?


Thank's
Joey Lee

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Joey Lee on
Hi Matthew,

於 四,2010-03-04 於 17:09 +0000,Matthew Garrett 提到:
> On Thu, Mar 04, 2010 at 10:07:53AM -0700, Joey Lee wrote:
> > Thank's for your review and suggestion.
> > Per discuss for msi-laptop patchset, I will submit a bit patch for the
> > following change:
> > - remove threeg sysfs interface.
> > - add KEY_RFKILL keymapping to msi-laptop.
>
> If the key event comes through the keyboard controller, there's no need
> to add the mapping to msi-laptop. Doing it through udev or hal is fine.
>

Thank's fully undertood, now, will send patch for remove threeg sysfs
interface.


Joey Lee

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Joey Lee on
Hi Greg,

Please kindly review the attached patch for removed the non-standard
interface "threeg" in msi-laptop driver.



Thank's a lot!
Joey Lee

於 五,2010-03-05 於 06:10 +0000,joeyli(Joey Lee) 提到:
> Hi Matthew,
>
> 於 四,2010-03-04 於 17:09 +0000,Matthew Garrett 提到:
> > On Thu, Mar 04, 2010 at 10:07:53AM -0700, Joey Lee wrote:
> > > Thank's for your review and suggestion.
> > > Per discuss for msi-laptop patchset, I will submit a bit patch for the
> > > following change:
> > > - remove threeg sysfs interface.
> > > - add KEY_RFKILL keymapping to msi-laptop.
> >
> > If the key event comes through the keyboard controller, there's no need
> > to add the mapping to msi-laptop. Doing it through udev or hal is fine.
> >
>
> Thank's fully undertood, now, will send patch for remove threeg sysfs
> interface.
>
>
> Joey Lee