linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gerecke <killertofu@gmail.com>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Jiri Kosina <jikos@kernel.org>, Ping Cheng <pinglinux@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: Wacom: switch Dell canvas into highres mode
Date: Fri, 03 Nov 2017 17:12:08 -0700	[thread overview]
Message-ID: <DE35351F-500C-41C5-90E2-18BC2B48A803@gmail.com> (raw)
In-Reply-To: <20171103172947.15156-1-benjamin.tissoires@redhat.com>

On November 3, 2017 10:29:47 AM PDT, Benjamin Tissoires <benjamin.tissoires@redhat.com> wrote:
>The Dell Canvas exports 2 collections for the Pen part. The only
>difference between the 2 is that the default one has half the
>resolution
>of the second one.
>
>The Windows driver switches the tablet into the second mode, so we
>should
>behave the same.
>
>Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>---
>
>Hi,
>
>well, this is not the cleanest way of handling this mode set, but it is
>the
>less intrusive AFAICT.
>
>I was thinking that we might want to add a new field in struct
>wacom_feature,
>but then it wouldn't make sense to keep the set mode specifics in
>_wacom_query_tablet_data().
>
>So I am open to any better suggestion, but this one works and the
>impact on
>other HID generic tablets is null.
>

Hmm. Agreed that this isn't ideal. I'd like to take a look at the descriptor, if you wouldn't mind sharing it. The hardware should be similar to other devices of ours and it might be possible to piggyback on existing code.

Jason

>Cheers,
>Benjamin
>
> drivers/hid/wacom_sys.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
>diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
>index 906e654fb0ba..ee71ad9b6cc1 100644
>--- a/drivers/hid/wacom_sys.c
>+++ b/drivers/hid/wacom_sys.c
>@@ -196,6 +196,13 @@ static void wacom_feature_mapping(struct
>hid_device *hdev,
> 		kfree(data);
> 		break;
> 	}
>+
>+	if (hdev->vendor == USB_VENDOR_ID_WACOM &&
>+	    hdev->product == 0x4200 /* Dell Canvas 27 */ &&
>+	    field->application == HID_UP_MSVENDOR) {
>+		wacom->wacom_wac.mode_report = field->report->id;
>+		wacom->wacom_wac.mode_value = 2;
>+	}
> }
> 
> /*


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

  reply	other threads:[~2017-11-04  0:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 17:29 [PATCH] HID: Wacom: switch Dell canvas into highres mode Benjamin Tissoires
2017-11-04  0:12 ` Jason Gerecke [this message]
2017-11-06  8:05   ` Benjamin Tissoires
2017-11-09 11:42     ` Jiri Kosina
2017-11-09 22:32       ` Jason Gerecke
2017-11-10  8:40         ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DE35351F-500C-41C5-90E2-18BC2B48A803@gmail.com \
    --to=killertofu@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pinglinux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).