mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikko Vinni <mmvinni@yahoo.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: keyboard leds not restored after s2ram in 2.6.32-rc6-00166-g799dd75
Date: Wed, 11 Nov 2009 12:05:42 -0800 (PST)	[thread overview]
Message-ID: <800885.42568.qm@web58401.mail.re3.yahoo.com> (raw)
In-Reply-To: <20091111095218.GA3654@core.coreip.homeip.net>

Hi,

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

> > my laptop shows the caps lock and scroll lock leds as being on after s2ram
> > (and resume), even though they are off. If I press the caps lock key, the caps
> > lock led stays on, the num lock led turns off, and the screen unlock screen
> > warns about the caps lock being on.
> > 
> 
> Thank you for the report. Could youplease tell me if the patch below
> fixes the problem?

Yes, it does. Thanks, now my HP-dv5 is happy.

I did some tests suspending with the caps lock actually on, and it seems that
in that case the user might still be confused (caps lock is on but led is off).
At least on this machine this patch doesn't affect this theoretical problem
either way (2.6.31 behaves similarly), so it is ok.


Mikko


> 
> Thanks!
> 
> -- 
> Dmitry
> 
> 
> Input: force LED reset on resume
> 
> From: Dmitry Torokhov 
> 
> We should be sending EV_LED event down to drivers upon resume even in cases
> when in-kernel state of the LED is off since device could come up with some
> leds turned on.
> 
> Reported-by: Mikko Vinni 
> Signed-off-by: Dmitry Torokhov 
> ---
> 
> drivers/input/input.c |   29 ++++++++++++++++++-----------
> 1 files changed, 18 insertions(+), 11 deletions(-)
> 
> 
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index 61069b2..77b6efe 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -1298,17 +1298,24 @@ static int input_dev_uevent(struct device *device, 
> struct kobj_uevent_env *env)
>     return 0;
> }
> 
> -#define INPUT_DO_TOGGLE(dev, type, bits, on)            \
> -    do {                            \
> -        int i;                        \
> -        if (!test_bit(EV_##type, dev->evbit))        \
> -            break;                    \
> -        for (i = 0; i < type##_MAX; i++) {        \
> -            if (!test_bit(i, dev->bits##bit) ||    \
> -                !test_bit(i, dev->bits))        \
> -                continue;            \
> -            dev->event(dev, EV_##type, i, on);    \
> -        }                        \
> +#define INPUT_DO_TOGGLE(dev, type, bits, on)                \
> +    do {                                \
> +        int i;                            \
> +        bool active;                        \
> +                                    \
> +        if (!test_bit(EV_##type, dev->evbit))            \
> +            break;                        \
> +                                    \
> +        for (i = 0; i < type##_MAX; i++) {            \
> +            if (!test_bit(i, dev->bits##bit))        \
> +                continue;                \
> +                                    \
> +            active = test_bit(i, dev->bits);        \
> +            if (!active && !on)                \
> +                continue;                \
> +                                    \
> +            dev->event(dev, EV_##type, i, on ? active : 0);    \
> +        }                            \
>     } while (0)
> 
> #ifdef CONFIG_PM



      

  reply	other threads:[~2009-11-11 20:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-10 17:27 Mikko Vinni
2009-11-11  9:52 ` Dmitry Torokhov
2009-11-11 20:05   ` Mikko Vinni [this message]
2009-11-11 22:14     ` Dmitry Torokhov
2009-11-12  8:08       ` Mikko Vinni
2009-11-26  2:14         ` Dmitry Torokhov

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=800885.42568.qm@web58401.mail.re3.yahoo.com \
    --to=mmvinni@yahoo.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®