* [PATCH] Input: atkbd - correct MSC_SCAN events for force_release keys
@ 2014-09-28 21:13 Stefan Brüns
2014-10-17 22:48 ` Stefan Brüns
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Brüns @ 2014-09-28 21:13 UTC (permalink / raw)
To: linux-input
Without the change either no scancode would be reported on release
of force_release keys, or - if the key is marked as force_release
erroneously - the release event and the scancode would be reported
in separate reports to the input layer.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
---
drivers/input/keyboard/atkbd.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 2dd1d0d..6375ae6 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -456,8 +456,9 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
keycode = atkbd->keycode[code];
- if (keycode != ATKBD_KEY_NULL)
- input_event(dev, EV_MSC, MSC_SCAN, code);
+ if (!(atkbd->release && test_bit(code, atkbd->force_release_mask)))
+ if (keycode != ATKBD_KEY_NULL)
+ input_event(dev, EV_MSC, MSC_SCAN, code);
switch (keycode) {
case ATKBD_KEY_NULL:
@@ -511,6 +512,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
input_sync(dev);
if (value && test_bit(code, atkbd->force_release_mask)) {
+ input_event(dev, EV_MSC, MSC_SCAN, code);
input_report_key(dev, keycode, 0);
input_sync(dev);
}
--
1.8.4.5
--
Stefan Brüns / Bergstraße 21 / 52062 Aachen
home: +49 241 53809034 mobile: +49 151 50412019
work: +49 2405 49936-424
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Input: atkbd - correct MSC_SCAN events for force_release keys
2014-09-28 21:13 [PATCH] Input: atkbd - correct MSC_SCAN events for force_release keys Stefan Brüns
@ 2014-10-17 22:48 ` Stefan Brüns
2014-10-23 23:44 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Brüns @ 2014-10-17 22:48 UTC (permalink / raw)
To: linux-input
On Sunday, September 28, 2014 11:13:24 PM you wrote:
> Without the change either no scancode would be reported on release
> of force_release keys, or - if the key is marked as force_release
> erroneously - the release event and the scancode would be reported
> in separate reports to the input layer.
>
> Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
> ---
> drivers/input/keyboard/atkbd.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
> index 2dd1d0d..6375ae6 100644
> --- a/drivers/input/keyboard/atkbd.c
> +++ b/drivers/input/keyboard/atkbd.c
> @@ -456,8 +456,9 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
>
> keycode = atkbd->keycode[code];
>
> - if (keycode != ATKBD_KEY_NULL)
> - input_event(dev, EV_MSC, MSC_SCAN, code);
> + if (!(atkbd->release && test_bit(code, atkbd->force_release_mask)))
> + if (keycode != ATKBD_KEY_NULL)
> + input_event(dev, EV_MSC, MSC_SCAN, code);
>
> switch (keycode) {
> case ATKBD_KEY_NULL:
> @@ -511,6 +512,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
> input_sync(dev);
>
> if (value && test_bit(code, atkbd->force_release_mask)) {
> + input_event(dev, EV_MSC, MSC_SCAN, code);
> input_report_key(dev, keycode, 0);
> input_sync(dev);
> }
>
Ping!
Kind regards,
Stefan
--
Stefan Brüns / Bergstraße 21 / 52062 Aachen
home: +49 241 53809034 mobile: +49 151 50412019
work: +49 2405 49936-424
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Input: atkbd - correct MSC_SCAN events for force_release keys
2014-10-17 22:48 ` Stefan Brüns
@ 2014-10-23 23:44 ` Dmitry Torokhov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2014-10-23 23:44 UTC (permalink / raw)
To: Stefan Brüns; +Cc: linux-input
On Sat, Oct 18, 2014 at 12:48:59AM +0200, Stefan Brüns wrote:
> On Sunday, September 28, 2014 11:13:24 PM you wrote:
> > Without the change either no scancode would be reported on release
> > of force_release keys, or - if the key is marked as force_release
> > erroneously - the release event and the scancode would be reported
> > in separate reports to the input layer.
> >
> > Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
> > ---
> > drivers/input/keyboard/atkbd.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
> > index 2dd1d0d..6375ae6 100644
> > --- a/drivers/input/keyboard/atkbd.c
> > +++ b/drivers/input/keyboard/atkbd.c
> > @@ -456,8 +456,9 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
> >
> > keycode = atkbd->keycode[code];
> >
> > - if (keycode != ATKBD_KEY_NULL)
> > - input_event(dev, EV_MSC, MSC_SCAN, code);
> > + if (!(atkbd->release && test_bit(code, atkbd->force_release_mask)))
> > + if (keycode != ATKBD_KEY_NULL)
> > + input_event(dev, EV_MSC, MSC_SCAN, code);
> >
> > switch (keycode) {
> > case ATKBD_KEY_NULL:
> > @@ -511,6 +512,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
> > input_sync(dev);
> >
> > if (value && test_bit(code, atkbd->force_release_mask)) {
> > + input_event(dev, EV_MSC, MSC_SCAN, code);
> > input_report_key(dev, keycode, 0);
> > input_sync(dev);
> > }
> >
>
> Ping!
>
> Kind regards,
I do not see the original patch mail, could you please resend (and CC
me)?
Thanks.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Input: atkbd - correct MSC_SCAN events for force_release keys
@ 2014-11-16 22:18 Stefan Brüns
2014-11-17 2:25 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Brüns @ 2014-11-16 22:18 UTC (permalink / raw)
To: linux-input; +Cc: Dmitry Torokhov
Without the change either no scancode would be reported on release
of force_release keys, or - if the key is marked as force_release
erroneously - the release event and the scancode would be reported
in separate reports to the input layer.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
---
Originally sent on 28.9.2014, but somehow got lost.
Resending as per Dmitrys request from 24.10.2014
drivers/input/keyboard/atkbd.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 2dd1d0d..6375ae6 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -456,8 +456,9 @@ static irqreturn_t atkbd_interrupt(struct serio *serio,
unsigned char data,
keycode = atkbd->keycode[code];
- if (keycode != ATKBD_KEY_NULL)
- input_event(dev, EV_MSC, MSC_SCAN, code);
+ if (!(atkbd->release && test_bit(code, atkbd->force_release_mask)))
+ if (keycode != ATKBD_KEY_NULL)
+ input_event(dev, EV_MSC, MSC_SCAN, code);
switch (keycode) {
case ATKBD_KEY_NULL:
@@ -511,6 +512,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio,
unsigned char data,
input_sync(dev);
if (value && test_bit(code, atkbd->force_release_mask)) {
+ input_event(dev, EV_MSC, MSC_SCAN, code);
input_report_key(dev, keycode, 0);
input_sync(dev);
}
--
1.8.4.5
--
Stefan Brüns / Bergstraße 21 / 52062 Aachen
home: +49 241 53809034 mobile: +49 151 50412019
work: +49 2405 49936-424
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Input: atkbd - correct MSC_SCAN events for force_release keys
2014-11-16 22:18 Stefan Brüns
@ 2014-11-17 2:25 ` Dmitry Torokhov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2014-11-17 2:25 UTC (permalink / raw)
To: Stefan Brüns; +Cc: linux-input
On Sun, Nov 16, 2014 at 11:18:31PM +0100, Stefan Brüns wrote:
> Without the change either no scancode would be reported on release
> of force_release keys, or - if the key is marked as force_release
> erroneously - the release event and the scancode would be reported
> in separate reports to the input layer.
>
> Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
> ---
>
> Originally sent on 28.9.2014, but somehow got lost.
> Resending as per Dmitrys request from 24.10.2014
Applied, thank you, but please next time don't use Kmail for patches -
it line-wrapped the patch and encoded it as quoted-printable.
Thanks!
>
> drivers/input/keyboard/atkbd.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
> index 2dd1d0d..6375ae6 100644
> --- a/drivers/input/keyboard/atkbd.c
> +++ b/drivers/input/keyboard/atkbd.c
> @@ -456,8 +456,9 @@ static irqreturn_t atkbd_interrupt(struct serio *serio,
> unsigned char data,
>
> keycode = atkbd->keycode[code];
>
> - if (keycode != ATKBD_KEY_NULL)
> - input_event(dev, EV_MSC, MSC_SCAN, code);
> + if (!(atkbd->release && test_bit(code, atkbd->force_release_mask)))
> + if (keycode != ATKBD_KEY_NULL)
> + input_event(dev, EV_MSC, MSC_SCAN, code);
>
> switch (keycode) {
> case ATKBD_KEY_NULL:
> @@ -511,6 +512,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio,
> unsigned char data,
> input_sync(dev);
>
> if (value && test_bit(code, atkbd->force_release_mask)) {
> + input_event(dev, EV_MSC, MSC_SCAN, code);
> input_report_key(dev, keycode, 0);
> input_sync(dev);
> }
> --
> 1.8.4.5
>
>
> --
> Stefan Brüns / Bergstraße 21 / 52062 Aachen
> home: +49 241 53809034 mobile: +49 151 50412019
> work: +49 2405 49936-424
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-11-17 2:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-28 21:13 [PATCH] Input: atkbd - correct MSC_SCAN events for force_release keys Stefan Brüns
2014-10-17 22:48 ` Stefan Brüns
2014-10-23 23:44 ` Dmitry Torokhov
-- strict thread matches above, loose matches on Subject: below --
2014-11-16 22:18 Stefan Brüns
2014-11-17 2:25 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).