All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: wacom: correct misreported EKR ring values
@ 2019-08-19 16:41 Aaron Armstrong Skomra
  2019-08-19 17:02   ` Sasha Levin
  0 siblings, 1 reply; 8+ messages in thread
From: Aaron Armstrong Skomra @ 2019-08-19 16:41 UTC (permalink / raw)
  To: sashal, linux-input, jikos, benjamin.tissoires, ping.cheng,
	jason.gerecke
  Cc: Aaron Armstrong Skomra, # v4 . 3+

The EKR ring claims a range of 0 to 71 but actually reports
values 1 to 72. The ring is used in relative mode so this
change should not affect users.

Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>
Fixes: 72b236d60218f ("HID: wacom: Add support for Express Key Remote.")
Cc: <stable@vger.kernel.org> # v4.3+
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
---
Patch specifically targeted to v4.9.189

 drivers/hid/wacom_wac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 6c3bf8846b52..949761dd29ca 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -819,7 +819,7 @@ static int wacom_remote_irq(struct wacom_wac *wacom_wac, size_t len)
 	input_report_key(input, BTN_BASE2, (data[11] & 0x02));
 
 	if (data[12] & 0x80)
-		input_report_abs(input, ABS_WHEEL, (data[12] & 0x7f));
+		input_report_abs(input, ABS_WHEEL, (data[12] & 0x7f) - 1);
 	else
 		input_report_abs(input, ABS_WHEEL, 0);
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread
[parent not found: <20190817181109.33F1B2173B@mail.kernel.org>]
* [PATCH] HID: wacom: correct misreported EKR ring values
@ 2019-08-16 19:00 Aaron Armstrong Skomra
  2019-08-20  8:43 ` Jiri Kosina
  0 siblings, 1 reply; 8+ messages in thread
From: Aaron Armstrong Skomra @ 2019-08-16 19:00 UTC (permalink / raw)
  To: linux-input, jikos, benjamin.tissoires, ping.cheng, jason.gerecke
  Cc: Aaron Armstrong Skomra, # v4 . 3+

The EKR ring claims a range of 0 to 71 but actually reports
values 1 to 72. The ring is used in relative mode so this
change should not affect users.

Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>
Fixes: 72b236d60218f ("HID: wacom: Add support for Express Key Remote.")
Cc: <stable@vger.kernel.org> # v4.3+
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
---
 drivers/hid/wacom_wac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index abc17f2c8ef0..e314a7564236 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -1098,7 +1098,7 @@ static int wacom_remote_irq(struct wacom_wac *wacom_wac, size_t len)
 	input_report_key(input, BTN_BASE2, (data[11] & 0x02));
 
 	if (data[12] & 0x80)
-		input_report_abs(input, ABS_WHEEL, (data[12] & 0x7f));
+		input_report_abs(input, ABS_WHEEL, (data[12] & 0x7f) - 1);
 	else
 		input_report_abs(input, ABS_WHEEL, 0);
 
-- 
2.17.1


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

end of thread, other threads:[~2019-08-20  8:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-19 16:41 [PATCH] HID: wacom: correct misreported EKR ring values Aaron Armstrong Skomra
2019-08-19 17:02 ` Sasha Levin
2019-08-19 17:02   ` Sasha Levin
     [not found]   ` <CAEoswT3mvABD7T_0WkwrAOe1PHO62jZ63tUb2UBQLm_Tqu-guw@mail.gmail.com>
2019-08-19 19:03     ` Sasha Levin
2019-08-19 19:03       ` Sasha Levin
     [not found] <20190817181109.33F1B2173B@mail.kernel.org>
2019-08-19 17:20 ` Aaron Armstrong Skomra
  -- strict thread matches above, loose matches on Subject: below --
2019-08-16 19:00 Aaron Armstrong Skomra
2019-08-20  8:43 ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.