public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ike Panhc <ike.pan@canonical.com>
To: Keng-Yu Lin <kengyu@canonical.com>
Cc: Matthew Garrett <mjg@redhat.com>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, vanhoof@canonical.com,
	kent.lin@canonical.com, sylee@canonical.com
Subject: Re: [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification
Date: Wed, 29 Jun 2011 22:26:19 +0800	[thread overview]
Message-ID: <4E0B360B.5050600@canonical.com> (raw)
In-Reply-To: <1309268154-6872-1-git-send-email-kengyu@canonical.com>

On 06/28/2011 09:35 PM, Keng-Yu Lin wrote:
> BIOS fires notifications in a constant period with VPC bit 1 set when the
> power cord is unplugged.
> 
> This event is not known yet to have any effect, but it makes the
> call to sparse_keymap_report_event() and generates many KEY_UNKNOWNs.
> 
> This causes the userspace (Gnome Power Manager in my case) unable
> to enter the idle mode. As the result there is no screensaver showing up,
> no dim backlight, etc.
> 
> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
> ---
>  drivers/platform/x86/ideapad-laptop.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
> index bfdda33..820f013 100644
> --- a/drivers/platform/x86/ideapad-laptop.c
> +++ b/drivers/platform/x86/ideapad-laptop.c
> @@ -463,7 +463,8 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
>  				ideapad_sync_rfk_state(adevice);
>  			else if (vpc_bit == 4)
>  				read_ec_data(handle, 0x12, &vpc2);
> -			else
> +			else if (vpc_bit == 1) {
> +			} else
>  				ideapad_input_report(priv, vpc_bit);
>  		}
>  	}

So far I know this event (coming with vpc_bit=1) is for Lenovo PM utility
on Windows. For most of the machine this event is not implemented in BIOS.

Its ok that we just ignore the event.

I think it will be better if we can let sparse-keymap or any upper level
application to ignore all unknown scancode or KEY_UNKNOWN but so far I do
not know a better way then this patch.


  parent reply	other threads:[~2011-06-29 14:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28 13:35 [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification Keng-Yu Lin
2011-06-28 13:35 ` [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event Keng-Yu Lin
2011-06-29 13:56   ` Ike Panhc
2011-06-30 10:34     ` Keng-Yü Lin
2011-07-05  7:26       ` Ike Panhc
2011-07-05 11:42         ` Keng-Yü Lin
2011-07-07 15:11   ` Matthew Garrett
2011-07-08  9:52     ` Joey Lee
2011-06-29 14:26 ` Ike Panhc [this message]
2011-06-30 10:17   ` [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification Keng-Yü Lin
2011-07-07 15:10 ` Matthew Garrett
2011-07-11  7:29   ` Keng-Yü Lin
2011-07-11 15:50     ` Matthew Garrett

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=4E0B360B.5050600@canonical.com \
    --to=ike.pan@canonical.com \
    --cc=kengyu@canonical.com \
    --cc=kent.lin@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=sylee@canonical.com \
    --cc=vanhoof@canonical.com \
    /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