All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] HID: wacom: generic: Wacom mouse is only provided for opaque tablets
@ 2017-03-15  0:08 Ping Cheng
  2017-03-21 13:48 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Ping Cheng @ 2017-03-15  0:08 UTC (permalink / raw)
  To: linux-input; +Cc: jkosina, killertofu, Ping Cheng, Ping Cheng

Commit f85c9dc ("Support tool ID and additional tool types") introduced mouse
and lens cursor tools to generic codepath, which covers both display (direct)
and opaque tablets (indirect devices). However, mouse and lens cursor tools are
only provided for opaque tablets. This patch ignores mouse and lens cursor tools
if the device is a display tablet.

Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
---
v2: updated commit comments as requested by Jiri.
---
 drivers/hid/wacom_wac.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index d51daf5..b51aa27 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -1952,8 +1952,10 @@ static void wacom_wac_pen_usage_mapping(struct hid_device *hdev,
 		input_set_capability(input, EV_KEY, BTN_TOOL_BRUSH);
 		input_set_capability(input, EV_KEY, BTN_TOOL_PENCIL);
 		input_set_capability(input, EV_KEY, BTN_TOOL_AIRBRUSH);
-		input_set_capability(input, EV_KEY, BTN_TOOL_MOUSE);
-		input_set_capability(input, EV_KEY, BTN_TOOL_LENS);
+		if (!(features->device_type & WACOM_DEVICETYPE_DIRECT)) {
+			input_set_capability(input, EV_KEY, BTN_TOOL_MOUSE);
+			input_set_capability(input, EV_KEY, BTN_TOOL_LENS);
+		}
 		break;
 	case WACOM_HID_WD_FINGERWHEEL:
 		wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0);
-- 
2.7.4


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

* Re: [PATCH v2] HID: wacom: generic: Wacom mouse is only provided for opaque tablets
  2017-03-15  0:08 [PATCH v2] HID: wacom: generic: Wacom mouse is only provided for opaque tablets Ping Cheng
@ 2017-03-21 13:48 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2017-03-21 13:48 UTC (permalink / raw)
  To: Ping Cheng; +Cc: linux-input, killertofu, Ping Cheng, Ping Cheng

On Tue, 14 Mar 2017, Ping Cheng wrote:

> Commit f85c9dc ("Support tool ID and additional tool types") introduced mouse
> and lens cursor tools to generic codepath, which covers both display (direct)
> and opaque tablets (indirect devices). However, mouse and lens cursor tools are
> only provided for opaque tablets. This patch ignores mouse and lens cursor tools
> if the device is a display tablet.
> 
> Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
> ---
> v2: updated commit comments as requested by Jiri.

Applied to for-4.11/upstream-fixes.

-- 
Jiri Kosina
SUSE Labs


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

end of thread, other threads:[~2017-03-21 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15  0:08 [PATCH v2] HID: wacom: generic: Wacom mouse is only provided for opaque tablets Ping Cheng
2017-03-21 13:48 ` 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.