linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Add support for high-resolution scrolling on Logitech mice
@ 2018-08-30 21:56 Harry Cutts
  2018-08-30 21:56 ` [PATCH v2 1/5] Add the `REL_WHEEL_HI_RES` event code Harry Cutts
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Harry Cutts @ 2018-08-30 21:56 UTC (permalink / raw)
  To: linux-input, LKML
  Cc: Jiri Kosina, Dmitry Torokhov, Benjamin Tissoires, Harry Cutts,
	linux-doc, Jonathan Corbet, Jiri Kosina

Hi everyone,

This is v2 of the patch set adding support for high-resolution scroll
wheels on Logitech mice. See the linux-input "Reporting high-resolution
scroll events" thread [0] for previous discussion of the evdev changes.
I would love to hear your feedback.

Thanks,

Harry Cutts
Chrome OS Touch/Input team

[0]: https://www.spinics.net/lists/linux-input/msg57380.html


Changes in v2:
* Changed the REL_WHEEL_HI_RES code to use micrometres (a.k.a. microns)
  as its units, instead of 256ths of a millimetre.
* Removed support for mice connecting over Bluetooth, due to a bug where
  the mouse's high-res mode and the driver's settings get out of sync
  when the mouse is power cycled.
* Moved the creation of the HID++ 1.0 function and the refactor to use
  the LDJ_DEVICE macro into separate patches.
* Added a couple of explanatory comments to the Logitech driver.

Harry Cutts (5):
  Add the `REL_WHEEL_HI_RES` event code
  Create a utility class for counting scroll events
  Add function to enable HID++ 1.0 "scrolling acceleration"
  Enable high-resolution scrolling on Logitech mice
  Use LDJ_DEVICE macro for existing Logitech mice

 Documentation/input/event-codes.rst    |  11 +-
 drivers/hid/hid-input.c                |  45 ++++
 drivers/hid/hid-logitech-hidpp.c       | 311 ++++++++++++++++++++++---
 include/linux/hid.h                    |  28 +++
 include/uapi/linux/input-event-codes.h |   1 +
 5 files changed, 368 insertions(+), 28 deletions(-)

-- 
2.19.0.rc0.228.g281dcd1b4d0-goog


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

* [PATCH v2 1/5] Add the `REL_WHEEL_HI_RES` event code
  2018-08-30 21:56 [PATCH v2 0/5] Add support for high-resolution scrolling on Logitech mice Harry Cutts
@ 2018-08-30 21:56 ` Harry Cutts
  2018-09-03 13:43   ` Jiri Kosina
  2018-09-04  6:28   ` Peter Hutterer
  2018-09-03  8:15 ` [PATCH v2 0/5] Add support for high-resolution scrolling on Logitech mice Benjamin Tissoires
  2018-09-05  8:13 ` Jiri Kosina
  2 siblings, 2 replies; 7+ messages in thread
From: Harry Cutts @ 2018-08-30 21:56 UTC (permalink / raw)
  To: linux-input, LKML
  Cc: Jiri Kosina, Dmitry Torokhov, Benjamin Tissoires, Harry Cutts,
	linux-doc, Jonathan Corbet

This event code represents scroll reports from high-resolution wheels,
and will be used by future patches in this series. See the linux-input
"Reporting high-resolution scroll events" thread [0] for more details.

[0]: https://www.spinics.net/lists/linux-input/msg57380.html

Signed-off-by: Harry Cutts <hcutts@chromium.org>
---

Changes in v2: None

 Documentation/input/event-codes.rst    | 11 ++++++++++-
 include/uapi/linux/input-event-codes.h |  1 +
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/Documentation/input/event-codes.rst b/Documentation/input/event-codes.rst
index a8c0873beb95..cef220c176a4 100644
--- a/Documentation/input/event-codes.rst
+++ b/Documentation/input/event-codes.rst
@@ -190,7 +190,16 @@ A few EV_REL codes have special meanings:
 * REL_WHEEL, REL_HWHEEL:
 
   - These codes are used for vertical and horizontal scroll wheels,
-    respectively.
+    respectively. The value is the number of "notches" moved on the wheel, the
+    physical size of which varies by device. For high-resolution wheels (which
+    report multiple events for each notch of movement, or do not have notches)
+    this may be an approximation based on the high-resolution scroll events.
+
+* REL_WHEEL_HI_RES:
+
+  - If a vertical scroll wheel supports high-resolution scrolling, this code
+    will be emitted in addition to REL_WHEEL. The value is the (approximate)
+    distance travelled by the user's finger, in microns.
 
 EV_ABS
 ------
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 53fbae27b280..dad8d3890a3a 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -708,6 +708,7 @@
 #define REL_DIAL		0x07
 #define REL_WHEEL		0x08
 #define REL_MISC		0x09
