X86 platform drivers
 help / color / mirror / Atom feed
From: Seth Forshee <seth.forshee@canonical.com>
To: Joey Lee <jlee@novell.com>
Cc: platform-driver-x86@vger.kernel.org
Subject: Re: acer-wmi problem handling device states from WMI events
Date: Tue, 21 Jun 2011 08:14:42 -0500	[thread overview]
Message-ID: <20110621131442.GA25609@thinkpad-t410> (raw)
In-Reply-To: <4E00FC26020000230002E847@novprvlin0050.provo.novell.com>

On Tue, Jun 21, 2011 at 04:16:38AM -0600, Joey Lee wrote:
> Hi Seth, 
> 
> 於 一,2011-06-20 於 14:06 -0500,Seth Forshee 提到:
> > Hi Joey,
> > 
> > acer-wmi is indiscriminately using the device state from hotkey events
> > to update the various rfkill states. On the Aspire 1830 this can result
> > in a soft block on the wlan when the touchpad hotkey is pressed, as it
> > is reporting a non-zero device state that does not reflect the wireless
> > status.
> > 
> 
> Thank's for you found out this issue, I didn't meet it because touchpad
> hotkey didn't emit any wmi event on my Acer TravelMate 8572. 
> 
> I will double check it.
> 
> > I beleive the following (untested) patch is a roughly correct fix for
> > this issue.  It changes acer-wmi to only update the rfkill states when
> > the appropriate hotkeys are pressed, but I'm a little unsure about the
> > way I've split out the rfkill updates acording to the hotkeys. I don't
> > see any support in the driver for a 3G hotkey, so I've grouped it with
> > the wlan key, and I have split out bluetooth to be handled separately
> > from these. Does this patch look correct?
> > 
> > Thanks,
> > Seth
> > 
> 
> Yes, I thought your patch can avoid acer-wmi update killswitch state
> base on the result from non-Communication button.
> 
> On some Acer machines only have one wireless key, the key only emit
> KEY_WIRELESS but EC updates 3 communication devices' states, I thought
> we can direct update 3 killswitch state when received KEY_WLAN or
> KEY_BLUETOOTH. maybe like this:
> 
> +			switch (key->keycode) {
> +			case KEY_WLAN:
> +			case KEY_BLUETOOTH:
> +				if (has_cap(ACER_CAP_WIRELESS))
> +					rfkill_set_sw_state(wireless_rfkill,
> +						!(device_state & ACER_WMID3_GDS_WIRELESS));
> +				if (has_cap(ACER_CAP_THREEG))
> +					rfkill_set_sw_state(threeg_rfkill,
> +						!(device_state & ACER_WMID3_GDS_THREEG));
> +				if (has_cap(ACER_CAP_BLUETOOTH))
> +					rfkill_set_sw_state(bluetooth_rfkill,
> +						!(device_state & ACER_WMID3_GDS_BLUETOOTH));
> +				break;
> +			}
> +			sparse_keymap_report_entry(acer_wmi_input_dev, key,
> +						   1, true);
> 
> Of course need more testing on my and your Acer machines.
> I will double check this patch on my TravelMate 8572 then reply result
> on this mail tomorrow.

That is the other way I was thinking of doing this, but I wasn't sure
which was correct, and the machine in question doesn't have bluetooth
for me to test. Based on your explanation I think doing it as above is
best.

I'll get some testing with the version above, and if it tests well for
both of us I will send an updated patch plus one other patch to support
the wlan hotkey on the 1830. I don't personally have this machine so it
may be a few days before I receive results back from my tester.

Thanks,
Seth

  reply	other threads:[~2011-06-21 13:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21 10:16 acer-wmi problem handling device states from WMI events Joey Lee
2011-06-21 13:14 ` Seth Forshee [this message]
2011-06-21 16:58   ` Seth Forshee
2011-06-21 17:00     ` [PATCH 1/2] acer-wmi: Add support for Aspire 1830 wlan hotkey Seth Forshee
2011-06-22 10:14       ` Joey Lee
2011-06-21 17:00     ` [PATCH 2/2] acer-wmi: Only update rfkill status for associated hotkey events Seth Forshee
2011-06-22 10:15       ` Joey Lee
2011-06-22 20:50         ` Joey Lee
  -- strict thread matches above, loose matches on Subject: below --
2011-06-21 10:30 acer-wmi problem handling device states from WMI events Joey Lee
2011-06-20 19:06 Seth Forshee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110621131442.GA25609@thinkpad-t410 \
    --to=seth.forshee@canonical.com \
    --cc=jlee@novell.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox