linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: magicmouse: do not set up autorepeat
@ 2020-05-24 23:51 Dmitry Torokhov
  2020-06-16 15:34 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2020-05-24 23:51 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires; +Cc: Yariv, linux-input, linux-kernel

Neither the trackpad, nor the mouse want input core to generate autorepeat
events for their buttons, so let's reset the bit (as hid-input sets it for
these devices based on the usage vendor code).

Reported-by: Yariv <oigevald+kernel@gmail.com>
Tested-by: Yariv <oigevald+kernel@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---

Jiri, Benjamin, this is fixes jitter in event packets that became
apparent when we moved the point at which timestamps are being
generated, so maybe mark for stable?

Thanks!

 drivers/hid/hid-magicmouse.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 34138667f8af..21c0ea7459be 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -535,6 +535,12 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd
 		__set_bit(MSC_RAW, input->mscbit);
 	}
 
+	/*
+	 * hit-input may mark device as using autorepeat, but neither
+	 * the trackpad, nor the mouse actually want it.
+	 */
+	__clear_bit(EV_REP, input->evbit);
+
 	return 0;
 }
 
-- 
2.27.0.rc0.183.gde8f92d652-goog


-- 
Dmitry

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] HID: magicmouse: do not set up autorepeat
  2020-05-24 23:51 [PATCH] HID: magicmouse: do not set up autorepeat Dmitry Torokhov
@ 2020-06-16 15:34 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2020-06-16 15:34 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Benjamin Tissoires, Yariv, linux-input, linux-kernel

On Sun, 24 May 2020, Dmitry Torokhov wrote:

> Neither the trackpad, nor the mouse want input core to generate autorepeat
> events for their buttons, so let's reset the bit (as hid-input sets it for
> these devices based on the usage vendor code).
> 
> Reported-by: Yariv <oigevald+kernel@gmail.com>
> Tested-by: Yariv <oigevald+kernel@gmail.com>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> 
> Jiri, Benjamin, this is fixes jitter in event packets that became
> apparent when we moved the point at which timestamps are being
> generated, so maybe mark for stable?

I've marked it for stable, fixed the typo in the comment, and applied, 
thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-16 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-24 23:51 [PATCH] HID: magicmouse: do not set up autorepeat Dmitry Torokhov
2020-06-16 15:34 ` Jiri Kosina

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).