+#define REL_WHEEL_HI_RES	0x0a
 #define REL_MAX			0x0f
 #define REL_CNT			(REL_MAX+1)
 
-- 
2.19.0.rc0.228.g281dcd1b4d0-goog


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

* Re: [PATCH v2 0/5] Add support for high-resolution scrolling on Logitech mice
  2018-08-30 21:56 [PATCH v2 0/5] Add support for high-resolution scrolling on Logitech mice Harry Cutts
  2018-08-30 21:56 ` [PATCH v2 1/5] Add the `REL_WHEEL_HI_RES` event code Harry Cutts
@ 2018-09-03  8:15 ` Benjamin Tissoires
  2018-09-05  8:13 ` Jiri Kosina
  2 siblings, 0 replies; 7+ messages in thread
From: Benjamin Tissoires @ 2018-09-03  8:15 UTC (permalink / raw)
  To: hcutts
  Cc: open list:HID CORE LAYER, lkml, jiri.kosina, Dmitry Torokhov,
	linux-doc, corbet, Jiri Kosina

Hi Harry,

On Thu, Aug 30, 2018 at 11:56 PM Harry Cutts <hcutts@chromium.org> wrote:
>
> Hi everyone,
>
> This is v2 of the patch set adding support for high-resolution scroll
> wheels on Logitech mice. See the linux-input "Reporting high-resolution
> scroll events" thread [0] for previous discussion of the evdev changes.
> I would love to hear your feedback.

Series looks good. I just tested it on a regular Logitech mouse and a
MX Master with high-res scrolling and everything works as expected.

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Cheers,
Benjamin

>
> Thanks,
>
> Harry Cutts
> Chrome OS Touch/Input team
>
> [0]: https://www.spinics.net/lists/linux-input/msg57380.html
>
>
> Changes in v2:
> * Changed the REL_WHEEL_HI_RES code to use micrometres (a.k.a. microns)
>   as its units, instead of 256ths of a millimetre.
> * Removed support for mice connecting over Bluetooth, due to a bug where
>   the mouse's high-res mode and the driver's settings get out of sync
>   when the mouse is power cycled.
> * Moved the creation of the HID++ 1.0 function and the refactor to use
>   the LDJ_DEVICE macro into separate patches.
> * Added a couple of explanatory comments to the Logitech driver.
>
> Harry Cutts (5):
>   Add the `REL_WHEEL_HI_RES` event code
>   Create a utility class for counting scroll events
>   Add function to enable HID++ 1.0 "scrolling acceleration"
>   Enable high-resolution scrolling on Logitech mice
>   Use LDJ_DEVICE macro for existing Logitech mice
>
>  Documentation/input/event-codes.rst    |  11 +-
>  drivers/hid/hid-input.c                |  45 ++++
>  drivers/hid/hid-logitech-hidpp.c       | 311 ++++++++++++++++++++++---
>  include/linux/hid.h                    |  28 +++
>  include/uapi/linux/input-event-codes.h |   1 +
>  5 files changed, 368 insertions(+), 28 deletions(-)
>
> --
> 2.19.0.rc0.228.g281dcd1b4d0-goog
>

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

* Re: [PATCH v2 1/5] Add the `REL_WHEEL_HI_RES` event code
  2018-08-30 21:56 ` [PATCH v2 1/5] Add the `REL_WHEEL_HI_RES` event code Harry Cutts
@ 2018-09-03 13:43   ` Jiri Kosina
  2018-09-05  0:25     ` Dmitry Torokhov
  2018-09-04  6:28   ` Peter Hutterer
  1 sibling, 1 reply; 7+ messages in thread
From: Jiri Kosina @ 2018-09-03 13:43 UTC (permalink / raw)
  To: Harry Cutts, Dmitry Torokhov
  Cc: linux-input, LKML, Jiri Kosina, Benjamin Tissoires, linux-doc,
	Jonathan Corbet

On Thu, 30 Aug 2018, Harry Cutts wrote:

> This event code represents scroll reports from high-resolution wheels,
> and will be used by future patches in this series. See the linux-input
> "Reporting high-resolution scroll events" thread [0] for more details.
> 
> [0]: https://www.spinics.net/lists/linux-input/msg57380.html
> 
> Signed-off-by: Harry Cutts <hcutts@chromium.org>
> ---
> 
> Changes in v2: None
> 
>  Documentation/input/event-codes.rst    | 11 ++++++++++-
>  include/uapi/linux/input-event-codes.h |  1 +
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/input/event-codes.rst b/Documentation/input/event-codes.rst
> index a8c0873beb95..cef220c176a4 100644
> --- a/Documentation/input/event-codes.rst
> +++ b/Documentation/input/event-codes.rst
> @@ -190,7 +190,16 @@ A few EV_REL codes have special meanings:
>  * REL_WHEEL, REL_HWHEEL:
>  
>    - These codes are used for vertical and horizontal scroll wheels,
> -    respectively.
> +    respectively. The value is the number of "notches" moved on the wheel, the
> +    physical size of which varies by device. For high-resolution wheels (which
> +    report multiple events for each notch of movement, or do not have notches)
> +    this may be an approximation based on the high-resolution scroll events.
> +
> +* REL_WHEEL_HI_RES:
> +
> +  - If a vertical scroll wheel supports high-resolution scrolling, this code
> +    will be emitted in addition to REL_WHEEL. The value is the (approximate)
> +    distance travelled by the user's finger, in microns.
>  
>  EV_ABS
>  ------
> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> index 53fbae27b280..dad8d3890a3a 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -708,6 +708,7 @@
>  #define REL_DIAL		0x07
>  #define REL_WHEEL		0x08
>  #define REL_MISC		0x09
> +#define REL_WHEEL_HI_RES	0x0a
>  #define REL_MAX			0x0f
>  #define REL_CNT			(REL_MAX+1)

Dmitry, is this OK with you?

Thanks,

-- 
Jiri Kosina
SUSE Labs


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

* Re: [PATCH v2 1/5] Add the `REL_WHEEL_HI_RES` event code
  2018-08-30 21:56 ` [PATCH v2 1/5] Add the `REL_WHEEL_HI_RES` event code Harry Cutts
  2018-09-03 13:43   ` Jiri Kosina
@ 2018-09-04  6:28   ` Peter Hutterer
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Hutterer @ 2018-09-04  6:28 UTC (permalink / raw)
  To: Harry Cutts
  Cc: linux-input, LKML, Jiri Kosina, Dmitry Torokhov,
	Benjamin Tissoires, linux-doc, Jonathan Corbet

On Thu, Aug 30, 2018 at 02:56:18PM -0700, Harry Cutts wrote:
> This event code represents scroll reports from high-resolution wheels,
> and will be used by future patches in this series. See the linux-input
> "Reporting high-resolution scroll events" thread [0] for more details.
> 
> [0]: https://www.spinics.net/lists/linux-input/msg57380.html
> 
> Signed-off-by: Harry Cutts <hcutts@chromium.org>

looks good to me, thanks. For the archives, the libinput issue filed for
this is here: https://gitlab.freedesktop.org/libinput/libinput/issues/130

Cheers,
   Peter

> ---
> 
> Changes in v2: None
> 
>  Documentation/input/event-codes.rst    | 11 ++++++++++-
>  include/uapi/linux/input-event-codes.h |  1 +
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/input/event-codes.rst b/Documentation/input/event-codes.rst
> index a8c0873beb95..cef220c176a4 100644
> --- a/Documentation/input/event-codes.rst
> +++ b/Documentation/input/event-codes.rst
> @@ -190,7 +190,16 @@ A few EV_REL codes have special meanings:
>  * REL_WHEEL, REL_HWHEEL:
>  
>    - These codes are used for vertical and horizontal scroll wheels,
> -    respectively.
> +    respectively. The value is the number of "notches" moved on the wheel, the
> +    physical size of which varies by device. For high-resolution wheels (which
> +    report multiple events for each notch of movement, or do not have notches)
> +    this may be an approximation based on the high-resolution scroll events.
> +
> +* REL_WHEEL_HI_RES:
> +
> +  - If a vertical scroll wheel supports high-resolution scrolling, this code
> +    will be emitted in addition to REL_WHEEL. The value is the (approximate)
> +    distance travelled by the user's finger, in microns.
>  
>  EV_ABS
>  ------
> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> index 53fbae27b280..dad8d3890a3a 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -708,6 +708,7 @@
>  #define REL_DIAL		0x07
>  #define REL_WHEEL		0x08
>  #define REL_MISC		0x09
> +#define REL_WHEEL_HI_RES	0x0a
>  #define REL_MAX			0x0f
>  #define REL_CNT			(REL_MAX+1)
>  
> -- 
> 2.19.0.rc0.228.g281dcd1b4d0-goog
> 

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

* Re: [PATCH v2 1/5] Add the `REL_WHEEL_HI_RES` event code
  2018-09-03 13:43   ` Jiri Kosina
@ 2018-09-05  0:25     ` Dmitry Torokhov
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Torokhov @ 2018-09-05  0:25 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Harry Cutts, linux-input, LKML, Jiri Kosina, Benjamin Tissoires,
	linux-doc, Jonathan Corbet

On Mon, Sep 03, 2018 at 03:43:13PM +0200, Jiri Kosina wrote:
> On Thu, 30 Aug 2018, Harry Cutts wrote:
> 
> > This event code represents scroll reports from high-resolution wheels,
> > and will be used by future patches in this series. See the linux-input
> > "Reporting high-resolution scroll events" thread [0] for more details.
> > 
> > [0]: https://www.spinics.net/lists/linux-input/msg57380.html
> > 
> > Signed-off-by: Harry Cutts <hcutts@chromium.org>
> > ---
> > 
> > Changes in v2: None
> > 
> >  Documentation/input/event-codes.rst    | 11 ++++++++++-
> >  include/uapi/linux/input-event-codes.h |  1 +
> >  2 files changed, 11 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/input/event-codes.rst b/Documentation/input/event-codes.rst
> > index a8c0873beb95..cef220c176a4 100644
> > --- a/Documentation/input/event-codes.rst
> > +++ b/Documentation/input/event-codes.rst
> > @@ -190,7 +190,16 @@ A few EV_REL codes have special meanings:
> >  * REL_WHEEL, REL_HWHEEL:
> >  
> >    - These codes are used for vertical and horizontal scroll wheels,
> > -    respectively.
> > +    respectively. The value is the number of "notches" moved on the wheel, the
> > +    physical size of which varies by device. For high-resolution wheels (which
> > +    report multiple events for each notch of movement, or do not have notches)
> > +    this may be an approximation based on the high-resolution scroll events.
> > +
> > +* REL_WHEEL_HI_RES:
> > +
> > +  - If a vertical scroll wheel supports high-resolution scrolling, this code
> > +    will be emitted in addition to REL_WHEEL. The value is the (approximate)
> > +    distance travelled by the user's finger, in microns.
> >  
> >  EV_ABS
> >  ------
> > diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> > index 53fbae27b280..dad8d3890a3a 100644
> > --- a/include/uapi/linux/input-event-codes.h
> > +++ b/include/uapi/linux/input-event-codes.h
> > @@ -708,6 +708,7 @@
> >  #define REL_DIAL		0x07
> >  #define REL_WHEEL		0x08
> >  #define REL_MISC		0x09
> > +#define REL_WHEEL_HI_RES	0x0a
> >  #define REL_MAX			0x0f
> >  #define REL_CNT			(REL_MAX+1)
> 
> Dmitry, is this OK with you?

Yep, please feel free to merge through your tree.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Thanks.

-- 
Dmitry

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

* Re: [PATCH v2 0/5] Add support for high-resolution scrolling on Logitech mice
  2018-08-30 21:56 [PATCH v2 0/5] Add support for high-resolution scrolling on Logitech mice Harry Cutts
  2018-08-30 21:56 ` [PATCH v2 1/5] Add the `REL_WHEEL_HI_RES` event code Harry Cutts
  2018-09-03  8:15 ` [PATCH v2 0/5] Add support for high-resolution scrolling on Logitech mice Benjamin Tissoires
@ 2018-09-05  8:13 ` Jiri Kosina
  2 siblings, 0 replies; 7+ messages in thread
From: Jiri Kosina @ 2018-09-05  8:13 UTC (permalink / raw)
  To: Harry Cutts
  Cc: linux-input, LKML, Dmitry Torokhov, Benjamin Tissoires, linux-doc,
	Jonathan Corbet

On Thu, 30 Aug 2018, Harry Cutts wrote:

> This is v2 of the patch set adding support for high-resolution scroll 
> wheels on Logitech mice. See the linux-input "Reporting high-resolution 
> scroll events" thread [0] for previous discussion of the evdev changes. 
> I would love to hear your feedback.

Queued in for-4.20/logitech-highres. Thanks,

-- 
Jiri Kosina
SUSE Labs


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

end of thread, other threads:[~2018-09-05  8:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-30 21:56 [PATCH v2 0/5] Add support for high-resolution scrolling on Logitech mice Harry Cutts
2018-08-30 21:56 ` [PATCH v2 1/5] Add the `REL_WHEEL_HI_RES` event code Harry Cutts
2018-09-03 13:43   ` Jiri Kosina
2018-09-05  0:25     ` Dmitry Torokhov
2018-09-04  6:28   ` Peter Hutterer
2018-09-03  8:15 ` [PATCH v2 0/5] Add support for high-resolution scrolling on Logitech mice Benjamin Tissoires
2018-09-05  8:13 ` 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).